Changeset 1891
- Timestamp:
- Mar 11, 2007, 4:11:53 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/history.php
r1890 r1891 303 303 } 304 304 305 if (isset($row['tag_ids'])) 306 { 307 foreach (explode(',', $row['tag_ids']) as $tag_id) 308 { 309 array_push($tag_ids, $tag_id); 310 } 311 } 312 305 313 array_push( 306 314 $history_lines, … … 379 387 380 388 // echo '<pre>'; print_r($high_filesize_of_image); echo '</pre>'; 389 } 390 391 if (count($tag_ids) > 0) 392 { 393 $tag_ids = array_unique($tag_ids); 394 395 $query = ' 396 SELECT 397 id, 398 name 399 FROM '.TAGS_TABLE.' 400 WHERE id IN ('.implode(', ', $tag_ids).') 401 ;'; 402 $name_of_tag = array(); 403 404 $result = pwg_query($query); 405 while ($row = mysql_fetch_array($result)) 406 { 407 $name_of_tag[ $row['id'] ] = $row['name']; 408 } 381 409 } 382 410 … … 428 456 $user_string.= '&user_id='.$line['user_id']; 429 457 $user_string.= '">+</a>'; 458 459 $tags_string = ''; 460 if (isset($line['tag_ids'])) 461 { 462 $tags_string = preg_replace( 463 '/(\d+)/e', 464 '$name_of_tag["$1"]', 465 str_replace( 466 ',', 467 ', ', 468 $line['tag_ids'] 469 ) 470 ); 471 } 430 472 431 473 $template->assign_block_vars( … … 456 498 : 'deleted '.$line['category_id'] ) 457 499 : '', 458 'TAGS' => $ line['tag_ids'],500 'TAGS' => $tags_string, 459 501 'T_CLASS' => ($i % 2) ? 'row1' : 'row2', 460 502 ) … … 602 644 $selected = ''; 603 645 604 if ($row['id'] == $form['user']) 646 if (isset($form['user']) 647 and $row['id'] == $form['user']) 605 648 { 606 649 $selected = 'selected="selected"';
Note: See TracChangeset
for help on using the changeset viewer.