Changeset 498
- Timestamp:
- Aug 29, 2004, 1:21:21 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r496 r498 193 193 function delete_categories($ids) 194 194 { 195 global $counts; 196 195 197 // destruction of all the related elements 196 198 $query = ' … … 252 254 ;'; 253 255 mysql_query($query); 254 } 255 256 257 if (isset($counts['del_categories'])) 258 { 259 $counts['del_categories']+= count($ids); 260 } 261 } 256 262 257 263 // The function delete_elements deletes the elements identified by the … … 262 268 function delete_elements($ids) 263 269 { 264 global $count _deleted;270 global $counts; 265 271 266 272 // destruction of the comments on the image … … 296 302 mysql_query($query); 297 303 298 $count_deleted+= count($ids); 304 if (isset($counts['del_elements'])) 305 { 306 $counts['del_elements']+= count($ids); 307 } 299 308 } 300 309 -
trunk/admin/update.php
r494 r498 69 69 function insert_local_category($id_uppercat) 70 70 { 71 global $conf, $page, $user, $lang ;71 global $conf, $page, $user, $lang, $counts; 72 72 73 73 $uppercats = ''; … … 189 189 else 190 190 { 191 $output.= '<span style="color:red;">"'.$fs_subdir.'" : ';191 $output.= '<span class="update_category_error">"'.$fs_subdir.'" : '; 192 192 $output.= $lang['update_wrong_dirname'].'</span><br />'; 193 193 } … … 206 206 ;'; 207 207 mysql_query($query); 208 209 $counts['new_categories']+= count($inserts); 208 210 // updating uppercats field 209 211 $query = ' … … 266 268 function insert_local_element($dir, $category_id) 267 269 { 268 global $lang,$conf,$count _new;270 global $lang,$conf,$counts; 269 271 270 272 $output = ''; … … 399 401 $insert['tn_ext'] = "'".$tn_ext."'"; 400 402 401 $count_new++; 402 $output.= $unregistered_element; 403 $output.= ' <span style="font-weight:bold;">'; 404 $output.= $lang['update_research_added'].'</span>'; 405 $output.= ' ('.$lang['update_research_tn_ext'].' '.$tn_ext.')'; 406 $output.= '<br />'; 403 $counts['new_elements']++; 407 404 array_push($inserts, $insert); 408 405 } 409 406 else 410 407 { 411 $output.= '<span style="color:orange;">';408 $output.= '<span class="update_error_element">'; 412 409 $output.= $lang['update_missing_tn'].' : '.$unregistered_element; 413 410 $output.= ' (<span style="font-weight:bold;">'; … … 450 447 } 451 448 452 $count_new++; 453 $output.= $unregistered_element; 454 $output.= ' <span style="font-weight:bold;">'; 455 $output.= $lang['update_research_added'].'</span>'; 456 $output.= '<br />'; 449 $counts['new_elements']++; 457 450 array_push($inserts, $insert); 458 451 } … … 460 453 else 461 454 { 462 $output.= '<span style="color:red;">"'.$unregistered_element.'" : '; 455 $output.= '<span class="update_error_element">"'; 456 $output.= $unregistered_element.'" : '; 463 457 $output.= $lang['update_wrong_dirname'].'</span><br />'; 464 458 } … … 553 547 'L_ALL_UPDATE'=>$lang['update_all'], 554 548 'L_RESULT_UPDATE'=>$lang['update_part_research'], 555 'L_NEW_CATEGORY'=>$lang['update_research_conclusion'], 556 'L_DEL_CATEGORY'=>$lang['update_deletion_conclusion'], 549 'L_NB_NEW_ELEMENTS'=>$lang['update_nb_new_elements'], 550 'L_NB_NEW_CATEGORIES'=>$lang['update_nb_new_categories'], 551 'L_NB_DEL_ELEMENTS'=>$lang['update_nb_del_elements'], 552 'L_NB_DEL_CATEGORIES'=>$lang['update_nb_del_categories'], 557 553 'L_UPDATE_SYNC_METADATA_QUESTION'=>$lang['update_sync_metadata_question'], 558 554 … … 571 567 check_cat_id($_GET['update']); 572 568 $start = get_moment(); 573 $count_new = 0; 574 $count_deleted = 0; 569 $counts = array( 570 'new_elements' => 0, 571 'new_categories' => 0, 572 'del_elements' => 0, 573 'del_categories' => 0 574 ); 575 575 576 576 if (isset($page['cat'])) … … 583 583 } 584 584 echo get_elapsed_time($start,get_moment()).' for scanning directories<br />'; 585 $template->assign_block_vars('update',array( 586 'CATEGORIES'=>$categories, 587 'NEW_CAT'=>$count_new, 588 'DEL_CAT'=>$count_deleted 589 )); 590 if ($count_new > 0) 585 $template->assign_block_vars( 586 'update', 587 array( 588 'CATEGORIES'=>$categories, 589 'NB_NEW_CATEGORIES'=>$counts['new_categories'], 590 'NB_DEL_CATEGORIES'=>$counts['del_categories'], 591 'NB_NEW_ELEMENTS'=>$counts['new_elements'], 592 'NB_DEL_ELEMENTS'=>$counts['del_elements'] 593 )); 594 if ($counts['new_elements'] > 0) 591 595 { 592 596 $url = PHPWG_ROOT_PATH.'admin.php?page=update&metadata=1'; -
trunk/language/en_UK.iso-8859-1/admin.lang.php
r493 r498 262 262 $lang['update_disappeared'] = 'doesn\'t exist'; 263 263 $lang['update_part_deletion'] = 'Deletion of images that have no thumbnail or that doesn\'t exist'; 264 $lang['update_deletion_conclusion'] = 'pictures removed from database';265 264 $lang['update_part_research'] = 'Search for new images in the directories'; 266 265 $lang['update_research_added'] = 'added'; 267 266 $lang['update_research_tn_ext'] = 'thumbnail in'; 268 $lang['update_research_conclusion'] = 'pictures added to the database'; 267 $lang['update_nb_new_elements'] = 'elements added in the database'; 268 $lang['update_nb_del_elements'] = 'elements deleted in the database'; 269 $lang['update_nb_new_categories'] = 'categories added in the database'; 270 $lang['update_nb_del_categories'] = 'categories deleted in the database'; 269 271 $lang['update_default_title'] = 'Choose an option'; 270 272 $lang['update_only_cat'] = 'update categories, not pictures'; -
trunk/template/default/admin/update.tpl
r486 r498 8 8 <!-- BEGIN update --> 9 9 <div class="admin">{L_RESULT_UPDATE}</div> 10 <br /><span style="color:#9cb4ce;">{update.NEW_CAT} {L_NEW_CATEGORY}</span> 11 <br /><span style="color:#ffe1e1;">{update.DEL_CAT} {L_DEL_CATEGORY}</span> 10 <ul style="text-align:left;"> 11 <li class="update_summary_new">{update.NB_NEW_CATEGORIES} {L_NB_NEW_CATEGORIES}</li> 12 <li class="update_summary_new">{update.NB_NEW_ELEMENTS} {L_NB_NEW_ELEMENTS}</li> 13 <li class="update_summary_del">{update.NB_DEL_CATEGORIES} {L_NB_DEL_CATEGORIES}</li> 14 <li class="update_summary_del">{update.NB_DEL_ELEMENTS} {L_NB_DEL_ELEMENTS}</li> 15 </ul> 12 16 <!-- BEGIN sync_metadata --> 13 17 <br />[ <a href="{update.sync_metadata.U_URL}">{L_UPDATE_SYNC_METADATA_QUESTION}</a> ] -
trunk/template/default/default.css
r479 r498 328 328 font-weight:normal; 329 329 } 330 331 span.update_error_element, span.update_category_error { 332 color:orange; 333 } 334 335 .update_summary_new { 336 color:#9cb4ce; 337 } 338 339 .update_summary_del { 340 color:#ffe1e1; 341 }
Note: See TracChangeset
for help on using the changeset viewer.