X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fplugin.php;h=04df51f824206a843e12257d168a249bbe3e6222;hb=8a4bec811b07a0ed9d76d0aceb03855c91a67242;hp=42339137526a136db70c882bf73d7d953b1e813a;hpb=1e89540c3f52f95e9224d781c01b2c927d3c3f09;p=quix0rs-gnu-social.git diff --git a/lib/plugin.php b/lib/plugin.php index 4233913752..04df51f824 100644 --- a/lib/plugin.php +++ b/lib/plugin.php @@ -144,6 +144,9 @@ class Plugin // @fixme this will fail for things installed in local/plugins // ... but then so will web links so far. $path = INSTALLDIR . "/plugins/$name/locale"; + if (!file_exists($path)) { + $path = INSTALLDIR . "/local/plugins/$name/locale"; + } } if (file_exists($path) && is_dir($path)) { bindtextdomain($name, $path); @@ -178,7 +181,7 @@ class Plugin . ' (' . get_class($this) . ' v' . $this->version() . ')'; } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $name = $this->name(); @@ -196,16 +199,14 @@ class Plugin static function staticPath($plugin, $relative) { - $isHTTPS = GNUsocial::isHTTPS(); - - if ($isHTTPS) { + if (GNUsocial::useHTTPS()) { $server = common_config('plugins', 'sslserver'); } else { $server = common_config('plugins', 'server'); } if (empty($server)) { - if ($isHTTPS) { + if (GNUsocial::useHTTPS()) { $server = common_config('site', 'sslserver'); } if (empty($server)) { @@ -213,7 +214,7 @@ class Plugin } } - if ($isHTTPS) { + if (GNUsocial::useHTTPS()) { $path = common_config('plugins', 'sslpath'); } else { $path = common_config('plugins', 'path'); @@ -236,7 +237,7 @@ class Plugin $path = '/'.$path; } - $protocol = ($isHTTPS) ? 'https' : 'http'; + $protocol = GNUsocial::useHTTPS() ? 'https' : 'http'; return $protocol.'://'.$server.$path.$plugin.'/'.$relative; }