aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-06-29 14:29:48 +0000
committermistic100 <mistic@piwigo.org>2012-06-29 14:29:48 +0000
commitd4402725e150a3b4721749206bf1196d17d54f52 (patch)
treee463bc91c979e7e345863ac0a041c53c24c8abf6 /admin/include
parenta05c8c538a6a1a907dade83fc6c8e3b66bf6253f (diff)
incompatible plugins check doesn't work since 2.4, because version number format has changed
git-svn-id: http://piwigo.org/svn/trunk@16177 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include')
-rw-r--r--admin/include/plugins.class.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php
index 654b17b47..65e22b7b1 100644
--- a/admin/include/plugins.class.php
+++ b/admin/include/plugins.class.php
@@ -275,7 +275,16 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\'';
{
$version = $pem_versions[0]['name'];
}
- $branch = substr($version, 0, strrpos($version, '.'));
+
+ if (substr_count($version, '.') > 1)
+ {
+ $branch = substr($version, 0, strrpos($version, '.'));
+ }
+ else
+ {
+ $branch = $version;
+ }
+
foreach ($pem_versions as $pem_version)
{
if (strpos($pem_version['name'], $branch) === 0)