Преглед изворни кода

Merge pull request #518 from causefx/cero-dev

Cero dev
causefx пре 9 година
родитељ
комит
f0537d8f49
10 измењених фајлова са 51 додато и 10 уклоњено
  1. 7 6
      check.php
  2. 15 3
      functions.php
  3. 1 1
      homepage.php
  4. 4 0
      lang/de.ini
  5. 4 0
      lang/en.ini
  6. 4 0
      lang/es.ini
  7. 4 0
      lang/fr.ini
  8. 4 0
      lang/it.ini
  9. 4 0
      lang/nl.ini
  10. 4 0
      lang/pl.ini

+ 7 - 6
check.php

@@ -1,6 +1,9 @@
 <?php
-
-require_once("user.php");
+if (file_exists('config/config.php')) {
+    require_once("user.php");
+    $db = DATABASE_LOCATION.'users.db';
+    $folder = USER_HOME;
+}
 
 function check($extension) {
     
@@ -116,9 +119,6 @@ function getFilePermission($file) {
     endif;
 }
 
-$db = DATABASE_LOCATION.'users.db';
-$folder = USER_HOME;
-
 ?>
 
 <!DOCTYPE html>
@@ -164,10 +164,11 @@ $folder = USER_HOME;
                 check("PDO");
                 check("SQLITE3");
                 check("Zip");
+                check("cURL");
                 check("openssl");
                 check("session");
                 check("simplexml");
-                checkFunction("MAIL");
+                //checkFunction("MAIL");
                 checkFunction("fopen");
 
                 @getFilePermission($db);

+ 15 - 3
functions.php

@@ -2,14 +2,14 @@
 
 // ===================================
 // Define Version
- define('INSTALLEDVERSION', '1.402');
+ define('INSTALLEDVERSION', '1.42');
 // ===================================
 
 // Debugging output functions
 function debug_out($variable, $die = false) {
 	$trace = debug_backtrace()[0];
 	echo "<center><img height='200px' src='images/confused.png'></center>";
-	echo "<center>Look's like somethigng happened, here are the errors and perhaps how to fix them:</center>";
+	echo "<center>Look's like something happened, here are the errors and perhaps how to fix them:</center>";
 	echo '<pre style="white-space: pre-line; background-color: #f2f2f2; border: 2px solid black; border-radius: 5px; padding: 5px; margin: 5px;">'.$trace['file'].':'.$trace['line']."\n\n".print_r($variable, true).'</pre>';
 	if ($die) { http_response_code(503); die(); }
 }
@@ -2905,7 +2905,7 @@ function getHeadphonesCalendar($url, $key, $list){
     $gotCalendar = "";
 	if (is_array($api) || is_object($api)){
 		foreach($api AS $child) {
-			if($child['Status'] == "Wanted"){
+			if($child['Status'] == "Wanted" && $list == "getWanted"){
 				$i++;
 				$albumName = addslashes($child['AlbumTitle']);
 				$albumArtist = htmlentities($child['ArtistName'], ENT_QUOTES);
@@ -2921,6 +2921,18 @@ function getHeadphonesCalendar($url, $key, $list){
 
 				$gotCalendar .= "{ title: \"$albumArtist - $albumName\", start: \"$albumDate\", className: \"$albumStatusColor\", imagetype: \"music\", url: \"https://musicbrainz.org/release-group/$albumID\" }, \n";
 			}
+			if($child['Status'] == "Processed" && $list == "getHistory"){
+				$i++;
+				$albumName = addslashes($child['Title']);
+				$albumDate = $child['DateAdded'];
+				$albumID = $child['AlbumID'];
+				$albumDate = strtotime($albumDate);
+				$albumDate = date("Y-m-d", $albumDate);
+				$albumStatusColor = "green-bg";
+				if (new DateTime() < new DateTime($albumDate)) {  $notReleased = "true"; }else{ $notReleased = "false"; }
+
+				$gotCalendar .= "{ title: \"$albumName\", start: \"$albumDate\", className: \"$albumStatusColor\", imagetype: \"music\", url: \"https://musicbrainz.org/release-group/$albumID\" }, \n";
+			}
 		}
     	if ($i != 0){ return $gotCalendar; }
 	}else{

+ 1 - 1
homepage.php

@@ -961,7 +961,7 @@ if (HEADPHONESURL != "" && qualifyUser(HEADPHONESHOMEAUTH)){
                     deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
                         refreshPreloader.remove();
                     });
-                },200);
+                },300);
                 var check = $(this).attr("class");
                 var ID = check.split("--")[1];
                 if (~check.indexOf("tvID")){

+ 4 - 0
lang/de.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/en.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/es.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/fr.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/it.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/nl.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"

+ 4 - 0
lang/pl.ini

@@ -308,3 +308,7 @@ EMAIL_NEWUSER_SUBMESSAGE = "Now that you have signed up, you can basically do wh
 PLAYLISTS = "Playlists"
 DOWNLOAD_REFRESH = "Refresh Download Queue"
 HISTORY_REFRESH = "Refresh History"
+CHECK_FRAME = "Test Frame"
+GENERATE_API_KEY = "Generate API Key"
+ORGANIZR_API_KEY = "Organizr API Key"
+TEST_EMAIL = "Send Test E-Mail"