aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
Diffstat (limited to 'admin/include')
-rw-r--r--admin/include/languages.class.php2
-rw-r--r--admin/include/plugins.class.php11
-rw-r--r--admin/include/themes.class.php2
-rw-r--r--admin/include/updates.class.php2
4 files changed, 4 insertions, 13 deletions
diff --git a/admin/include/languages.class.php b/admin/include/languages.class.php
index 3698de2bf..7ef3bc6b1 100644
--- a/admin/include/languages.class.php
+++ b/admin/include/languages.class.php
@@ -234,7 +234,7 @@ UPDATE '.USER_INFOS_TABLE.'
{
$version = $pem_versions[0]['name'];
}
- $branch = substr($version, 0, strrpos($version, '.'));
+ $branch = get_branch_from_version($version);
foreach ($pem_versions as $pem_version)
{
if (strpos($pem_version['name'], $branch) === 0)
diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php
index 65e22b7b1..5d44179e6 100644
--- a/admin/include/plugins.class.php
+++ b/admin/include/plugins.class.php
@@ -275,16 +275,7 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\'';
{
$version = $pem_versions[0]['name'];
}
-
- if (substr_count($version, '.') > 1)
- {
- $branch = substr($version, 0, strrpos($version, '.'));
- }
- else
- {
- $branch = $version;
- }
-
+ $branch = get_branch_from_version($version);
foreach ($pem_versions as $pem_version)
{
if (strpos($pem_version['name'], $branch) === 0)
diff --git a/admin/include/themes.class.php b/admin/include/themes.class.php
index dd783d7aa..cb754a099 100644
--- a/admin/include/themes.class.php
+++ b/admin/include/themes.class.php
@@ -471,7 +471,7 @@ SELECT
{
$version = $pem_versions[0]['name'];
}
- $branch = substr($version, 0, strrpos($version, '.'));
+ $branch = get_branch_from_version($version);
foreach ($pem_versions as $pem_version)
{
if (strpos($pem_version['name'], $branch) === 0)
diff --git a/admin/include/updates.class.php b/admin/include/updates.class.php
index 3a81fbb0f..0ec0e0c40 100644
--- a/admin/include/updates.class.php
+++ b/admin/include/updates.class.php
@@ -63,7 +63,7 @@ class updates
{
$version = $pem_versions[0]['name'];
}
- $branch = substr($version, 0, strrpos($version, '.'));
+ $branch = get_branch_from_version($version);
foreach ($pem_versions as $pem_version)
{
if (strpos($pem_version['name'], $branch) === 0)