Changeset 2100 for plugins/cleanConfig
- Timestamp:
- 03/06/10 18:25:45 (14 years ago)
- Location:
- plugins/cleanConfig
- Files:
-
- 2 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/cleanConfig/_define.php
r1968 r2100 3 3 # 4 4 # This file is part of clean:config. 5 # Copyright 2007,2009 Moe (http://gniark.net/)5 # Copyright 2007,2009,2010 Moe (http://gniark.net/) 6 6 # 7 7 # clean:config is free software; you can redistribute it and/or modify … … 28 28 /* Description*/ "Delete blog and global settings and plugins' versions", 29 29 /* Author */ "Moe (http://gniark.net/)", 30 /* Version */ '1.3. 2',30 /* Version */ '1.3.3', 31 31 /* Permissions */ null 32 32 ); -
plugins/cleanConfig/inc/lib.cleanconfig.php
r1968 r2100 25 25 { 26 26 27 public static function delete($ setting,$limit)27 public static function delete($namespace,$setting,$limit) 28 28 { 29 29 global $core; … … 31 31 if ($limit == 'blog') 32 32 { 33 $core->blog->settings->drop($setting); 33 # Settings compatibility test 34 if (version_compare(DC_VERSION,'2.2-alpha1','>=')) { 35 $core->blog->settings->{$namespace}->drop($setting); 36 } else { 37 $core->blog->settings->drop($setting); 38 } 34 39 } 35 40 elseif ($limit == 'global') … … 109 114 $echo_ns = true; 110 115 } 116 117 $id = html::escapeHTML($v['ns'].'|'.$k); 111 118 $table->row('class="line"'); 112 $table->cell(form::checkbox(array('settings[]',html::escapeHTML($k)),html::escapeHTML($k),false,$v['ns'])); 113 $table->cell('<label for="'.html::escapeHTML($k).'">'.$k.'</label>'); 119 $table->cell(form::checkbox(array('settings[]',$id), 120 $id,false,$v['ns'])); 121 $table->cell('<label for="'.$id.'">'.$k.'</label>'); 114 122 # boolean 115 123 if (($v['type']) == 'boolean') … … 144 152 $str .= ('<p class="checkboxes-helpers"></p>'. 145 153 '<p>'.form::hidden(array('limit',$limit),$limit). 146 '<input type="submit" name="delete" value="'.__(' Remove selected settings').'" /></p>'."\n".154 '<input type="submit" name="delete" value="'.__('Delete selected settings').'" /></p>'."\n". 147 155 '<p>'.$core->formNonce().'</p>'); 148 156 } … … 187 195 $str .= $table->get(); 188 196 $str .= ('<p class="checkboxes-helpers"></p>'. 189 '<input type="submit" name="delete_versions" value="'.__(' Remove selected versions').'" /></p>'."\n".197 '<input type="submit" name="delete_versions" value="'.__('Delete selected versions').'" /></p>'."\n". 190 198 '<p>'.$core->formNonce().'</p>'); 191 199 $str .= '</form>'."\n"; -
plugins/cleanConfig/index.php
r1968 r2100 32 32 33 33 # actions 34 $limit = isset($_POST['limit']) ? $_POST['limit'] : ''; 34 $limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : ''; 35 35 36 if ((isset($_POST['delete'])) AND (($limit == 'blog') OR ($limit == 'global'))) 36 37 { 37 38 if (count($_POST['settings']) == 0) 38 39 { 39 $msg = '<p class="message">'.__('No settings deleted.').'</p>';40 $msg = __('No setting deleted.'); 40 41 $default_tab = $limit.'_settings'; 41 42 } … … 44 45 foreach ($_POST['settings'] as $setting) 45 46 { 46 cleanconfig::delete($setting,$limit); 47 $id = explode('|',$setting); 48 cleanconfig::delete($id[0],$id[1],$limit); 47 49 } 48 50 $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'; 51 52 http::redirect($p_url.'&settingsdeleted=1&limit='.$limit); 52 53 } 53 54 } … … 56 57 if (count($_POST['versions']) == 0) 57 58 { 58 $msg = '<p class="message">'.__('No versions deleted.').'</p>';59 $msg = __('No version deleted.'); 59 60 $default_tab = 'versions'; 60 61 } … … 65 66 cleanconfig::delete_version($k); 66 67 } 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'; 68 69 http::redirect($p_url.'&versionsdeleted=1'); 71 70 } 71 } 72 73 if (isset($_GET['settingsdeleted'])) 74 { 75 $msg = __('The selected settings have been deleted.'); 76 77 $default_tab = $limit.'_settings'; 78 } 79 elseif (isset($_GET['versionsdeleted'])) 80 { 81 $msg = __('Versions deleted.'); 72 82 } 73 83 … … 108 118 <body> 109 119 110 <h2><?php echo html::escapeHTML($core->blog->name); ?> > <?php echo __('clean:config'); ?></h2> 111 112 <?php if (!empty($msg)) {echo $msg;} ?> 113 120 <h2><?php echo html::escapeHTML($core->blog->name); ?> › <?php echo __('clean:config'); ?></h2> 121 122 <?php 123 if (!empty($msg)) {echo '<p class="message">'.$msg.'</p>';} 124 ?> 125 114 126 <div class="multi-part" id="blog_settings" title="<?php echo __('blog settings'); ?>"> 115 127 <?php echo(cleanconfig::settings('blog')); ?> … … 121 133 122 134 <div class="multi-part" id="versions" title="<?php echo __('versions'); ?>"> 123 <p><?php echo(__('Deletting the version of a module will reinstall it if the modulehas an install process.')); ?></p>135 <p><?php echo(__('Deletting the version of a plugin will reinstall it if the plugin has an install process.')); ?></p> 124 136 <?php echo(cleanconfig::versions()); ?> 125 137 </div> -
plugins/cleanConfig/locales/fr/main.po
r1968 r2100 1 # French translation of clean:config, a plugin for dotclear 2 # This file is generated by LangOmatic, a plugin for Dotclear 1 # Language: français 2 # plugin: cleanConfig - 1.3.2 3 # Date: 2010-03-05 21:01:49 4 # Translated with dcTranslater - 1.2 3 5 4 6 msgid "" 5 7 msgstr "Content-Type: text/plain; charset=UTF-8\n" 6 8 7 #: _admin.php:24 8 #: index.php:75 9 #: index.php:108 9 #: index.php:120 10 10 msgid "clean:config" 11 11 msgstr "clean:config" 12 12 13 #: class.cleanconfig.php:5413 #: inc/lib.cleanconfig.php:59 14 14 msgid "Use carefully. Only settings related to plugins can be deleted." 15 15 msgstr "À utiliser avec précaution. Seuls les paramètres liés aux extensions peuvent être effacés." 16 16 17 #: class.cleanconfig.php:56 18 #: class.cleanconfig.php:158 17 #: inc/lib.cleanconfig.php:166 19 18 msgid "Settings" 20 19 msgstr "Paramètres" 21 20 22 #: class.cleanconfig.php:5921 #: inc/lib.cleanconfig.php:64 23 22 msgid "Setting" 24 23 msgstr "Paramètre" 25 24 26 #: class.cleanconfig.php:60 27 msgid "Value" 28 msgstr "Valeur" 29 30 #: class.cleanconfig.php:108 25 #: inc/lib.cleanconfig.php:113 31 26 msgid "namespace:" 32 27 msgstr "namespace :" 33 28 34 #: class.cleanconfig.php:13729 #: inc/lib.cleanconfig.php:145 35 30 msgid "No setting." 36 31 msgstr "Pas de paramètre." 37 32 38 #: class.cleanconfig.php:14639 msgid " Remove selected settings"40 msgstr "Supprimer les paramètres sélectionné s"33 #: inc/lib.cleanconfig.php:154 34 msgid "Delete selected settings" 35 msgstr "Supprimer les paramètres sélectionnées" 41 36 42 #: class.cleanconfig.php:16637 #: inc/lib.cleanconfig.php:174 43 38 msgid "%s is empty" 44 39 msgstr "%s est vide" 45 40 46 #: class.cleanconfig.php:17041 #: inc/lib.cleanconfig.php:178 47 42 msgid "Versions" 48 43 msgstr "Versions" 49 44 50 #: class.cleanconfig.php:17351 msgid " Module"52 msgstr " Modules"45 #: inc/lib.cleanconfig.php:181 46 msgid "plugin" 47 msgstr "plugins" 53 48 54 #: class.cleanconfig.php:18955 msgid " Remove selected versions"49 #: inc/lib.cleanconfig.php:197 50 msgid "Delete selected versions" 56 51 msgstr "Supprimer les versions sélectionnées" 57 52 58 #: index.php: 3959 msgid "No setting sdeleted."53 #: index.php:40 54 msgid "No setting deleted." 60 55 msgstr "Aucun paramètre supprimé." 61 56 62 #: index.php:48 63 msgid "Deleted blog settings:" 64 msgstr "Paramètres du blog supprimés :" 65 66 #: index.php:48 67 msgid "Deleted global settings:" 68 msgstr "Paramètres globaux supprimés :" 69 70 #: index.php:57 71 msgid "No versions deleted." 57 #: index.php:59 58 msgid "No version deleted." 72 59 msgstr "Aucune version supprimée." 73 60 74 #: index.php: 6675 msgid " Deleted versions:"76 msgstr " Versions supprimées :"61 #: index.php:75 62 msgid "The selected settings have been deleted." 63 msgstr "Les paramètres sélectionnés ont été supprimés." 77 64 78 #: index.php:84 65 #: index.php:81 66 msgid "Versions deleted." 67 msgstr "Versions supprimées." 68 69 #: index.php:96 79 70 msgid "Are you sure you want to delete settings?" 80 71 msgstr "Êtes-vous certain de vouloir supprimer les paramètres ?" 81 72 82 #: index.php: 8673 #: index.php:98 83 74 msgid "Are you sure you want to delete versions?" 84 75 msgstr "Êtes-vous certain de vouloir supprimer les versions ?" 85 76 86 #: index.php:112 87 msgid "blog settings" 88 msgstr "paramètres du blog" 89 90 #: index.php:116 91 msgid "global settings" 92 msgstr "paramètres globaux" 93 94 #: index.php:120 77 #: index.php:134 95 78 msgid "versions" 96 79 msgstr "versions" 97 80 98 #: index.php:121 99 msgid "Deletting the version of a module will reinstall it if the module has an install process." 100 msgstr "Effacer la version d'un module le réinstallera si le module a une procédure d'installation." 81 #: index.php:135 82 msgid "Deletting the version of a plugin will reinstall it if the plugin has an install process." 83 msgstr "Effacer la version d'un plugin le réinstallera si le plugin a une procédure d'installation." 84
Note: See TracChangeset
for help on using the changeset viewer.