Changeset 1033
- Timestamp:
- Feb 11, 2006, 8:36:09 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/site_manager.php
r1029 r1033 64 64 else 65 65 { 66 array_push($page['errors'], get_lang('remote_site_file_not_found'));66 array_push($page['errors'], l10n('remote_site_file_not_found')); 67 67 } 68 68 } … … 100 100 { 101 101 array_push($page['errors'], 102 get_lang('remote_site_already_exists').' ['.$url.']');102 l10n('remote_site_already_exists').' ['.$url.']'); 103 103 } 104 104 if (count($page['errors']) == 0) … … 115 115 { 116 116 array_push($page['errors'], 117 get_lang('remote_site_error').' : '.$first_line);117 l10n('remote_site_error').' : '.$first_line); 118 118 } 119 119 } 120 120 else 121 121 { 122 array_push($page['errors'], get_lang('remote_site_file_not_found') );122 array_push($page['errors'], l10n('remote_site_file_not_found') ); 123 123 } 124 124 } … … 128 128 { 129 129 array_push($page['errors'], 130 get_lang('Directory does not exist').' ['.$url.']');130 l10n('Directory does not exist').' ['.$url.']'); 131 131 } 132 132 } … … 143 143 pwg_query($query); 144 144 array_push($page['infos'], 145 $url.' '. get_lang('remote_site_created'));145 $url.' '.l10n('remote_site_created')); 146 146 } 147 147 } … … 166 166 case 'generate' : 167 167 { 168 $title = $galleries_url.' : '. get_lang('remote_site_generate');168 $title = $galleries_url.' : '.l10n('remote_site_generate'); 169 169 $template->assign_vars(array('REMOTE_SITE_TITLE'=>$title)); 170 170 remote_output($galleries_url.'create_listing_file.php?action=generate'); … … 173 173 case 'test' : 174 174 { 175 $title = $galleries_url.' : '. get_lang('remote_site_test');175 $title = $galleries_url.' : '.l10n('remote_site_test'); 176 176 $template->assign_vars(array('REMOTE_SITE_TITLE'=>$title)); 177 177 remote_output($galleries_url.'create_listing_file.php?action=test&version='.PHPWG_VERSION); … … 180 180 case 'clean' : 181 181 { 182 $title = $galleries_url.' : '. get_lang('remote_site_clean');182 $title = $galleries_url.' : '.l10n('remote_site_clean'); 183 183 $template->assign_vars(array('REMOTE_SITE_TITLE'=>$title)); 184 184 remote_output($galleries_url.'create_listing_file.php?action=clean'); … … 189 189 delete_site($page['site']); 190 190 array_push($page['infos'], 191 $galleries_url.' '. get_lang('remote_site_deleted'));191 $galleries_url.' '.l10n('remote_site_deleted')); 192 192 break; 193 193 } … … 232 232 array( 233 233 'NAME' => $row['galleries_url'], 234 'TYPE' => get_lang( $is_remote ? 'Remote' : 'Local' ),234 'TYPE' => l10n( $is_remote ? 'Remote' : 'Local' ), 235 235 'CATEGORIES' => $row['nb_categories'], 236 236 'IMAGES' => isset($row['nb_images']) ? $row['nb_images'] : 0, -
trunk/admin/site_update.php
r1029 r1033 51 51 52 52 $error_labels = array( 53 'PWG-UPDATE-1' => array( get_lang('update_wrong_dirname_short'),54 get_lang('update_wrong_dirname_info') ),55 'PWG-UPDATE-2' => array( get_lang('update_missing_tn_short'),56 get_lang('update_missing_tn_info')53 'PWG-UPDATE-1' => array( l10n('update_wrong_dirname_short'), 54 l10n('update_wrong_dirname_info') ), 55 'PWG-UPDATE-2' => array( l10n('update_missing_tn_short'), 56 l10n('update_missing_tn_info') 57 57 . implode(',', $conf['picture_ext']) ), 58 'PWG-ERROR-NO-FS' => array( get_lang('Does not exist'),59 get_lang('update_missing_file_or_dir_info')),60 'PWG-ERROR-VERSION' => array( get_lang('Invalid PhpWebGalley version'),61 get_lang('update_pwg_version_differs_info')),62 'PWG-ERROR-NOLISTING' => array( get_lang('remote_site_listing_not_found'),63 get_lang('remote_site_listing_not_found_info'))58 'PWG-ERROR-NO-FS' => array( l10n('Does not exist'), 59 l10n('update_missing_file_or_dir_info')), 60 'PWG-ERROR-VERSION' => array( l10n('Invalid PhpWebGalley version'), 61 l10n('update_pwg_version_differs_info')), 62 'PWG-ERROR-NOLISTING' => array( l10n('remote_site_listing_not_found'), 63 l10n('remote_site_listing_not_found_info')) 64 64 ); 65 65 $errors = array(); … … 227 227 else 228 228 { 229 $insert{'uploadable'} = false;229 $insert{'uploadable'} = 'false'; 230 230 } 231 231 $insert{'status'} = $conf{'newcat_default_status'}; … … 260 260 array_push($inserts, $insert); 261 261 array_push($infos, array('path' => $fulldir, 262 'info' => get_lang('update_research_added')));262 'info' => l10n('update_research_added'))); 263 263 264 264 // add the new category to $db_categories and $db_fulldirs array … … 301 301 unset($db_fulldirs[$fulldir]); 302 302 array_push($infos, array('path' => $fulldir, 303 'info' => get_lang('update_research_deleted')));303 'info' => l10n('update_research_deleted'))); 304 304 } 305 305 if (count($to_delete) > 0) … … 417 417 'category_id' => $insert{'storage_category_id'})); 418 418 array_push($infos, array('path' => $insert{'path'}, 419 'info' => get_lang('update_research_added')));419 'info' => l10n('update_research_added'))); 420 420 } 421 421 else … … 447 447 'category_id' => $insert{'storage_category_id'})); 448 448 array_push($infos, array('path' => $insert{'path'}, 449 'info' => get_lang('update_research_added')));449 'info' => l10n('update_research_added'))); 450 450 } 451 451 } … … 475 475 array_push($to_delete_elements, array_search($path, $db_elements)); 476 476 array_push($infos, array('path' => $path, 477 'info' => get_lang('update_research_deleted')));477 'info' => l10n('update_research_deleted'))); 478 478 } 479 479 if (count($to_delete_elements) > 0) … … 664 664 if (isset($simulate) and $simulate) 665 665 { 666 $result_title.= get_lang('update_simulation_title').' ';666 $result_title.= l10n('update_simulation_title').' '; 667 667 } 668 668 … … 672 672 if ($site_is_remote and !isset($_POST['submit']) ) 673 673 { 674 $used_metadata.= ' + ' . get_lang('Aditionnal remote attributes');674 $used_metadata.= ' + ' . l10n('Aditionnal remote attributes'); 675 675 } 676 676 … … 679 679 'SITE_URL'=>$site_url, 680 680 'U_SITE_MANAGER'=> PHPWG_ROOT_PATH.'admin.php?page=site_manager', 681 'L_RESULT_UPDATE'=>$result_title. get_lang('update_part_research'),682 'L_RESULT_METADATA'=>$result_title. get_lang('update_result_metadata'),681 'L_RESULT_UPDATE'=>$result_title.l10n('update_part_research'), 682 'L_RESULT_METADATA'=>$result_title.l10n('update_result_metadata'), 683 683 'METADATA_LIST' => $used_metadata 684 684 )); -
trunk/include/functions.inc.php
r1029 r1033 431 431 function pwg_query($query) 432 432 { 433 global $conf,$page,$debug ;433 global $conf,$page,$debug,$t2; 434 434 435 435 $start = get_moment(); … … 456 456 $output.= "\n".'(total SQL time : '; 457 457 $output.= number_format($page['queries_time'], 3, '.', ' ').' s)'; 458 $output.= "\n".'(total time : '; 459 $output.= number_format( ($time+$start-$t2), 3, '.', ' ').' s)'; 458 460 $output.= "</pre>\n"; 459 461 … … 466 468 function pwg_debug( $string ) 467 469 { 468 global $debug,$t2,$ count_queries;470 global $debug,$t2,$page; 469 471 470 472 $now = explode( ' ', microtime() ); … … 474 476 $debug .= '<p>'; 475 477 $debug.= '['.$time.', '; 476 $debug.= $ count_queries.' queries] : '.$string;478 $debug.= $page['count_queries'].' queries] : '.$string; 477 479 $debug.= "</p>\n"; 478 480 } … … 975 977 976 978 /** 977 * returns the $str in current language if possible or $str enclosed978 * in special chars979 */980 function get_lang($str)981 {982 global $lang;983 if ( isset($lang[$str]) )984 {985 return $lang[$str];986 }987 return '@@'.$str.'@@';988 }989 990 /**991 979 * which upgrades are available ? 992 980 *
Note: See TracChangeset
for help on using the changeset viewer.