Dotclear

Changeset 855:990bdbb122aa


Ignore:
Timestamp:
08/01/12 11:36:53 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
sexy
Message:

Oops

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin/plugins.php

    r854 r855  
    227227     echo 
    228228     '<h3>'.__('Activated plugins').'</h3>'. 
    229      '<table class="clear plugins"><tr>'. 
    230      '<th>'.__('Plugin').'</th>'. 
    231      '<th class="nowrap">'.__('Version').'</th>'. 
    232      '<th class="nowrap">'.__('Details').'</th>'. 
    233      '<th class="nowrap">'.__('Action').'</th>'. 
    234      '</tr>'; 
     229     '<table class="clear plugins">'. 
     230     '<caption>'.__('Activated plugin list').'</caption>'. 
     231     '<thead><tr>'. 
     232     '<th scope="col">'.__('Plugin').'</th>'. 
     233     '<th scope="col" class="nowrap">'.__('Version').'</th>'. 
     234     '<th scope="col" class="nowrap">'.__('Details').'</th>'. 
     235     '<th scope="col" class="nowrap">'.__('Action').'</th>'. 
     236     '</tr></thead>'. 
     237     '<tbody>'; 
    235238      
    236239     foreach ($p_available as $k => $v) 
    237240     { 
    238  
    239241          $is_deletable = $is_writable && preg_match('!^'.$p_path_pat.'!',$v['root']); 
    240242          $is_deactivable = $v['root_writable']; 
     
    242244          echo 
    243245          '<tr class="line wide">'. 
    244           '<td class="minimal nowrap"><strong>'.html::escapeHTML($k).'</strong></td>'. 
     246          '<th scope="row" class="minimal nowrap"><strong>'.html::escapeHTML($k).'</strong></th>'. 
    245247          '<td class="minimal">'.html::escapeHTML($v['version']).'</td>'. 
    246248          '<td class="maximal"><strong>'.html::escapeHTML($v['name']).'</strong> '. 
    247           '<br />'.html::escapeHTML($v['desc']); 
    248           echo '</td>'. 
     249          '<br />'.html::escapeHTML($v['desc']).'</td>'. 
    249250          '<td class="nowrap action">'; 
    250251           
     
    267268     } 
    268269     echo 
     270     '</tbody>'. 
    269271     '</table>'; 
    270272} 
     
    276278     echo 
    277279     '<h3>'.__('Deactivated plugins').'</h3>'. 
    278      '<table class="clear plugins"><tr>'. 
    279      '<th>'.__('Plugin').'</th>'. 
    280      '<th class="nowrap">'.__('Action').'</th>'. 
    281      '</tr>'; 
     280     '<table class="clear plugins">'. 
     281     '<caption>'.__('Deactivated plugin list').'</caption>'. 
     282     '<thead><tr>'. 
     283     '<th scope="col">'.__('Plugin').'</th>'. 
     284     '<th scope="col" class="nowrap">'.__('Action').'</th>'. 
     285     '</tr></thead>'. 
     286     '<tbody>'; 
    282287      
    283288     foreach ($p_disabled as $k => $v) 
    284289     { 
    285           $dep = $core->plugins->getUnmatchedDependencies($k); print_r($dep); 
    286           $invalid=(count($dep) > 0); 
    287  
    288290          $is_deletable = $is_writable && preg_match('!^'.$p_path_pat.'!',$v['root']); 
    289           $is_activable = !$invalid && $v['root_writable']; 
     291          $is_activable = $v['root_writable']; 
    290292           
    291293          echo 
    292           '<tr class="line wide'.($invalid ? " error" : "").'">'. 
    293           '<td class="maximal nowrap"><strong>'.html::escapeHTML($k).'</strong>'; 
    294           if ($invalid) { 
    295                echo '<br /><span style="color:#c00"><strong>'.__('Unmet dependencies: ').'</strong>'. 
    296                     join(', ',$dep).'</span>'; 
    297           } 
    298           echo '</td>'; 
    299  
     294          '<tr class="line wide">'. 
     295          '<th scope="row" class="maximal nowrap"><strong>'.html::escapeHTML($k).'</strong></th>'. 
    300296          '<td class="nowrap action">'; 
    301297           
     
    319315     } 
    320316     echo 
     317     '</tbody>'. 
    321318     '</table>'; 
    322319} 
  • inc/core/class.dc.modules.php

    r854 r855  
    323323     } 
    324324      
    325      public function getUnmatchedDependencies($id) { 
    326           if (isset($this->modules[$id])){ 
    327                $mod = $this->modules[$id]; 
    328           } elseif (isset($this->disabled[$id])) { 
    329                $mod = $this->disabled[$id]; 
    330           } else { 
    331                return array(); 
    332           } 
    333           if (!isset($mod['depends'])) { 
    334                return array(); 
    335           } 
    336           $failures=array(); 
    337           $deps = $mod['depends']; 
    338           foreach ($deps as $n => $v) { 
    339                if (is_array($v)) { 
    340                     $min_ver = $v[0]; 
    341                     $max_ver = $v[1]; 
    342                     $ver_txt = sprintf(__('%s&lt;=%s&lt;=%s'),$min_ver,$n,$max_ver); 
    343                } else { 
    344                     $min_ver = $v; 
    345                     $max_ver = ''; 
    346                     $ver_txt = sprintf(__('%s&gt;=%s'),$n,$min_ver); 
    347                } 
    348                if (!isset($this->modules[$n])) { 
    349                     $failures[$n] = sprintf(__('%s (missing)'),$ver_txt); 
    350                } else { 
    351                     $modver = $mod['version']; 
    352                     if ((($min_ver != '' ) && version_compare($modver, $minver,'<')) 
    353                          || (($max_ver != '' ) && version_compare($modver, $maxver,'>'))){ 
    354                          $failures[$n] = sprintf(__('%s (current : %s)'),$ver_txt,$modver); 
    355                     } 
    356                } 
    357           } 
    358           return $failures; 
    359      } 
    360       
    361325     /** 
    362326     This method installs module with ID <var>$id</var> and having a _install 
  • plugins/antispam/_define.php

    r854 r855  
    1919     array( 
    2020          'permissions' =>    'usage,contentadmin', 
    21           'depends' => array ( 
    22                'comments' => '1.0' 
    23           ), 
    2421          'priority' =>       10 
    2522     ) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map