Dotclear

Changeset 2900:d12215a1a1e7 for inc


Ignore:
Timestamp:
01/04/15 14:31:37 (11 years ago)
Author:
Dsls
Branch:
feature/perblog_activation
Message:

First shot for per_blog settings for plugins, see #2041

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.modules.php

    r2708 r2900  
    117117          foreach ($this->modules as $id => $m) 
    118118          { 
     119               if ($m['perblog_activation'] && !$this->core->blog->settings->pluginsactivated->get($id)) { 
     120                    continue; 
     121               } 
    119122               if (file_exists($m['root'].'/_prepend.php')) 
    120123               { 
     
    184187                    'priority' => 1000, 
    185188                    'standalone_config' => false, 
    186                     'type' => null 
     189                    'type' => null, 
     190                    'perblog_activation' => false 
    187191               ), $properties 
    188192          ); 
     
    207211                    return; 
    208212               } 
     213          } 
     214 
     215          $this->core->blog->settings->addNamespace("pluginsactivated"); 
     216          # Per-blog activation settings 
     217          if ($properties['perblog_activation'] && ($this->core->blog->settings->pluginsactivated->get($this->id) === null)) { 
     218               $this->core->blog->settings->pluginsactivated->put($this->id,false,"boolean",sprintf(__('plugin "%s" activated'),$this->id),true,true); 
    209219          } 
    210220 
Note: See TracChangeset for help on using the changeset viewer.

Sites map