Просмотр исходного кода

Suppression des warnings liés à filemtime

ajout de "@" pour éviter les warnings, touch.txt sera créé un peu plus
tard
Marien Fressinaud 12 лет назад
Родитель
Сommit
97c3c7575a
3 измененных файлов с 13 добавлено и 11 удалено
  1. 5 5
      app/App_FrontController.php
  2. 2 2
      app/controllers/indexController.php
  3. 6 4
      public/index.php

+ 5 - 5
app/App_FrontController.php

@@ -54,18 +54,18 @@ class App_FrontController extends FrontController {
 		$theme = RSSThemes::get_infos($this->conf->theme());
 		if ($theme) {
 			foreach($theme["files"] as $file) {
-				View::appendStyle (Url::display ('/themes/' . $theme['path'] . '/' . $file . '?' . filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file)));
+				View::appendStyle (Url::display ('/themes/' . $theme['path'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['path'] . '/' . $file)));
 			}
 		}
-		View::appendStyle (Url::display ('/themes/printer/style.css?' . filemtime(PUBLIC_PATH . '/themes/printer/style.css')), 'print');
+		View::appendStyle (Url::display ('/themes/printer/style.css?' . @filemtime(PUBLIC_PATH . '/themes/printer/style.css')), 'print');
 		if (login_is_conf ($this->conf)) {
 			View::appendScript ('https://login.persona.org/include.js');
 		}
-		View::appendScript (Url::display ('/scripts/jquery.min.js?' . filemtime(PUBLIC_PATH . '/scripts/jquery.min.js')));
+		View::appendScript (Url::display ('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js')));
 		if ($this->conf->lazyload () === 'yes' && ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader')) {
-			View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js?' . filemtime(PUBLIC_PATH . '/scripts/jquery.lazyload.min.js')));
+			View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.lazyload.min.js')));
 		}
-		View::appendScript (Url::display ('/scripts/main.js?' . filemtime(PUBLIC_PATH . '/scripts/main.js')));
+		View::appendScript (Url::display ('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js')));
 	}
 
 	private function loadNotifications () {

+ 2 - 2
app/controllers/indexController.php

@@ -49,10 +49,10 @@ class indexController extends ActionController {
 				Request::_param ('output', $output);
 			}
 
-			View::appendScript (Url::display ('/scripts/shortcut.js?' . filemtime(PUBLIC_PATH . '/scripts/shortcut.js')));
+			View::appendScript (Url::display ('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js')));
 
 			if ($output == 'global') {
-				View::appendScript (Url::display ('/scripts/global_view.js?' . filemtime(PUBLIC_PATH . '/scripts/global_view.js')));
+				View::appendScript (Url::display ('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js')));
 			}
 		}
 

+ 6 - 4
public/index.php

@@ -30,11 +30,13 @@ if (file_exists (PUBLIC_PATH . '/install.php')) {
 } else {
 	session_cache_limiter('');
 	require (LIB_PATH . '/http-conditional.php');
-	$dateLastModification = max(filemtime(PUBLIC_PATH . '/data/touch.txt'),
+	$dateLastModification = max(
+		@filemtime(PUBLIC_PATH . '/data/touch.txt'),
 		@filemtime(LOG_PATH . '/application.log'),
-		filemtime(PUBLIC_PATH . '/data/Configuration.array.php'),
-		filemtime(APP_PATH . '/configuration/application.ini'),
-		time() - 14400);
+		@filemtime(PUBLIC_PATH . '/data/Configuration.array.php'),
+		@filemtime(APP_PATH . '/configuration/application.ini'),
+		time() - 14400
+	);
 	if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
 		exit();	//No need to send anything
 	}