Skip to content

Commit

Permalink
feeds are now scanned to see if conversion is needed in the setup.php…
Browse files Browse the repository at this point in the history
… script - resulting in a notification if they do
  • Loading branch information
Trystan committed Jun 29, 2012
1 parent 35d35b0 commit f879102
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conv.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$e = db_connect();

require "Models/feed_model.php";
//$feeds = get_all_feeds();
$feeds = get_all_feeds();
//$feeds = get_user_feed_ids(1);

foreach ($feeds as $feed)
Expand Down Expand Up @@ -147,4 +147,4 @@
}

}
?>
?>
15 changes: 15 additions & 0 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,20 @@
next($schema);
}
$out .= "</table>";

// Test for feed conversion requirement
$runconv = false;
require "Models/feed_model.php";
$feeds = get_all_feeds();
foreach ($feeds as $feed)
{
$feedname = "feed_" . trim($feed['id']) . "";
$result = db_query("DESCRIBE $feedname time");
$row = db_fetch_array($result);
if ($row['Type'] == "datetime") $runconv = true;
}
if ($runconv==true) echo "<p>You have feeds that need converting from datetime format to indexed timestamp. This improves performance. Its best to backup your data before conversion, then once your ready run: emoncms3/conv.php</p>";

echo $out;

?>

0 comments on commit f879102

Please sign in to comment.