diff --git a/private/bin/importOldData.php b/private/bin/importOldData.php index 2f6d260..8fd47a3 100644 --- a/private/bin/importOldData.php +++ b/private/bin/importOldData.php @@ -31,10 +31,13 @@ else { GlobalVariables::get("dao")->save($admin); } +$count = 0; $imgDir = "/home/r.didato/mediaimg/notizie"; -$statement = $pdo->query("select * from notizia order by id desc limit 0,100"); +$statement = $pdo->query("select * from notizia order by id desc limit $count,100"); $dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass"); -// while (is_array($dati) && sizeof($dati)==0){ + +while (is_array($dati) && sizeof($dati)>0){ + foreach ($dati as $ele){ $notizia = new stdClass(); $notizia->status = NotiziaModel::STATUS_ACCEPTED; @@ -130,6 +133,9 @@ $dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass"); // } } -// } + $count+=100; + $statement = $pdo->query("select * from notizia order by id desc limit $count,100"); + $dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass"); +} ?> \ No newline at end of file diff --git a/private/crontab/core.hourly.php b/private/crontab/core.hourly.php index 8c259c5..cb0c65e 100644 --- a/private/crontab/core.hourly.php +++ b/private/crontab/core.hourly.php @@ -2,7 +2,7 @@ 0){ foreach ($tasks as $taskName){ diff --git a/private/lib/FDN_MailHelper.php b/private/lib/FDN_MailHelper.php index 3522c6d..2ecce69 100644 --- a/private/lib/FDN_MailHelper.php +++ b/private/lib/FDN_MailHelper.php @@ -9,13 +9,13 @@ class FDN_MailHelper { public static function generateMailFooter(){ $footer = '








