aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)