]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Minify/MinifyPlugin.php
plugins onAutoload now only overloads if necessary (extlibs etc.)
[quix0rs-gnu-social.git] / plugins / Minify / MinifyPlugin.php
index 13010e75a175f86ffb7db0803bac0ca609ae7699..9a1f4110d1c12fe6a53fab2f7b61d015cfdf5dd7 100644 (file)
@@ -51,7 +51,6 @@ class MinifyPlugin extends Plugin
      *
      * @return boolean hook return
      */
-
     function onStartInitializeRouter($m)
     {
         $m->connect('main/min',
@@ -59,18 +58,6 @@ class MinifyPlugin extends Plugin
         return true;
     }
 
-    function onAutoload($cls)
-    {
-        switch ($cls)
-        {
-         case 'MinifyAction':
-            require_once(INSTALLDIR.'/plugins/Minify/' . strtolower(mb_substr($cls, 0, -6)) . '.php');
-            return false;
-         default:
-            return true;
-        }
-    }
-
     function onLoginAction($action, &$login)
     {
         switch ($action)
@@ -119,9 +106,9 @@ class MinifyPlugin extends Plugin
     function onStartInlineScriptElement($action,&$code,&$type)
     {
         if($this->minifyInlineJs && $type=='text/javascript'){
-            $c = common_memcache();
+            $c = Cache::instance();
             if (!empty($c)) {
-                $cacheKey = common_cache_key(self::cacheKey . ':' . crc32($code));
+                $cacheKey = Cache::key(self::cacheKey . ':' . crc32($code));
                 $out = $c->get($cacheKey);
             }
             if(empty($out)) {
@@ -139,9 +126,9 @@ class MinifyPlugin extends Plugin
     function onStartStyleElement($action,&$code,&$type,&$media)
     {
         if($this->minifyInlineCss && $type=='text/css'){
-            $c = common_memcache();
+            $c = Cache::instance();
             if (!empty($c)) {
-                $cacheKey = common_cache_key(self::cacheKey . ':' . crc32($code));
+                $cacheKey = Cache::key(self::cacheKey . ':' . crc32($code));
                 $out = $c->get($cacheKey);
             }
             if(empty($out)) {
@@ -177,8 +164,8 @@ class MinifyPlugin extends Plugin
                             'author' => 'Craig Andrews',
                             'homepage' => 'http://status.net/wiki/Plugin:Minify',
                             'rawdescription' =>
-                            _m('The Minify plugin minifies your CSS and Javascript, removing whitespace and comments.'));
+                            // TRANS: Plugin description.
+                            _m('The Minify plugin minifies StatusNet\'s CSS and JavaScript, removing whitespace and comments.'));
         return true;
     }
 }
-