Changeset 2047 for trunk/include/functions_url.inc.php
- Timestamp:
- Jun 28, 2007, 4:16:03 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_url.inc.php
r2026 r2047 458 458 } 459 459 else 460 { 461 if ( strpos($tokens[$next_token], 'created-')!==0 462 and strpos($tokens[$next_token], 'posted-')!==0 460 {// try a permalink 461 $maybe_permalinks = array(); 462 $current_token = $next_token; 463 while ( isset($tokens[$current_token]) 464 and strpos($tokens[$current_token], 'created-')!==0 465 and strpos($tokens[$current_token], 'posted-')!==0 463 466 and strpos($tokens[$next_token], 'start-')!==0 464 and $tokens[$next_token] != 'flat') 465 {// try a permalink 466 $cat_id = get_cat_id_from_permalink($tokens[$next_token]); 467 if ( !isset($cat_id) ) 468 {//try old permalink 469 $cat_id = get_cat_id_from_old_permalink($tokens[$next_token], true); 467 and $tokens[$current_token] != 'flat') 468 { 469 if (empty($maybe_permalinks)) 470 { 471 array_push($maybe_permalinks, $tokens[$current_token]); 470 472 } 473 else 474 { 475 array_push($maybe_permalinks, 476 $maybe_permalinks[count($maybe_permalinks)-1] 477 . '/' . $tokens[$current_token] 478 ); 479 } 480 $current_token++; 481 } 482 483 if ( count($maybe_permalinks) ) 484 { 485 $cat_id = get_cat_id_from_permalinks($maybe_permalinks, $perma_index); 471 486 if ( isset($cat_id) ) 472 487 { 488 $next_token += $perma_index+1; 473 489 $page['category'] = $cat_id; 474 $page['hit_by']['cat_permalink'] = $ tokens[$next_token];490 $page['hit_by']['cat_permalink'] = $maybe_permalinks[$perma_index]; 475 491 } 476 492 else … … 478 494 page_not_found('Permalink for album not found'); 479 495 } 480 $next_token++;481 496 } 482 497 } 483 498 } 484 499
Note: See TracChangeset
for help on using the changeset viewer.