Changeset 2276 for trunk/admin/site_update.php
- Timestamp:
- Mar 12, 2008, 2:06:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/site_update.php
r2114 r2276 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 7PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | file : $Id$ … … 352 352 } 353 353 354 $template-> output .='<!-- scanning dirs : '354 $template->append('footer_elements', '<!-- scanning dirs : ' 355 355 . get_elapsed_time($start, get_moment()) 356 . ' -->' ."\n";356 . ' -->' ); 357 357 } 358 358 // +-----------------------------------------------------------------------+ … … 366 366 367 367 $fs = $site_reader->get_elements($basedir); 368 $template-> output .='<!-- get_elements: '368 $template->append('footer_elements', '<!-- get_elements: ' 369 369 . get_elapsed_time($start, get_moment()) 370 . " -->\n";370 . ' -->' ); 371 371 372 372 $cat_ids = array_diff(array_keys($db_categories), $to_delete); … … 582 582 } 583 583 584 $template-> output .='<!-- scanning files : '584 $template->append('footer_elements', '<!-- scanning files : ' 585 585 . get_elapsed_time($start_files, get_moment()) 586 . ' -->' ."\n";586 . ' -->' ); 587 587 588 588 // retrieving informations given by uploaders … … 654 654 $start = get_moment(); 655 655 update_category('all'); 656 $template-> output .='<!-- update_category(all) : '656 $template->append('footer_elements', '<!-- update_category(all) : ' 657 657 . get_elapsed_time($start,get_moment()) 658 . ' -->' ."\n";658 . ' -->' ); 659 659 $start = get_moment(); 660 660 ordering(); 661 661 update_global_rank(); 662 $template-> output .='<!-- ordering categories : '662 $template->append('footer_elements', '<!-- ordering categories : ' 663 663 . get_elapsed_time($start, get_moment()) 664 . ' -->' ."\n";664 . ' -->'); 665 665 } 666 666 … … 681 681 $opts['recursive'], 682 682 false); 683 $template-> output .='<!-- get_filelist : '683 $template->append('footer_elements', '<!-- get_filelist : ' 684 684 . get_elapsed_time($start, get_moment()) 685 . ' -->' ."\n";685 . ' -->'); 686 686 $start = get_moment(); 687 687 … … 727 727 ); 728 728 } 729 $template-> output .='<!-- update files : '729 $template->append('footer_elements', '<!-- update files : ' 730 730 . get_elapsed_time($start,get_moment()) 731 . ' -->' ."\n";731 . ' -->'); 732 732 }// end if sync files 733 733 } … … 739 739 and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')) 740 740 { 741 $template->assign _block_vars(741 $template->assign( 742 742 'update_result', 743 743 array( … … 783 783 $opts['only_new']); 784 784 785 $template-> output .='<!-- get_filelist : '785 $template->append('footer_elements', '<!-- get_filelist : ' 786 786 . get_elapsed_time($start, get_moment()) 787 . ' -->' ."\n";787 . ' -->'); 788 788 789 789 $start = get_moment(); … … 880 880 } 881 881 882 $template-> output .='<!-- metadata update : '882 $template->append('footer_elements', '<!-- metadata update : ' 883 883 . get_elapsed_time($start, get_moment()) 884 . ' -->' ."\n";885 886 $template->assign _block_vars(884 . ' -->'); 885 886 $template->assign( 887 887 'metadata_result', 888 888 array( … … 911 911 } 912 912 913 $template->assign _vars(913 $template->assign( 914 914 array( 915 915 'SITE_URL'=>$site_url, 916 'U_SITE_MANAGER'=> PHPWG_ROOT_PATH.'admin.php?page=site_manager',916 'U_SITE_MANAGER'=> get_root_url().'admin.php?page=site_manager', 917 917 'L_RESULT_UPDATE'=>$result_title.l10n('update_part_research'), 918 918 'L_RESULT_METADATA'=>$result_title.l10n('update_result_metadata'), 919 'METADATA_LIST' => $used_metadata 919 'METADATA_LIST' => $used_metadata, 920 'U_HELP' => get_root_url().'popuphelp.php?page=synchronize', 920 921 )); 921 922 922 $template->assign_vars(923 array(924 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=synchronize'925 )926 );927 923 // +-----------------------------------------------------------------------+ 928 924 // | introduction : choices | … … 930 926 if (!isset($_POST['submit']) or (isset($simulate) and $simulate)) 931 927 { 932 $template->assign_block_vars('introduction', array());933 934 928 if (isset($simulate) and $simulate) 935 929 { 936 switch ($_POST['sync']) 937 { 938 case 'dirs' : 939 { 940 $template->assign_vars( 941 array('SYNC_DIRS_CHECKED'=>'checked="checked"')); 942 break; 943 } 944 case 'files' : 945 { 946 $template->assign_vars( 947 array('SYNC_ALL_CHECKED'=>'checked="checked"')); 948 break; 949 } 950 case 'metadata_new' : 951 { 952 $template->assign_vars( 953 array('SYNC_META_NEW_CHECKED'=>'checked="checked"')); 954 break; 955 } 956 case 'metadata_all' : 957 { 958 $template->assign_vars( 959 array('SYNC_META_ALL_CHECKED'=>'checked="checked"')); 960 break; 961 } 962 } 963 964 if (isset($_POST['display_info']) and $_POST['display_info'] == 1) 965 { 966 $template->assign_vars( 967 array('DISPLAY_INFO_CHECKED'=>'checked="checked"')); 968 } 969 970 if (isset($_POST['add_to_caddie']) and $_POST['add_to_caddie'] == 1) 971 { 972 $template->assign_vars( 973 array('ADD_TO_CADDIE_CHECKED'=>'checked="checked"')); 974 } 975 976 if (isset($_POST['subcats-included']) and $_POST['subcats-included'] == 1) 977 { 978 $template->assign_vars( 979 array('SUBCATS_INCLUDED_CHECKED'=>'checked="checked"')); 980 } 930 $tpl_introduction = array( 931 'sync' => $_POST['sync'], 932 'display_info' => isset($_POST['display_info']) and $_POST['display_info']==1, 933 'add_to_caddie' => isset($_POST['add_to_caddie']) and $_POST['add_to_caddie']==1, 934 'subcats_included' => isset($_POST['subcats-included']) and $_POST['subcats-included']==1, 935 ); 981 936 982 937 if (isset($_POST['cat']) and is_numeric($_POST['cat'])) … … 991 946 else 992 947 { 993 $template->assign_vars( 994 array('SYNC_DIRS_CHECKED' => 'checked="checked"', 995 'SUBCATS_INCLUDED_CHECKED'=>'checked="checked"')); 948 $tpl_introduction = array( 949 'sync' => 'dirs', 950 'display_info' => false, 951 'add_to_caddie' => false, 952 'subcats_included' => true, 953 ); 996 954 997 955 $cat_selected = array(); 998 956 } 957 958 $template->assign('introduction', $tpl_introduction); 999 959 1000 960 $query = ' … … 1005 965 display_select_cat_wrapper($query, 1006 966 $cat_selected, 1007 ' introduction.category_option',967 'category_options', 1008 968 false); 1009 969 } … … 1011 971 if (count($errors) > 0) 1012 972 { 1013 $template->assign_block_vars('sync_errors', array());1014 973 foreach ($errors as $error) 1015 974 { 1016 $template->a ssign_block_vars(1017 'sync_errors .error',975 $template->append( 976 'sync_errors', 1018 977 array( 1019 978 'ELEMENT' => $error['path'], … … 1024 983 foreach ($error_labels as $error_type=>$error_description) 1025 984 { 1026 $template->a ssign_block_vars(1027 'sync_error s.error_caption',985 $template->append( 986 'sync_error_captions', 1028 987 array( 1029 988 'TYPE' => $error_type, … … 1031 990 )); 1032 991 } 1033 1034 } 992 } 993 1035 994 if (count($infos) > 0 1036 995 and isset($_POST['display_info']) 1037 996 and $_POST['display_info'] == 1) 1038 997 { 1039 $template->assign_block_vars('sync_infos', array());1040 998 foreach ($infos as $info) 1041 999 { 1042 $template->a ssign_block_vars(1043 'sync_infos .info',1000 $template->append( 1001 'sync_infos', 1044 1002 array( 1045 1003 'ELEMENT' => $info['path'],
Note: See TracChangeset
for help on using the changeset viewer.