Dotclear

Changeset 1968 for plugins/cleanConfig


Ignore:
Timestamp:
12/11/09 22:08:37 (14 years ago)
Author:
Moe
Message:

/inc/class.cleanconfig.php 1.3.2 :

  • fixed bug with XHTML entity in Javascript strings
  • updated copyright year
  • moved PHP class to inc/ directory
  • cleanup
Location:
plugins/cleanConfig
Files:
2 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/cleanConfig/_admin.php

    r693 r1968  
    33# 
    44# This file is part of clean:config. 
    5 # Copyright 2007 Moe (http://gniark.net/) 
     5# Copyright 2007,2009 Moe (http://gniark.net/) 
    66# 
    77# clean:config is free software; you can redistribute it and/or modify 
  • plugins/cleanConfig/_define.php

    r1495 r1968  
    33# 
    44# This file is part of clean:config. 
    5 # Copyright 2007 Moe (http://gniark.net/) 
     5# Copyright 2007,2009 Moe (http://gniark.net/) 
    66# 
    77# clean:config is free software; you can redistribute it and/or modify 
     
    2626$this->registerModule( 
    2727        /* Name */                      "clean:config", 
    28         /* Description*/                "Clean blog and global settings and versions", 
     28        /* Description*/                "Delete blog and global settings and plugins' versions", 
    2929        /* Author */                    "Moe (http://gniark.net/)", 
    30         /* Version */                   '1.3.1', 
     30        /* Version */                   '1.3.2', 
    3131        /* Permissions */               null 
    3232); 
  • plugins/cleanConfig/index.php

    r1607 r1968  
    33# 
    44# This file is part of clean:config. 
    5 # Copyright 2007 Moe (http://gniark.net/) 
     5# Copyright 2007,2009 Moe (http://gniark.net/) 
    66# 
    77# clean:config is free software; you can redistribute it and/or modify 
     
    2424if (!defined('DC_CONTEXT_ADMIN')) {exit;} 
    2525 
    26      require_once(dirname(__FILE__).'/php-xhtml-table/class.table.php'); 
    27      require_once(dirname(__FILE__).'/class.cleanconfig.php'); 
     26require_once(dirname(__FILE__).'/php-xhtml-table/class.table.php'); 
     27require_once(dirname(__FILE__).'/inc/lib.cleanconfig.php'); 
    2828 
    29      $default_tab = 'blog_settings'; 
     29$default_tab = 'blog_settings'; 
    3030 
    31      $msg = (string)''; 
    32       
    33      # actions 
    34      $limit = $_POST['limit']; 
    35      if ((isset($_POST['delete'])) AND (($limit == 'blog') OR ($limit == 'global'))) 
     31$msg = (string)''; 
     32 
     33# actions 
     34$limit = isset($_POST['limit']) ? $_POST['limit'] : ''; 
     35if ((isset($_POST['delete'])) AND (($limit == 'blog') OR ($limit == 'global'))) 
     36{ 
     37     if (count($_POST['settings']) == 0) 
    3638     { 
    37           if (count($_POST['settings']) == 0) 
     39          $msg = '<p class="message">'.__('No settings deleted.').'</p>'; 
     40          $default_tab = $limit.'_settings'; 
     41     } 
     42     else 
     43     { 
     44          foreach ($_POST['settings'] as $setting) 
    3845          { 
    39                $msg = '<p>'.__('No settings deleted.').'</p>'; 
    40                $default_tab = $limit.'_settings'; 
     46               cleanconfig::delete($setting,$limit); 
    4147          } 
    42           else 
     48          $msg = '<div class="message"><p>'. 
     49               (($limit == 'blog') ? __('Deleted blog settings:') : __('Deleted global settings:')).'</p><ul><li>'. 
     50               implode('</li><li>',$_POST['settings']).'</li></ul></div>'; 
     51          $default_tab = $limit.'_settings'; 
     52     } 
     53} 
     54elseif (isset($_POST['delete_versions'])) 
     55{ 
     56     if (count($_POST['versions']) == 0) 
     57     { 
     58          $msg = '<p class="message">'.__('No versions deleted.').'</p>'; 
     59          $default_tab = 'versions'; 
     60     } 
     61     else 
     62     { 
     63          foreach ($_POST['versions'] as $k) 
    4364          { 
    44                foreach ($_POST['settings'] as $setting) 
    45                { 
    46                     cleanconfig::delete($setting,$limit); 
    47                } 
    48                $msg = '<p>'.(($limit == 'blog') ? __('Deleted blog settings:') : __('Deleted global settings:')).'</p><ul><li>'. 
    49                     implode('</li><li>',$_POST['settings']).'</li></ul>'; 
    50                $default_tab = $limit.'_settings'; 
     65               cleanconfig::delete_version($k); 
    5166          } 
     67          $msg = '<div class="message"><p>'.__('Deleted versions:'). 
     68               '</p><ul><li>'. 
     69               implode('</li><li>',$_POST['versions']).'</li></ul></div>'; 
     70          $default_tab = 'versions'; 
    5271     } 
    53      elseif (isset($_POST['delete_versions'])) 
    54      { 
    55           if (count($_POST['versions']) == 0) 
    56           { 
    57                $msg = '<p>'.__('No versions deleted.').'</p>'; 
    58                $default_tab = 'versions'; 
    59           } 
    60           else 
    61           { 
    62                foreach ($_POST['versions'] as $k) 
    63                { 
    64                     cleanconfig::delete_version($k); 
    65                } 
    66                $msg = '<p>'.__('Deleted versions:').'</p><ul><li>'. 
    67                     implode('</li><li>',$_POST['versions']).'</li></ul>'; 
    68                $default_tab = 'versions'; 
    69           } 
    70      } 
     72} 
    7173 
    7274?> 
     
    108110     <h2><?php echo html::escapeHTML($core->blog->name); ?> &gt; <?php echo __('clean:config'); ?></h2> 
    109111 
    110      <?php if (!empty($msg)) {echo '<div class="message">'.$msg.'</div>';} ?> 
     112     <?php if (!empty($msg)) {echo $msg;} ?> 
    111113 
    112114     <div class="multi-part" id="blog_settings" title="<?php echo __('blog settings'); ?>"> 
  • plugins/cleanConfig/locales/fr/main.po

    r1607 r1968  
    7878#: index.php:84 
    7979msgid "Are you sure you want to delete settings?" 
    80 msgstr "Êtes-vous certain de vouloir supprimer les paramètres&nbsp;?" 
     80msgstr "Êtes-vous certain de vouloir supprimer les paramètres ?" 
    8181 
    8282#: index.php:86 
    8383msgid "Are you sure you want to delete versions?" 
    84 msgstr "Êtes-vous certain de vouloir supprimer les versions&nbsp;?" 
     84msgstr "Êtes-vous certain de vouloir supprimer les versions ?" 
    8585 
    8686#: index.php:112 
Note: See TracChangeset for help on using the changeset viewer.

Sites map