New option for checking version
parent
2af661fde5
commit
d1aaffd10e
|
|
@ -165,12 +165,13 @@ if ($user->isAuthenticated()) {
|
|||
</ul>
|
||||
<p> </p>
|
||||
<?php
|
||||
$present = version();
|
||||
$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
|
||||
if ($present < $lastest) {
|
||||
echo "<div class=\"information\" id=\"update\">".__("A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.")."</div><br />";
|
||||
if($conf->check_version){
|
||||
$present = version();
|
||||
$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
|
||||
if ($present < $lastest) {
|
||||
echo "<div class=\"information\" id=\"update\">".__("A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.")."</div><br />";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET["deleted"])) {
|
||||
if ($_GET["deleted"]=="true") {
|
||||
echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been eliminated successfully.")."</div>";
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ if ($user->isAdmin()) {
|
|||
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();
|
||||
} else {
|
||||
|
|
@ -222,6 +227,12 @@ if ($user->isAdmin()) {
|
|||
<option value="1 day" <?php if($conf->rssImportFrec == '1 day') echo "selected=\"selected\""; ?>>24 <?php echo __("hours");?></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select"><label for="check_version"><?php echo __("Check for updates:")?></label>
|
||||
<select name="check_version" id="check_version">
|
||||
<option value="1" <?php if($conf->check_version) echo "selected=\"selected\""; ?>><?php echo __("Active")?></option>
|
||||
<option value="0" <?php if(!$conf->check_version) echo "selected=\"selected\""; ?>><?php echo __("Deactive")?></option>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue