check_plugin_version
This commit is contained in:
parent
58bb8f7244
commit
079c2cc067
2 changed files with 21 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ class Extension extends Menu_Ref_sql
|
|||
' Veuillez mettre votre programme a jour. Version minimum '.$i);
|
||||
exit();
|
||||
}
|
||||
Extension::check_plugin_version();
|
||||
}
|
||||
function insert_plugin()
|
||||
{
|
||||
|
|
@ -162,5 +163,24 @@ class Extension extends Menu_Ref_sql
|
|||
}
|
||||
}
|
||||
}
|
||||
static function check_plugin_version()
|
||||
{
|
||||
global $g_user,$version_plugin;
|
||||
if ($g_user->Admin() == 1)
|
||||
{
|
||||
if (SITE_UPDATE_PLUGIN != "")
|
||||
{
|
||||
$update = @file_get_contents(SITE_UPDATE_PLUGIN);
|
||||
if ($update > $version_plugin)
|
||||
{
|
||||
echo '<div class="inner_box" style="margin-left:0px;margin-top:3px;left:3px">';
|
||||
echo '<p class="notice">';
|
||||
echo "Mise à jour disponible des plugin PhpCompta version actuelle : $update votre version $version_plugin";
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ define ("DEBUG",true);
|
|||
// If you don't want to be notified of the update
|
||||
// define ("SITE_UPDATE",'');
|
||||
define ("SITE_UPDATE",'http://www.phpcompta.eu/last_version.txt');
|
||||
define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/last_version.txt');
|
||||
|
||||
|
||||
//$version_phpcompta=4985;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue