diff --git a/admin/index.php b/admin/index.php index fffeff0..4690bda 100644 --- a/admin/index.php +++ b/admin/index.php @@ -165,12 +165,13 @@ if ($user->isAuthenticated()) {

 

".__("A new gelato version has been released and is ready for download.")."
"; + if($conf->check_version){ + $present = version(); + $lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt"); + if ($present < $lastest) { + echo "
".__("A new gelato version has been released and is ready for download.")."

"; + } } - if (isset($_GET["deleted"])) { if ($_GET["deleted"]=="true") { echo "
".__("The post has been eliminated successfully.")."
"; diff --git a/admin/options.php b/admin/options.php index e1d09d1..f26c4a9 100644 --- a/admin/options.php +++ b/admin/options.php @@ -54,6 +54,11 @@ if ($user->isAdmin()) { header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror); die(); } + + if (!$tumble->saveOption($_POST["check_version"], "check_version")) { + header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror); + die(); + } header("Location: ".$conf->urlGelato."/admin/options.php?modified=true"); die(); @@ -222,6 +227,12 @@ if ($user->isAdmin()) { +
  • + +
  • diff --git a/classes/configuration.class.php b/classes/configuration.class.php index 41a2d84..6f1c256 100644 --- a/classes/configuration.class.php +++ b/classes/configuration.class.php @@ -30,6 +30,7 @@ class configuration extends Conexion_Mysql { var $offset_time; var $shorten_links; var $rssImportFrec; + var $check_version; function configuration() { parent::Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password); @@ -55,6 +56,7 @@ class configuration extends Conexion_Mysql { $this->allowComments = $this->get_option("allow_comments"); $this->shorten_links = $this->get_option("shorten_links"); $this->rssImportFrec = $this->get_option("rss_import_frec"); + $this->check_version = $this->get_option("check_version"); } else { if($isFeed) { diff --git a/update.php b/update.php index 79c7299..b312b07 100644 --- a/update.php +++ b/update.php @@ -34,6 +34,10 @@ $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 m $db->ejecutarConsulta($sqlStr); +$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('check_version', '1');"; + +$db->ejecutarConsulta($sqlStr); + $sqlStr = "CREATE TABLE `".Table_prefix."feeds` ( `id_feed` int(11) NOT NULL auto_increment, `url` varchar(255) NOT NULL,