*
* @return boolean hook return
*/
-
function onStartInitializeRouter($m)
{
$m->connect('main/min',
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)
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)) {
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)) {
'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;
}
}
-