Commit 176785ae authored by Ayolo's avatar Ayolo

fatal_partial

parent 6a227d20
...@@ -40,7 +40,7 @@ $site->add_contents($cts); ...@@ -40,7 +40,7 @@ $site->add_contents($cts);
$cts = new contents("Planning"); $cts = new contents("Planning");
if ( $_REQUEST["action"] == "setplanning" ) if ( is_dir("/var/www/ae/www/ae2/var/img") && $_REQUEST["action"] == "setplanning" )
{ {
$dest_small = "/var/www/ae/www/ae2/var/img/com/planning-small.jpg"; $dest_small = "/var/www/ae/www/ae2/var/img/com/planning-small.jpg";
$dest_diapo = "/var/www/ae/www/ae2/var/img/com/planning-diapo.jpg"; $dest_diapo = "/var/www/ae/www/ae2/var/img/com/planning-diapo.jpg";
...@@ -99,7 +99,7 @@ $site->add_contents($cts); ...@@ -99,7 +99,7 @@ $site->add_contents($cts);
$cts = new contents("Photo de la semaine"); $cts = new contents("Photo de la semaine");
if ( $_REQUEST["action"] == "setweekly_photo" ) if ( is_dir("/var/www/ae/www/ae2/var/img") && $_REQUEST["action"] == "setweekly_photo" )
{ {
$dest_small = "/var/www/ae/www/ae2/var/img/com/weekly_photo-small.jpg"; $dest_small = "/var/www/ae/www/ae2/var/img/com/weekly_photo-small.jpg";
$dest_diapo = "/var/www/ae/www/ae2/var/img/com/weekly_photo-diapo.jpg"; $dest_diapo = "/var/www/ae/www/ae2/var/img/com/weekly_photo-diapo.jpg";
......
...@@ -114,7 +114,7 @@ else if ( isset($_REQUEST["id_asso"]) ) ...@@ -114,7 +114,7 @@ else if ( isset($_REQUEST["id_asso"]) )
} }
} }
else if ( $_REQUEST['action'] == "setlogo" ) else if ( is_dir("/var/www/ae/www/ae2/var/img") && $_REQUEST['action'] == "setlogo" )
{ {
if ( is_uploaded_file($_FILES['logofile']['tmp_name']) ) if ( is_uploaded_file($_FILES['logofile']['tmp_name']) )
{ {
......
...@@ -19,17 +19,19 @@ require_once($topdir. "include/lib/magpierss/rss_fetch.inc.php"); ...@@ -19,17 +19,19 @@ require_once($topdir. "include/lib/magpierss/rss_fetch.inc.php");
$site = new site (); $site = new site ();
// Tâche 1 [planet] : mettre à jour le cache // Tâche 1 [planet] : mettre à jour le cache
$req = new requete($site->db,"SELECT `url` FROM `planet_flux` WHERE `modere`='1'"); if(is_dir(MAGPIE_CACHE_DIR))
while ( list($url) = $req->get_row() ) {
$rs=fetch_rss($url); $req = new requete($site->db,"SELECT `url` FROM `planet_flux` WHERE `modere`='1'");
while ( list($url) = $req->get_row() )
// Tâche 1 [planet] : nettoyage du cache $rs=fetch_rss($url);
$cache = opendir(MAGPIE_CACHE_DIR);
while ($file = readdir($cache)) // Tâche 1 [planet] : nettoyage du cache
if ( is_file(MAGPIE_CACHE_DIR.$file) && filemtime(MAGPIE_CACHE_DIR.$file) < (time()-MAGPIE_CACHE_AGE) ) $cache = opendir(MAGPIE_CACHE_DIR);
unlink(MAGPIE_CACHE_DIR.$file); while ($file = readdir($cache))
closedir($cache); if ( is_file(MAGPIE_CACHE_DIR.$file) && filemtime(MAGPIE_CACHE_DIR.$file) < (time()-MAGPIE_CACHE_AGE) )
unlink(MAGPIE_CACHE_DIR.$file);
closedir($cache);
}
// Tâche 2 [galaxy] : màj, et cycles // Tâche 2 [galaxy] : màj, et cycles
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment