- Timestamp:
- Jan 15, 2005, 11:31:26 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/update.php
r675 r691 248 248 } 249 249 250 echo '<!-- scanning dirs : '; 250 251 echo get_elapsed_time($start, get_moment()); 251 echo ' for new method scanning directories<br />';252 echo ' -->'."\n"; 252 253 } 253 254 // +-----------------------------------------------------------------------+ … … 261 262 $fs = get_fs($basedir); 262 263 263 echo get_elapsed_time($start, get_moment()); 264 echo ' for get_fs<br />'; 264 echo '<!-- get_fs : '.get_elapsed_time($start, get_moment()).' -->'."\n"; 265 265 266 266 $cat_ids = array_diff(array_keys($db_categories), $to_delete); … … 451 451 } 452 452 453 echo '<!-- scanning files : '; 453 454 echo get_elapsed_time($start_files, get_moment()); 454 echo ' for new method scanning files<br />';455 echo ' -->'."\n"; 455 456 } 456 457 // +-----------------------------------------------------------------------+ … … 469 470 array( 470 471 'L_SUBMIT'=>$lang['submit'], 472 'L_RESET'=>$lang['reset'], 471 473 'L_UPDATE_TITLE'=>$lang['update_default_title'], 472 474 'L_UPDATE_SYNC_FILES'=>$lang['update_sync_files'], … … 496 498 // | introduction : choices | 497 499 // +-----------------------------------------------------------------------+ 498 if (!isset($_POST['submit']) )500 if (!isset($_POST['submit']) or (isset($simulate) and $simulate)) 499 501 { 500 502 $template->assign_block_vars('introduction', array()); 503 504 if (isset($simulate) and $simulate) 505 { 506 switch ($_POST['sync']) 507 { 508 case 'dirs' : 509 { 510 $template->assign_vars( 511 array('SYNC_DIRS_CHECKED'=>'checked="checked"')); 512 break; 513 } 514 case 'files' : 515 { 516 $template->assign_vars( 517 array('SYNC_ALL_CHECKED'=>'checked="checked"')); 518 break; 519 } 520 } 521 522 if (isset($_POST['display_info']) and $_POST['display_info'] == 1) 523 { 524 $template->assign_vars( 525 array('DISPLAY_INFO_CHECKED'=>'checked="checked"')); 526 } 527 528 if (isset($_POST['subcats-included']) and $_POST['subcats-included'] == 1) 529 { 530 $template->assign_vars( 531 array('SUBCATS_INCLUDED_CHECKED'=>'checked="checked"')); 532 } 533 534 if (isset($_POST['cat']) and is_numeric($_POST['cat'])) 535 { 536 $cat_selected = array($_POST['cat']); 537 } 538 else 539 { 540 $cat_selected = array(); 541 } 542 } 543 else 544 { 545 $template->assign_vars( 546 array('SYNC_DIRS_CHECKED' => 'checked="checked"', 547 'SUBCATS_INCLUDED_CHECKED'=>'checked="checked"')); 548 549 $cat_selected = array(); 550 } 501 551 502 552 $query = ' … … 506 556 ;'; 507 557 display_select_cat_wrapper($query, 508 array(),558 $cat_selected, 509 559 'introduction.category_option', 510 560 false); … … 513 563 // | synchronize files | 514 564 // +-----------------------------------------------------------------------+ 515 elseif (isset($_POST['submit'])516 565 if (isset($_POST['submit']) 566 and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')) 517 567 { 518 568 $template->assign_block_vars( … … 559 609 $start = get_moment(); 560 610 update_category('all'); 611 echo '<!-- update_category(all) : '; 561 612 echo get_elapsed_time($start,get_moment()); 562 echo ' for update_category(all)<br />';613 echo ' -->'."\n"; 563 614 $start = get_moment(); 564 615 ordering(); 565 616 update_global_rank(); 617 echo '<!-- ordering categories : '; 566 618 echo get_elapsed_time($start, get_moment()); 567 echo ' for ordering categories<br />';619 echo ' -->'."\n"; 568 620 } 569 621 } … … 598 650 $opts['recursive'], 599 651 $opts['only_new']); 600 echo get_elapsed_time($start, get_moment()).' for get_filelist<br />'; 652 653 echo '<!-- get_filelist : '; 654 echo get_elapsed_time($start, get_moment()); 655 echo ' -->'."\n"; 601 656 602 657 $start = get_moment(); 603 658 update_metadata($files); 604 echo get_elapsed_time($start, get_moment()).' for metadata update<br />'; 659 echo '<!-- metadata update : '; 660 echo get_elapsed_time($start, get_moment()); 661 echo ' -->'."\n"; 605 662 } 606 663 // +-----------------------------------------------------------------------+ -
trunk/template/default/admin/update.tpl
r659 r691 1 <!-- BEGIN introduction -->2 <div class="admin">{L_UPDATE_TITLE}</div>3 <form action="{F_ACTION}" method="post">4 <ul class="menu">5 <li>6 {L_UPDATE_SYNC_FILES}7 <ul class="menu">8 <li><input type="radio" name="sync" value="dirs" checked="checked" /> {L_UPDATE_SYNC_DIRS}</li>9 <li><input type="radio" name="sync" value="files" /> {L_UPDATE_SYNC_ALL}</li>10 <li><input type="checkbox" name="display_info" value="1" /> {L_UPDATE_DISPLAY_INFO}</li>11 <li><input type="checkbox" name="simulate" value="1" checked="checked" /> {L_UPDATE_SIMULATE}</li>12 </ul>13 </li>14 <li>15 {L_UPDATE_SYNC_METADATA}16 <ul class="menu">17 <li><input type="radio" name="sync" value="metadata_new" /> {L_UPDATE_SYNC_METADATA_NEW}</li>18 <li><input type="radio" name="sync" value="metadata_all" /> {L_UPDATE_SYNC_METADATA_ALL}</li>19 </ul>20 </li>21 <li>22 {L_UPDATE_CATS_SUBSET}<br />23 <select style="width:500px" name="cat" size="10">24 <!-- BEGIN category_option -->25 <option {introduction.category_option.SELECTED} value="{introduction.category_option.VALUE}">{introduction.category_option.OPTION}</option>26 <!-- END category_option -->27 </select>28 <input type="checkbox" name="subcats-included" value="1" checked="checked" /> {L_SEARCH_SUBCATS_INCLUDED}29 </li>30 </ul>31 <p style="text-align:center;"><input type="submit" value="{L_SUBMIT}" name="submit" class="bouton" /></p>32 </form>33 <!-- END introduction -->34 1 <!-- BEGIN update --> 35 2 <div class="admin">{L_RESULT_UPDATE}</div> … … 56 23 <!-- BEGIN infos --> 57 24 <div class="admin">{L_UPDATE_INFOS_TITLE}</div> 58 <ul style="text-align:left;"> 59 <!-- BEGIN info --> 25 <ul style="text-align:left;"> 26 <!-- BEGIN info --> 60 27 <li>[{update.infos.info.ELEMENT}] {update.infos.info.LABEL}</li> 61 <!-- END info --> 28 <!-- END info --> 62 29 </ul> 63 30 <!-- END infos --> 64 31 <!-- END update --> 32 <!-- BEGIN introduction --> 33 <div class="admin">{L_UPDATE_TITLE}</div> 34 <form action="{F_ACTION}" method="post"> 35 <ul class="menu"> 36 <li> 37 {L_UPDATE_SYNC_FILES} 38 <ul class="menu"> 39 <li><input type="radio" name="sync" value="dirs" {SYNC_DIRS_CHECKED} /> {L_UPDATE_SYNC_DIRS}</li> 40 <li><input type="radio" name="sync" value="files" {SYNC_ALL_CHECKED} /> {L_UPDATE_SYNC_ALL}</li> 41 <li><input type="checkbox" name="display_info" value="1" {DISPLAY_INFO_CHECKED} /> {L_UPDATE_DISPLAY_INFO}</li> 42 <li><input type="checkbox" name="simulate" value="1" checked="checked" /> {L_UPDATE_SIMULATE}</li> 43 </ul> 44 </li> 45 <li> 46 {L_UPDATE_SYNC_METADATA} 47 <ul class="menu"> 48 <li><input type="radio" name="sync" value="metadata_new" /> {L_UPDATE_SYNC_METADATA_NEW}</li> 49 <li><input type="radio" name="sync" value="metadata_all" /> {L_UPDATE_SYNC_METADATA_ALL}</li> 50 </ul> 51 </li> 52 <li> 53 {L_UPDATE_CATS_SUBSET}<br /> 54 <select style="width:500px" name="cat" size="10"> 55 <!-- BEGIN category_option --> 56 <option {introduction.category_option.SELECTED} value="{introduction.category_option.VALUE}">{introduction.category_option.OPTION}</option> 57 <!-- END category_option --> 58 </select> 59 <input type="checkbox" name="subcats-included" value="1" {SUBCATS_INCLUDED_CHECKED} /> {L_SEARCH_SUBCATS_INCLUDED} 60 </li> 61 </ul> 62 <p style="text-align:center;"> 63 <input type="submit" value="{L_SUBMIT}" name="submit" class="bouton" /> 64 <input type="reset" value="{L_RESET}" name="reset" class="bouton" /> 65 </p> 66 </form> 67 <!-- END introduction -->
Note: See TracChangeset
for help on using the changeset viewer.