浏览代码

PHP requires version 7 now
Fix calendar margin
fix CP variable

causefx 8 年之前
父节点
当前提交
7240dd815d

+ 1 - 1
api/functions/homepage-connect-functions.php

@@ -1012,7 +1012,7 @@ function getCouchCalendar($array,$number){
                     "overview" => $child['info']['plot'],
                     "runtime" => $child['info']['runtime'],
                     "image" => $banner,
-                    "ratings" => $child['info']['rating']['imdb'][0],
+                    "ratings" => isset($child['info']['rating']['imdb'][0]) ? $child['info']['rating']['imdb'][0] : '',
                     "videoQuality" => $hasFile ? $child['releases'][0]['quality'] : "unknown",
                     "audioChannels" => "",
                     "audioCodec" => "",

+ 1 - 1
api/functions/homepage-functions.php

@@ -182,7 +182,7 @@ function buildHomepageItem($homepageItem){
 		case 'homepageOrdercalendar':
 			if($GLOBALS['homepageSonarrEnabled'] && qualifyRequest($GLOBALS['homepageSonarrAuth']) || ($GLOBALS['homepageRadarrEnabled'] && qualifyRequest($GLOBALS['homepageRadarrAuth'])) || ($GLOBALS['homepageSickrageEnabled'] && qualifyRequest($GLOBALS['homepageSickrageAuth'])) || ($GLOBALS['homepageCouchpotatoEnabled'] && qualifyRequest($GLOBALS['homepageCouchpotatoAuth']))){
 				$item .= '
-				<div id="calendar" class="fc fc-ltr animated zoomIn"></div>
+				<div id="calendar" class="fc fc-ltr animated zoomIn m-b-30"></div>
 				<script>
 				// Calendar
 				homepageCalendar("'.$GLOBALS['calendarRefresh'].'");

+ 2 - 1
api/functions/organizr-functions.php

@@ -236,11 +236,12 @@ function organizrStatus(){
     if(!file_exists('config'.DIRECTORY_SEPARATOR.'config.php')){
         $status['status'] = "wizard";//wizard - ok for test
     }
-    if(count($dependenciesInactive)>0 || !is_writable(dirname(__DIR__,2))){
+    if(count($dependenciesInactive)>0 || !is_writable(dirname(__DIR__,2)) || !(version_compare(PHP_VERSION, '7.0.0') >= 0)){
         $status['status'] = "dependencies";
     }
     $status['status'] = (!empty($status['status'])) ? $status['status'] : $status['status'] = "ok";
     $status['writable'] = is_writable(dirname(__DIR__,2)) ? 'yes' : 'no';
+    $status['minVersion'] = (version_compare(PHP_VERSION, '7.0.0') >= 0) ? 'yes' : 'no';
     $status['dependenciesActive'] = $dependenciesActive;
     $status['dependenciesInactive'] = $dependenciesInactive;
     $status['version'] = $GLOBALS['installedVersion'];

+ 16 - 0
api/pages/dependencies.php

@@ -23,6 +23,22 @@ $pageDependencies = '
                     </div>
                 </div>
             </div>
+        </div>
+		<div class="col-lg-4">
+            <div class="panel panel-info">
+                <div class="panel-heading"> <i class="ti-alert fa-fw"></i> <span lang="en">PHP Version Check</span>
+                    <div class="pull-right"><a href="#" data-perform="panel-collapse"><i class="ti-minus"></i></a> <a href="#" data-perform="panel-dismiss"><i class="ti-close"></i></a> </div>
+                </div>
+                <div class="panel-wrapper collapse in" aria-expanded="true">
+                    <table class="table table-hover">
+                        <tbody>
+                            <tr>
+                                <td id="php-version-check" lang="en">Loading...</td>
+                            </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
         </div>
 		<div class="col-lg-4">
             <div class="panel panel-info">

+ 1 - 1
api/pages/homepage.php

@@ -70,7 +70,7 @@ function($) {
     $.CalendarApp.init()
 }(window.jQuery);
 </script>
-<div class="container-fluid p-t-10" id="homepage-items">
+<div class="container-fluid p-t-30" id="homepage-items">
     '.buildHomepage().'
 </div>
 <div id="open-youtube" class="white-popup mfp-with-anim mfp-hide">

+ 7 - 1
js/functions.js

@@ -1771,6 +1771,7 @@ function buildDependencyCheck(orgdata){
 		$(json.data).appendTo($('.organizr-area'));
 		$(buildBrowserInfo()).appendTo($('#browser-info'));
 		$('#web-folder').html(buildWebFolder(orgdata));
+		$('#php-version-check').html(buildPHPCheck(orgdata));
 		$(buildDependencyInfo(orgdata)).appendTo($('#depenency-info'));
 	}).fail(function(xhr) {
 		console.error("Organizr Function: Dependencies Connection Failed");
@@ -1792,7 +1793,12 @@ function buildWebFolder(arrayItems){
 	var className = (writable == 'Writable - All Good') ? 'bg-primary' : 'bg-danger text-warning';
 	$('#web-folder').addClass(className);
 	return writable;
-
+}
+function buildPHPCheck(arrayItems){
+	var phpTest = (arrayItems.data.status.minVersion == 'yes') ? 'PHP Version Approved' : 'Upgrade PHP Version to 7.0';
+	var className = (arrayItems.data.status.minVersion == 'yes') ? 'bg-primary' : 'bg-danger text-warning';
+	$('#php-version-check').addClass(className);
+	return phpTest;
 }
 function buildBrowserInfo(){
 	var listing = '';