Changeset 1955:b0bef03695c0
- Timestamp:
- 09/19/13 01:08:39 (12 years ago)
- Branch:
- default
- Children:
- 1956:d272c079e6e5, 1964:bfde9296c3c5
- Files:
-
- 3 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
locales/en/plugins.po
r1940 r1955 861 861 msgstr "" 862 862 863 #, php-format 864 msgid "maximum size %s" 865 msgstr "" 866 863 867 msgid "or pick up a local file in your public directory" 864 868 msgstr "" … … 870 874 msgstr "" 871 875 876 msgid "File is empty or not a compressed file." 877 msgstr "" 878 872 879 msgid "WordPress import" 873 880 msgstr "" … … 931 938 msgstr "" 932 939 940 msgid "Database export" 941 msgstr "" 942 943 msgid "Download database of current blog" 944 msgstr "" 945 946 msgid "Zip file ready to download." 947 msgstr "" 948 949 msgid "Download database of all blogs" 950 msgstr "" 951 933 952 msgid "Please wait..." 934 953 msgstr "" … … 937 956 msgstr "" 938 957 958 msgid "Servicing" 959 msgstr "" 960 961 msgid "Backup" 962 msgstr "" 963 939 964 msgid "Optimize" 940 965 msgstr "" … … 949 974 msgstr "" 950 975 976 msgid "Compressed file for current blog" 977 msgstr "" 978 979 msgid "Compressed file for all blogs" 980 msgstr "" 981 951 982 msgid "Execute task" 952 983 msgstr "" … … 1056 1087 1057 1088 msgid "Empty directory" 1089 msgstr "" 1090 1091 msgid "Download media folder of current blog" 1092 msgstr "" 1093 1094 msgid "Download active theme of current blog" 1058 1095 msgstr "" 1059 1096 -
locales/fr/plugins.po
r1947 r1955 994 994 #, php-format 995 995 msgid "maximum size %s" 996 msgstr "taille maximum de %s" 997 998 #, php-format 999 msgid "maximum size %s" 996 1000 msgstr "" 997 1001 … … 1002 1006 msgstr "Attention : Cela supprimera au préalable tout le contenu de votre base de données à l'exception des utilisateurs." 1003 1007 1008 msgid "File is empty or not a compressed file." 1009 msgstr "Le fichier est vide ou n'est pas un fichier compressé." 1010 1004 1011 msgid "Another file with same name exists." 1005 1012 msgstr "Un autre fichier portant ce nom existe déjà." … … 1073 1080 msgstr "L'ID de \"%3$s\" ne correspond pas dans l'enregistrement \"%1$s\" à la ligne %2$s du fichier de sauvegarde." 1074 1081 1082 msgid "Database export" 1083 msgstr "Export de base de données" 1084 1085 msgid "Download database of current blog" 1086 msgstr "Télécharger la base de données du blog courant" 1087 1088 msgid "Zip file ready to be downloaded." 1089 msgstr "Fichier Zip prêt à être télécharger." 1090 1091 msgid "Download database of all blogs" 1092 msgstr "Télécharger la base de données de tous les blogs" 1093 1075 1094 msgid "Please wait..." 1076 1095 msgstr "Veuillez patientez…" … … 1079 1098 msgstr "Maintenance" 1080 1099 1100 msgid "Servicing" 1101 msgstr "Entretien" 1102 1103 msgid "Backup" 1104 msgstr "Sauvegarde" 1105 1081 1106 msgid "Optimize" 1082 1107 msgstr "Optimiser" … … 1090 1115 msgid "Other" 1091 1116 msgstr "Autre" 1117 1118 msgid "Compressed file for current blog" 1119 msgstr "Fichier compressé pour le blog courant" 1120 1121 msgid "Compressed file for all blogs" 1122 msgstr "Fichier compressé pour tous les blogs" 1092 1123 1093 1124 #, php-format … … 1174 1205 msgstr "Impossible de vider les tables." 1175 1206 1207 msgid "Download media folder of current blog" 1208 msgstr "Télécharger le dossier media du blog courant" 1209 1210 msgid "Download active theme of current blog" 1211 msgstr "Télécharger le theme actif du blog courant" 1212 1176 1213 msgid "Back" 1177 1214 msgstr "Retour" -
plugins/importExport/_prepend.php
r891 r1955 12 12 if (!defined('DC_RC_PATH')) { return; } 13 13 14 global $__autoload ,$core;14 global $__autoload; 15 15 16 16 $__autoload['dcIeModule'] = dirname(__FILE__).'/inc/class.dc.ieModule.php'; … … 28 28 $__autoload['flatExport'] = dirname(__FILE__).'/inc/flat/class.flat.export.php'; 29 29 30 $ core->addBehavior('importExportModules','registerIeModules');30 $this->core->addBehavior('importExportModules','registerIeModules'); 31 31 32 32 function registerIeModules($modules) … … 42 42 } 43 43 } 44 45 $__autoload['ieMaintenanceExportblog'] = dirname(__FILE__).'/inc/lib.ie.maintenance.php'; 46 $__autoload['ieMaintenanceExportfull'] = dirname(__FILE__).'/inc/lib.ie.maintenance.php'; 47 48 $this->core->addBehavior('dcMaintenanceRegister', 'ieMaintenanceRegister'); 49 50 function ieMaintenanceRegister($core, $tasks, $groups, $tabs) 51 { 52 $tasks[] = 'ieMaintenanceExportblog'; 53 $tasks[] = 'ieMaintenanceExportfull'; 54 } 44 55 ?> -
plugins/maintenance/_admin.php
r1940 r1955 43 43 * @param $tasks <b>arrayObject</b> Array of tasks to register 44 44 * @param $groups <b>arrayObject</b> Array of groups to register 45 * @param $tabs <b>arrayObject</b> Array of tabs to register 45 46 */ 46 public static function register($core, $tasks, $groups )47 public static function register($core, $tasks, $groups, $tabs) 47 48 { 49 $tabs['maintenance'] = __('Servicing'); 50 $tabs['backup'] = __('Backup'); 51 48 52 $groups['optimize'] = __('Optimize'); 49 53 $groups['index'] = __('Count and index'); 50 54 $groups['purge'] = __('Purge'); 51 55 $groups['other'] = __('Other'); 56 $groups['zipblog'] = __('Compressed file for current blog'); 57 $groups['zipfull'] = __('Compressed file for all blogs'); 52 58 53 59 $tasks[] = 'dcMaintenanceCache'; … … 57 63 $tasks[] = 'dcMaintenanceLogs'; 58 64 $tasks[] = 'dcMaintenanceVacuum'; 65 $tasks[] = 'dcMaintenanceZipmedia'; 66 $tasks[] = 'dcMaintenanceZiptheme'; 59 67 } 60 68 -
plugins/maintenance/_prepend.php
r1925 r1955 24 24 $__autoload['dcMaintenanceLogs'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.logs.php'; 25 25 $__autoload['dcMaintenanceVacuum'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.vacuum.php'; 26 $__autoload['dcMaintenanceZipmedia'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.zipmedia.php'; 27 $__autoload['dcMaintenanceZiptheme'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.ziptheme.php'; 26 28 27 29 $this->core->rest->addFunction('dcMaintenanceStep', array('dcMaintenanceRest', 'step')); -
plugins/maintenance/inc/class.dc.maintenance.php
r1940 r1955 27 27 private $core; 28 28 private $tasks = array(); 29 private $tabs = array(); 29 30 private $groups = array(); 30 31 … … 41 42 42 43 $tasks = new ArrayObject(); 44 $tabs = new ArrayObject(); 43 45 $groups = new ArrayObject(); 44 46 45 47 # --BEHAVIOR-- dcMaintenanceRegister 46 $core->callBehavior('dcMaintenanceRegister', $core, $tasks, $groups );47 48 $this->init($tasks, $groups );48 $core->callBehavior('dcMaintenanceRegister', $core, $tasks, $groups, $tabs); 49 50 $this->init($tasks, $groups, $tabs); 49 51 } 50 52 … … 54 56 * @param tasks <b>arrayObject</b> Array of task to register 55 57 * @param groups <b>arrayObject</b> Array of groups to add 56 */ 57 public function init($tasks, $groups) 58 * @param tabs <b>arrayObject</b> Array of tabs to add 59 */ 60 public function init($tasks, $groups, $tabs) 58 61 { 59 62 $this->tasks = $this->groups = array(); … … 79 82 $this->groups[(string) $id] = (string) $name; 80 83 } 84 85 foreach($tabs as $id => $name) 86 { 87 $this->tabs[(string) $id] = (string) $name; 88 } 89 } 90 91 /** 92 * Get a tab name. 93 * 94 * @param id <b>string</b> Tab ID 95 * @return <b>mixed</b> tab name or null if not exists 96 */ 97 public function getTab($id) 98 { 99 return array_key_exists($id, $this->tabs) ? $this->tabs[$id] : null; 100 } 101 102 /** 103 * Get tabs. 104 * 105 * @return <b>array</b> Array of tabs ID and name 106 */ 107 public function getTabs() 108 { 109 return $this->tabs; 81 110 } 82 111 -
plugins/maintenance/inc/class.dc.maintenance.task.php
r1940 r1955 28 28 protected $id; 29 29 protected $name; 30 protected $tab = 'maintenance'; 30 31 protected $group = 'other'; 31 32 … … 115 116 116 117 /** 118 * Get task tab. 119 * 120 * @return <b>mixed</b> Task tab ID or null 121 */ 122 public function tab() 123 { 124 return $this->tab; 125 } 126 127 /** 117 128 * Get task group. 118 129 * … … 211 222 return null; 212 223 } 224 225 /** 226 * Log task execution. 227 * 228 * Sometimes we need to log task execution 229 * direct from task itself. 230 * 231 */ 232 protected function log() 233 { 234 $maintenance = new dcMaintenance($this->core); 235 $maintenance->setLog($this->id); 236 } 213 237 } -
plugins/maintenance/index.php
r1940 r1955 70 70 dcPage::jsPageTabs($tab); 71 71 72 if ( $task) {72 if (0){//$task) { 73 73 echo 74 74 '<script type="text/javascript">'."\n". … … 137 137 // Simple task (with only a button to start it) 138 138 139 echo 140 '<div id="maintenance" class="multi-part" title="'.__('Maintenance').'">'. 141 '<h3>'.__('Maintenance').'</h3>'. 142 '<form action="'.$p_url.'" method="post">'; 143 144 foreach($maintenance->getGroups($core) as $g_id => $g_name) 139 foreach($maintenance->getTabs() as $tab_id => $tab_name) 145 140 { 146 $res = '';147 foreach($maintenance->get Tasks($core) as $t)141 $res_group = ''; 142 foreach($maintenance->getGroups($core) as $group_id => $group_name) 148 143 { 149 if ($t->group() != $g_id) { 150 continue; 144 $res_task = ''; 145 foreach($maintenance->getTasks($core) as $t) 146 { 147 if ($t->group() != $group_id || $t->tab() != $tab_id) { 148 continue; 149 } 150 151 $res_task .= 152 '<p>'.form::radio(array('task', $t->id()), $t->id()).' '. 153 '<label class="classic" for="'.$t->id().'">'. 154 html::escapeHTML($t->task()).'</label>'; 155 156 if (array_key_exists($t->id(), $expired)) { 157 $res_task .= 158 ' <span class="clear form-note warn">'.sprintf( 159 __('Last execution of this task was on %s. You should execute it again.'), 160 dt::dt2str(__('%Y-%m-%d %H:%M'), $expired[$t->id()]) 161 ).'</span>'; 162 } 163 164 $res_task .= '</p>'; 151 165 } 152 166 153 $res .= 154 '<p>'.form::radio(array('task', $t->id()), $t->id()).' '. 155 '<label class="classic" for="'.$t->id().'">'. 156 html::escapeHTML($t->task()).'</label>'; 157 158 if (array_key_exists($t->id(), $expired)) { 159 $res .= 160 ' <span class="clear form-note warn">'.sprintf( 161 __('Last execution of this task was on %s. You should execute it again.'), 162 dt::dt2str(__('%Y-%m-%d %H:%M'), $expired[$t->id()]) 163 ).'</span>'; 167 if (!empty($res_task)) { 168 $res_group .= 169 '<div class="fieldset">'. 170 '<h4 id="'.$group_id.'">'.$group_name.'</h4>'. 171 $res_task. 172 '</div>'; 164 173 } 165 166 $res .= '</p>'; 167 }168 169 if (!empty($res)) {170 echo '<div class="fieldset"><h4 id="'.$g_id.'">'.$g_name.'</h4>'.$res.'</div>';171 }172 }173 174 echo175 '<p><input type="submit" value="'.__('Execute task').'" />'.176 form::hidden(array('tab'), 'maintenance').177 $core->formNonce().'</p>'.178 '<p class="form-note info">'.__('This may take a very long time').'.</p>'.179 '</form>'.180 '</div>';174 } 175 176 if (!empty($res_group)) { 177 echo 178 '<div id="'.$tab_id.'" class="multi-part" title="'.$tab_name.'">'. 179 '<h3>'.$tab_name.'</h3>'. 180 '<form action="'.$p_url.'" method="post">'. 181 $res_group. 182 '<p><input type="submit" value="'.__('Execute task').'" /> '. 183 form::hidden(array('tab'), $tab_id). 184 $core->formNonce().'</p>'. 185 '<p class="form-note info">'.__('This may take a very long time').'.</p>'. 186 '</form>'. 187 '</div>'; 188 } 189 } 181 190 182 191 // Advanced tasks (that required a tab)
Note: See TracChangeset
for help on using the changeset viewer.