Changeset 2208


Ignore:
Timestamp:
Feb 13, 2008, 9:13:12 PM (16 years ago)
Author:
rub
Message:

Resolved issue 0000792: Admin "intro" : Integrity control bypass

Some sentences must be re-write ;-)

Location:
trunk
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_check_integrity.inc.php

    r2104 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    3333function check_integrity()
    3434{
    35   global $page, $header_notes;
    36 
    37   add_event_handler('get_check_integrity', 'c13y_exif');
    38   add_event_handler('get_check_integrity', 'c13y_user');
    39 
    40   $page['check_integrity'] = array();
    41   $page['check_integrity'] = trigger_event('get_check_integrity',
    42                                 $page['check_integrity']);
    43 
    44   if (count($page['check_integrity']) > 0)
     35  global $page, $header_notes, $conf;
     36
     37  // Ignore list
     38  $conf_c13y_ignore = unserialize($conf['c13y_ignore']);
     39  if (
     40        is_array($conf_c13y_ignore) and
     41        isset($conf_c13y_ignore['version']) and
     42        ($conf_c13y_ignore['version'] == PHPWG_VERSION) and
     43        is_array($conf_c13y_ignore['list'])
     44      )
     45  {
     46    $ignore_list_changed = false;
     47    $page['check_integrity']['ignore_list'] = $conf_c13y_ignore['list'];
     48  }
     49  else
     50  {
     51    $ignore_list_changed = true;
     52    $page['check_integrity']['ignore_list'] = array();
     53  }
     54
     55  // Retrieve list
     56  $page['check_integrity']['list'] = array();
     57  $page['check_integrity']['build_ignore_list'] = array();
     58
     59  add_event_handler('list_check_integrity', 'c13y_exif');
     60  add_event_handler('list_check_integrity', 'c13y_user');
     61  trigger_action('list_check_integrity');
     62
     63  // Information
     64  if (count($page['check_integrity']['list']) > 0)
    4565  {
    4666    $header_notes[] =
    4767      l10n_dec('c13y_anomaly_count', 'c13y_anomalies_count',
    48         count($page['check_integrity']));
    49   }
    50 
     68        count($page['check_integrity']['list']));
     69  }
     70
     71  // Treatments
    5172  if (!is_adviser())
    5273  {
    53     if (isset($_POST['c13y_submit']) and isset($_POST['c13y_selection']))
     74    if (isset($_POST['c13y_submit_correction']) and isset($_POST['c13y_selection']))
    5475    {
    5576      $corrected_count = 0;
    5677      $not_corrected_count = 0;
    5778
    58       foreach ($page['check_integrity'] as $i => $c13y)
     79      foreach ($page['check_integrity']['list'] as $i => $c13y)
    5980      {
    6081        if (!empty($c13y['correction_fct']) and
     
    7596            $args = array();
    7697          }
    77           $page['check_integrity'][$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
     98          $page['check_integrity']['list'][$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
    7899         
    79           if ($page['check_integrity'][$i]['corrected'])
     100          if ($page['check_integrity']['list'][$i]['corrected'])
    80101          {
    81102            $corrected_count += 1;
     
    101122      }
    102123    }
     124    else
     125    {
     126      if (isset($_POST['c13y_submit_ignore']) and isset($_POST['c13y_selection']))
     127      {
     128        $ignored_count = 0;
     129
     130        foreach ($page['check_integrity']['list'] as $i => $c13y)
     131        {
     132          if (in_array($c13y['id'], $_POST['c13y_selection']))
     133          {
     134            $page['check_integrity']['build_ignore_list'][] = $c13y['id'];
     135            $page['check_integrity']['list'][$i]['ignored'] = true;
     136            $ignored_count += 1;
     137          }
     138        }
     139
     140        if ($ignored_count > 0)
     141        {
     142          $page['infos'][] =
     143            l10n_dec('c13y_anomaly_ignored_count', 'c13y_anomalies_ignored_count',
     144              $ignored_count);
     145        }
     146      }
     147    }
     148  }
     149
     150  $ignore_list_changed =
     151    (
     152      ($ignore_list_changed) or
     153      (count(array_diff($page['check_integrity']['ignore_list'], $page['check_integrity']['build_ignore_list'])) > 0) or
     154      (count(array_diff($page['check_integrity']['build_ignore_list'], $page['check_integrity']['ignore_list'])) > 0)
     155      );
     156
     157  if ($ignore_list_changed)
     158  {
     159    c13y_update_conf($page['check_integrity']['build_ignore_list']);
    103160  }
    104161}
     
    114171  global $template, $page;
    115172
    116   $show_submit = false;
    117 
    118   if (isset($page['check_integrity']) and count($page['check_integrity']) > 0)
     173  $check_automatic_correction = false;
     174  $submit_automatic_correction = false;
     175  $submit_ignore = false;
     176
     177  if (isset($page['check_integrity']['list']) and count($page['check_integrity']['list']) > 0)
    119178  {
    120179    $template->set_filenames(array('check_integrity' => 'admin/check_integrity.tpl'));
    121180
    122     foreach ($page['check_integrity'] as $i => $c13y)
    123     {
     181    foreach ($page['check_integrity']['list'] as $i => $c13y)
     182    {
     183      $can_select = false;
     184
    124185      $template->assign_block_vars('c13y',
    125186        array(
     
    129190        ));
    130191
    131       if (!empty($c13y['correction_fct']))
    132       {
    133         if (isset($c13y['corrected']))
    134         {
    135           if ($c13y['corrected'])
    136           {
    137             $template->assign_block_vars('c13y.correction_success_fct', array());
     192
     193      if (isset($c13y['ignored']))
     194      {
     195        if ($c13y['ignored'])
     196        {
     197          $template->assign_block_vars('c13y.ignore_msg', array());
     198        }
     199        else
     200        {
     201          die('$c13y[\'ignored\'] cannot be false');
     202        }
     203      }
     204      else
     205      {
     206        if (!empty($c13y['correction_fct']))
     207        {
     208          if (isset($c13y['corrected']))
     209          {
     210            if ($c13y['corrected'])
     211            {
     212              $template->assign_block_vars('c13y.correction_success_fct', array());
     213            }
     214            else
     215            {
     216              $template->assign_block_vars('c13y.correction_error_fct',
     217                array('WIKI_FOROM_LINKS' => get_htlm_links_more_info()));
     218            }
     219          }
     220          else if ($c13y['is_callable'])
     221          {
     222            $template->assign_block_vars('c13y.correction_fct', array());
     223            $template->assign_block_vars('c13y_link_check_automatic_correction.c13y_do_check', array('ID' => $c13y['id']));
     224            $submit_automatic_correction = true;
     225            $can_select = true;
    138226          }
    139227          else
    140228          {
    141             $template->assign_block_vars('c13y.correction_error_fct',
    142               array('WIKI_FOROM_LINKS' => get_htlm_links_more_info()));
    143           }
    144         }
    145         else if ($c13y['is_callable'])
    146         {
    147           $template->assign_block_vars('c13y.correction_fct', array());
    148           $show_submit = true;
     229            $template->assign_block_vars('c13y.correction_bad_fct', array());
     230            $can_select = true;
     231          }
    149232        }
    150233        else
    151234        {
    152           $template->assign_block_vars('c13y.correction_bad_fct', array());
    153         }
    154       }
    155 
    156       if (!empty($c13y['correction_fct']) and !empty($c13y['correction_msg']))
    157       {
    158         $template->assign_block_vars('c13y.br', array());
    159       }
    160 
    161       if (!empty($c13y['correction_msg']) and !isset($c13y['corrected']))
    162       {
    163         $template->assign_block_vars('c13y.correction_msg',
    164           array(
    165            'DATA' => nl2br($c13y['correction_msg'])
    166           ));
    167       }
    168     }
    169 
    170     if ($show_submit)
    171     {
    172       $template->assign_block_vars('c13y_submit', array());
     235          $can_select = true;
     236        }
     237
     238        if (!empty($c13y['correction_fct']) and !empty($c13y['correction_msg']))
     239        {
     240          $template->assign_block_vars('c13y.br', array());
     241        }
     242
     243        if (!empty($c13y['correction_msg']) and !isset($c13y['corrected']))
     244        {
     245          $template->assign_block_vars('c13y.correction_msg',
     246            array(
     247             'DATA' => nl2br($c13y['correction_msg'])
     248            ));
     249        }
     250      }
     251
     252      if ($can_select)
     253      {
     254        $template->assign_block_vars('c13y.can_select', array());
     255        $submit_ignore = true;
     256      }
     257    }
     258
     259    if ($submit_automatic_correction)
     260    {
     261      $template->assign_block_vars('c13y_submit_automatic_correction', array());
     262    }
     263
     264    if ($submit_ignore)
     265    {
     266      $template->assign_block_vars('c13y_link_check_uncheck', array());
     267      $template->assign_block_vars('c13y_submit_ignore', array());
    173268    }
    174269
     
    183278 * @return c13y anomaly array
    184279 */
    185 function get_c13y($anomaly, $correction_fct = null, $correction_fct_args = null, $correction_msg = null)
    186 {
    187   return
    188     array(
    189       'id' => md5($anomaly.$correction_fct.serialize($correction_fct_args).$correction_msg),
    190       'anomaly' => $anomaly,
    191       'correction_fct' => $correction_fct,
    192       'correction_fct_args' => $correction_fct_args,
    193       'correction_msg' => $correction_msg,
    194       'is_callable' => is_callable($correction_fct));
     280function add_c13y($anomaly, $correction_fct = null, $correction_fct_args = null, $correction_msg = null)
     281{
     282  global $page;
     283
     284  $id = md5($anomaly.$correction_fct.serialize($correction_fct_args).$correction_msg);
     285
     286  if (in_array($id, $page['check_integrity']['ignore_list']))
     287  {
     288    $page['check_integrity']['build_ignore_list'][] = $id;
     289  }
     290  else
     291  {
     292    $page['check_integrity']['list'][] =
     293      array(
     294        'id' => $id,
     295        'anomaly' => $anomaly,
     296        'correction_fct' => $correction_fct,
     297        'correction_fct_args' => $correction_fct_args,
     298        'correction_msg' => $correction_msg,
     299        'is_callable' => is_callable($correction_fct));
     300  }
     301}
     302
     303/**
     304 * Update table config
     305 *
     306 * @param ignore list array
     307 * @return void
     308 */
     309function c13y_update_conf($ignore_list = array())
     310{
     311  $conf_c13y_ignore =  array();
     312  $conf_c13y_ignore['version'] = PHPWG_VERSION;
     313  $conf_c13y_ignore['list'] = $ignore_list;
     314  $query = 'update '.CONFIG_TABLE.' set value =\''.serialize($conf_c13y_ignore).'\'where param = \'c13y_ignore\';';
     315  pwg_query($query);
     316}
     317
     318/**
     319 * Apply maintenance
     320 *
     321 * @param void
     322 * @return void
     323 */
     324function c13y_maintenance()
     325{
     326  c13y_update_conf();
    195327}
    196328
     
    217349 * Check exif
    218350 *
    219  * @param c13y anomalies array
    220  * @return c13y anomalies array
    221  */
    222 function c13y_exif($c13y_array)
     351 * @param void
     352 * @return void
     353 */
     354function c13y_exif()
    223355{
    224356  global $conf;
     
    228360    if (($conf[$value]) and (!function_exists('read_exif_data')))
    229361    {
    230       $c13y_array[] = get_c13y(
     362      add_c13y(
    231363        sprintf(l10n('c13y_exif_anomaly'), '$conf[\''.$value.'\']'),
    232364        null,
     
    237369    }
    238370  }
    239 
    240   return $c13y_array;
    241371}
    242372
     
    244374 * Check user
    245375 *
    246  * @param c13y anomalies array
    247  * @return c13y anomalies array
    248  */
    249 function c13y_user($c13y_array)
     376 * @param void
     377 * @return void
     378 */
     379function c13y_user()
    250380{
    251381  global $conf;
     
    291421    if (!array_key_exists($id, $status))
    292422    {
    293       $c13y_array[] = get_c13y(l10n($data['l10n_non_existent']), 'c13y_correction_user',
     423      add_c13y(l10n($data['l10n_non_existent']), 'c13y_correction_user',
    294424        array('id' => $id, 'action' => 'creation'));
    295425    }
     
    297427    if (!empty($data['status']) and $status[$id] != $data['status'])
    298428    {
    299       $c13y_array[] = get_c13y(l10n($data['l10n_bad_status']), 'c13y_correction_user',
     429      add_c13y(l10n($data['l10n_bad_status']), 'c13y_correction_user',
    300430        array('id' => $id, 'action' => 'status'));
    301431    }
    302432  }
    303 
    304   return $c13y_array;
    305433}
    306434
  • trunk/admin/maintenance.php

    r2062 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    9898    break;
    9999  }
     100  case 'c13y' :
     101  {
     102    include_once(PHPWG_ROOT_PATH.'admin/include/functions_check_integrity.inc.php');
     103    c13y_maintenance();
     104    break;
     105  }
    100106  default :
    101107  {
     
    121127    'U_MAINT_FEEDS' => $start_url.'feeds',
    122128    'U_MAINT_DATABASE' => $start_url.'database',
     129    'U_MAINT_C13Y' => $start_url.'c13y',
    123130    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=maintenance',
    124131    )
  • trunk/install/config.sql

    r2032 r2208  
    2525INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded');
    2626INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('obligatory_user_mail_address','false','Mail address is obligatory for users');
     27INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('c13y_ignore',null,'List of ignored anomalies');
  • trunk/language/en_UK/admin.lang.php

    r2150 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    617617$lang['c13y_Correction_applied_success'] = 'Correction applied with success';
    618618$lang['c13y_Correction_applied_error'] = 'Correction applied with error';
    619 $lang['c13y_Apply_selected_corrections'] = 'Apply selected corrections';
    620619$lang['c13y_anomaly_count'] = '%d anomaly has been detected.';
    621620$lang['c13y_anomalies_count'] = '%d anomalies has been detected.';
     
    649648$lang['Level 4'] = 'Family';
    650649$lang['Level 8'] = 'Admins';
     650$lang['c13y_maintenance'] = 'Reinitialize check integrity';
     651$lang['c13y_check_all'] = 'Check all';
     652$lang['c13y_uncheck_all'] = 'Uncheck all';
     653$lang['c13y_check_auto'] = 'Check automatic corrections';
     654$lang['c13y_submit_correction'] = 'Apply selected corrections';
     655$lang['c13y_submit_ignore'] = 'Ignore selected anomalies';
     656$lang['c13y_submit_refresh'] = 'Refresh';
     657$lang['c13y_ignore_msg1'] = 'The anomaly will be ignored until next application version';
     658$lang['c13y_ignore_msg2'] = 'Correction the anomaly will cancel the fact that it\'s ignored';
     659$lang['c13y_anomaly_ignored_count'] = '%d anomaly has been ignored.';
     660$lang['c13y_anomalies_ignored_count'] = '%d anomalies has been ignored.';
     661
    651662?>
  • trunk/language/es_ES/admin.lang.php

    r2170 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    622622$lang['c13y_Correction_applied_success'] = 'Corrección lograda';
    623623$lang['c13y_Correction_applied_error'] = 'Corrección erronea';
    624 $lang['c13y_Apply_selected_corrections'] = 'Aplicar las correcciones seleccionadas';
    625624$lang['c13y_anomaly_count'] = '%d anomalía ha sido detectada.';
    626625$lang['c13y_anomalies_count'] = '%d anomalías han sido detectadas.';
     
    655654$lang['Level 4'] = 'Familia';
    656655$lang['Level 8'] = 'Admins';
     656/* TODO */ $lang['c13y_maintenance'] = 'Reinitialize check integrity';
     657$lang['c13y_check_all'] = 'Todo verificado';
     658$lang['c13y_uncheck_all'] = 'Soltar todo';
     659/* TODO */ $lang['c13y_check_auto'] = 'Check automatic corrections';
     660$lang['c13y_submit_correction'] = 'Aplicar las correcciones seleccionadas';
     661/* TODO */ $lang['c13y_submit_ignore'] = 'Ignore selected anomalies';
     662/* TODO */ $lang['c13y_submit_refresh'] = 'Refresh';
     663/* TODO */ $lang['c13y_ignore_msg1'] = 'The anomaly will be ignored until next application version';
     664/* TODO */ $lang['c13y_ignore_msg2'] = 'Correction the anomaly will cancel the fact that it\'s ignored';
     665/* TODO */ $lang['c13y_anomaly_ignored_count'] = '%d anomaly has been ignored.';
     666/* TODO */ $lang['c13y_anomalies_ignored_count'] = '%d anomalies has been ignored.';
     667
    657668?>
  • trunk/language/fr_FR/admin.lang.php

    r2172 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    618618$lang['c13y_Correction_applied_success'] = 'Correction appliquée avec succés';
    619619$lang['c13y_Correction_applied_error'] = 'Correction appliquée avec erreur';
    620 $lang['c13y_Apply_selected_corrections'] = 'Appliquer les corrections sélectionnées';
    621620$lang['c13y_anomaly_count'] = '%d anomalie a été détecté.';
    622621$lang['c13y_anomalies_count'] = '%d anomalies ont été détectées.';
     
    651650$lang['Level 4'] = 'Famille';
    652651$lang['Level 8'] = 'Admins';
     652$lang['c13y_maintenance'] = 'Réinitialiser les contrôles d\'intégrité';
     653$lang['c13y_check_all'] = 'Tout cocher';
     654$lang['c13y_uncheck_all'] = 'Tout décocher';
     655$lang['c13y_check_auto'] = 'Cocher les corrections automatiques';
     656$lang['c13y_submit_correction'] = 'Appliquer les corrections sélectionnées';
     657$lang['c13y_submit_ignore'] = 'Ignorer les anomalies sélectionnées';
     658$lang['c13y_submit_refresh'] = 'Rafraîchir';
     659$lang['c13y_ignore_msg1'] = 'L\'anomalie sera ignorée jusqu\'à la prochaine version de l\'application';
     660$lang['c13y_ignore_msg2'] = 'La correction de l\'anomalie annulera le fait qu\'elle soit ignorée';
     661$lang['c13y_anomaly_ignored_count'] = '%d anomalie a été ignorée.';
     662$lang['c13y_anomalies_ignored_count'] = '%d anomalies ont été ignorées.';
     663
    653664?>
  • trunk/language/nl_NL/admin.lang.php

    r2171 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    623623$lang['c13y_Correction_applied_success'] = 'Correctie die met succes is toegepast';
    624624$lang['c13y_Correction_applied_error'] = 'Correctie die met fout wordt toegepast';
    625 $lang['c13y_Apply_selected_corrections'] = 'Pas geselecteerde correcties toe';
    626625$lang['c13y_anomaly_count'] = '%d Onregelmatigheid ontdekt.';
    627626$lang['c13y_anomalies_count'] = '%d Onregelmatigheden ontdekt.';
     
    655654$lang['Level 4'] = 'Familie';
    656655$lang['Level 8'] = 'Admins';
     656/* TODO */ $lang['c13y_maintenance'] = 'Reinitialize check integrity';
     657$lang['c13y_check_all'] = 'Selecteer alles';
     658$lang['c13y_uncheck_all'] = 'Deselecteer alles';
     659/* TODO */ $lang['c13y_check_auto'] = 'Check automatic corrections';
     660$lang['c13y_submit_correction'] = 'Pas geselecteerde correcties toe';
     661/* TODO */ $lang['c13y_submit_ignore'] = 'Ignore selected anomalies';
     662/* TODO */ $lang['c13y_submit_refresh'] = 'Refresh';
     663/* TODO */ $lang['c13y_ignore_msg1'] = 'The anomaly will be ignored until next application version';
     664/* TODO */ $lang['c13y_ignore_msg2'] = 'Correction the anomaly will cancel the fact that it\'s ignored';
     665/* TODO */ $lang['c13y_anomaly_ignored_count'] = '%d anomaly has been ignored.';
     666/* TODO */ $lang['c13y_anomalies_ignored_count'] = '%d anomalies has been ignored.';
     667
    657668?>
  • trunk/plugins/c13y_upgrade/initialize.inc.php

    r2136 r2208  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    3030}
    3131
    32 add_event_handler('get_check_integrity', 'c13y_upgrade');
     32add_event_handler('list_check_integrity', 'c13y_upgrade');
    3333
    34 function c13y_upgrade($c13y_array)
     34function c13y_upgrade()
    3535{
    3636  global $conf;
     
    3838  load_language('plugin.lang', dirname(__FILE__).'/');
    3939
    40   $result = array();
     40  $can_be_deactivate = true;
    4141
    4242  /* Check user with same e-mail */
     
    5252  if (mysql_fetch_array(pwg_query($query)))
    5353  {
    54     $result[] = get_c13y(
     54    $can_be_deactivate = false;
     55    add_c13y(
    5556      l10n('c13y_exif_dbl_email_user'),
    5657      null,
     
    6162
    6263  /* Check if this plugin must deactivate */
    63   if (count($result) === 0)
     64  if ($can_be_deactivate)
    6465  {
    6566    $deactivate_msg_link =
     
    7071      l10n('c13y_upgrade_deactivate').'</a>';
    7172
    72     $result[] = get_c13y(
     73    add_c13y(
    7374      l10n('c13y_upgrade_no_anomaly'),
    7475      'c13y_upgrade_correction',
     
    7778      );
    7879  }
    79 
    80   return array_merge($c13y_array, $result);
    8180}
    8281
  • trunk/template/yoga/admin/check_integrity.tpl

    r2065 r2208  
    44  <dd>
    55    <ul>
    6       <form method="post" name="preferences" action="{F_c13y_ACTION}">
     6      <form method="post" name="c13y" id="c13y" action="{F_c13y_ACTION}">
    77      <fieldset>
    88        <table class="table2">
    99          <tr class="throw">
     10            <th></th>
    1011            <th>{lang:c13y_Anomaly}</th>
    1112            <th>{lang:c13y_Correction}</th>
     
    1314          <!-- BEGIN c13y -->
    1415          <tr class="{c13y.CLASS}">
     16            <td>
     17              <!-- BEGIN can_select -->
     18              <input type="checkbox" name="c13y_selection[]" value="{c13y.ID}" {c13y.CHECKED} id="c13y_selection-{c13y.ID}" /><label for="c13y_selection-{c13y.ID}"></label>
     19              <!-- END can_select -->
     20            </td>
    1521            <td><label for="c13y_selection-{c13y.ID}">{c13y.ANOMALY}</label></td>
    1622            <td>
    17               <!-- BEGIN correction_fct -->
    18               <input type="checkbox" name="c13y_selection[]" value="{c13y.ID}" {c13y.CHECKED} id="c13y_selection-{c13y.ID}" /><label for="c13y_selection-{c13y.ID}"> {lang:c13y_Automatic_correction}</label>
    19               <!-- END correction_fct -->
    20               <!-- BEGIN correction_bad_fct -->
    21               {lang:c13y_Impossible_automatic_correction}
    22               <!-- END correction_bad_fct -->
    23               <!-- BEGIN correction_success_fct -->
    24               {lang:c13y_Correction_applied_success}
    25               <!-- END correction_success_fct -->
    26               <!-- BEGIN correction_error_fct -->
    27               {lang:c13y_Correction_applied_error}
    28               <BR />
    29               {c13y.correction_error_fct.WIKI_FOROM_LINKS}
    30               <!-- END correction_error_fct -->
    31               <!-- BEGIN br -->
    32               <br />
    33               <!-- END br -->
    34               <!-- BEGIN correction_msg -->
    35               {c13y.correction_msg.DATA}
    36               <!-- END correction_msg -->
     23              <label for="c13y_selection-{c13y.ID}">
     24                <!-- BEGIN ignore_msg -->
     25                {lang:c13y_ignore_msg1}
     26                <br />
     27                {lang:c13y_ignore_msg2}
     28                <!-- END ignore_msg -->
     29                <!-- BEGIN correction_fct -->
     30                {lang:c13y_Automatic_correction}
     31                <!-- END correction_fct -->
     32                <!-- BEGIN correction_bad_fct -->
     33                {lang:c13y_Impossible_automatic_correction}
     34                <!-- END correction_bad_fct -->
     35                <!-- BEGIN correction_success_fct -->
     36                {lang:c13y_Correction_applied_success}
     37                <!-- END correction_success_fct -->
     38                <!-- BEGIN correction_error_fct -->
     39                {lang:c13y_Correction_applied_error}
     40                <BR />
     41                {c13y.correction_error_fct.WIKI_FOROM_LINKS}
     42                <!-- END correction_error_fct -->
     43                <!-- BEGIN br -->
     44                <br />
     45                <!-- END br -->
     46                <!-- BEGIN correction_msg -->
     47                {c13y.correction_msg.DATA}
     48                <!-- END correction_msg -->
     49              </label>
    3750            </td>
    3851          </tr>
    3952          <!-- END c13y -->
    4053        </table>
    41         <!-- BEGIN c13y_submit -->
     54
     55          <!-- BEGIN c13y_link_check_uncheck -->
     56          <a href="#" onclick="SelectAll(document.getElementById('c13y')); return false;">{lang:c13y_check_all}</a>
     57        / <a href="#" onclick="DeselectAll(document.getElementById('c13y')); return false;">{lang:c13y_uncheck_all}</a>
     58          <!-- END c13y_link_check_uncheck -->
     59          <!-- BEGIN c13y_link_check_automatic_correction -->
     60          / <a href="#" onclick="DeselectAll(document.getElementById('c13y'));
     61            <!-- BEGIN c13y_do_check -->
     62              document.getElementById('c13y_selection-{c13y_link_check_automatic_correction.c13y_do_check.ID}').checked = true;
     63            <!-- END c13y_do_check -->
     64              return false;">{lang:c13y_check_auto}</a>
     65          <!-- END c13y_link_check_automatic_correction -->
    4266        <p>
    43           <input class="submit" type="submit" value="{lang:c13y_Apply_selected_corrections}" name="c13y_submit" {TAG_INPUT_ENABLED} />
     67          <!-- BEGIN c13y_submit_automatic_correction -->
     68          <input class="submit" type="submit" value="{lang:c13y_submit_correction}" name="c13y_submit_correction" {TAG_INPUT_ENABLED} />
     69          <!-- END c13y_submit_automatic_correction -->
     70          <!-- BEGIN c13y_submit_ignore -->
     71          <input class="submit" type="submit" value="{lang:c13y_submit_ignore}" name="c13y_submit_ignore" {TAG_INPUT_ENABLED} />
     72          <!-- END c13y_submit_ignore -->
     73          <input class="submit" type="submit" value="{lang:c13y_submit_refresh}" name="c13y_submit_refresh" {TAG_INPUT_ENABLED} />
    4474        </p>
    45         <!-- END c13y_submit -->
     75
    4676      </fieldset>
    4777      </form>
  • trunk/template/yoga/admin/maintenance.tpl

    r2062 r2208  
    1919  <li><a href="{U_MAINT_FEEDS}" {TAG_INPUT_ENABLED}>{lang:purge never used notification feeds}</a></li>
    2020</ul>
     21
     22<ul>
     23  <li><a href="{U_MAINT_C13Y}" {TAG_INPUT_ENABLED}>{lang:c13y_maintenance}</a></li>
     24</ul>
Note: See TracChangeset for help on using the changeset viewer.