[ Index ] |
|
Code source de Plume CMS 1.2.2 |
1 <?php 2 /* 3 # ***** BEGIN LICENSE BLOCK ***** 4 # This file is part of Plume CMS, a website management application. 5 # Copyright (C) 2001-2005 Loic d'Anterroches and contributors. 6 # 7 # Plume CMS is free software; you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation; either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Plume CMS is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with this program; if not, write to the Free Software 19 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 # 21 # ***** END LICENSE BLOCK ***** */ 22 23 include_once dirname(__FILE__).'/../../inc/class.l10n.php'; 24 include_once dirname(__FILE__).'/../../inc/class.files.php'; 25 include_once dirname(__FILE__).'/../../inc/class.checklist.php'; 26 27 $m->l10n->loadPlugin($m->user->lang, 'babel'); 28 $is_user_root = auth::asLevel(PX_AUTH_ROOT); 29 if (!$is_user_root): 30 $m->setError( __('You do not have the rights to access this plugin.')); 31 else: 32 33 34 ?> 35 <h1><?php echo __('Babel Fish'); ?></h1> 36 37 <h2><?php echo __('Optimization of the locale files'); ?></h2> 38 <?php 39 if (!empty($_GET['op']) && ($_GET['op'] == 'op')) { 40 echo '<p><strong>'.__('Results of the optimization:').'</strong></p>'."\n\n"; 41 $checklist = new checklist(); 42 $files = array(); 43 files::listfiles($_PX_config['manager_path'].'/locale', $files, '/\.lang$/'); 44 files::listfiles($_PX_config['manager_path'].'/tools', $files, '/\.lang$/'); 45 $i = 1; 46 foreach($files as $file) { 47 $checklist->addTest('file'.$i, l10n::optimizeLocale($file), 48 sprintf(__('Locale file <strong>%s</strong> optimized.'), $file), 49 sprintf(__('Error optimizing the file <strong>%s</strong>.'), $file)); 50 $i++; 51 } 52 echo $checklist->getHtml('themes/'.$_px_theme.'/images'); 53 if ($checklist->checkAll()) { 54 echo '<p>'.__('The optimization was successfull. You will have a little increase in the speed of the manager. You need to run again the optimization after adding a new plugin or upgrading your installation.').'</p>'."\n"; 55 } else { 56 echo '<p>'.__('The optimization was not successfull. Do not worry too much, this would have not increased a lot the speed of the manager.').'</p>'."\n"; 57 } 58 } else { 59 echo '<p>'.__('The optimization convert the <strong>.lang</strong> files in <strong>PHP</strong> files ready for inclusion, thus improving the speed of the manager. There is an automatic check to use the <strong>.lang</strong> file if more recent.').'</p>'."\n"; 60 echo '<p>'.sprintf(__('<a href="%s">Run the optimization</a>.'), 'tools.php?p=babel&op=op').'</p>'."\n"; 61 } 62 63 64 endif; // if user root 65 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 11:57:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |