Changeset 2772
- Timestamp:
- Oct 18, 2008, 3:07:13 AM (16 years ago)
- Location:
- branches/2.0/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/include/functions_html.inc.php
r2748 r2772 82 82 $pages_around = $conf['paginate_pages_around']; 83 83 $start_str = $clean_url ? '/start-' : 84 ( ( str str($url, '?')===false ? '?':'&') . 'start=' );84 ( ( strpos($url, '?')===false ? '?':'&') . 'start=' ); 85 85 86 86 $navbar = ''; … … 782 782 { 783 783 global $conf; 784 if ( !( $conf['allow_html_descriptions'] and 785 preg_match('/<(div|br|img|script).*>/i', $desc) ) ) 784 if ( !$conf['allow_html_descriptions'] ) 786 785 { 787 786 $desc = nl2br($desc); -
branches/2.0/include/functions_url.inc.php
r2502 r2772 100 100 { 101 101 $is_first = false; 102 $url .= ( str str($url, '?')===false ) ? '?' :'&';102 $url .= ( strpos($url, '?')===false ) ? '?' :'&'; 103 103 } 104 104 else … … 246 246 { 247 247 $fname_wo_ext = get_filename_wo_extension($params['image_file']); 248 if ( !preg_match('/^\d+(-|$)/', $fname_wo_ext) )248 if ( ord($fname_wo_ext)>ord('9') or !preg_match('/^\d+(-|$)/', $fname_wo_ext) ) 249 249 { 250 250 $url .= $fname_wo_ext; … … 441 441 { 442 442 $page=array(); 443 if ( 0 === strpos(@$tokens[$next_token], 'categor'))443 if (strncmp(@$tokens[$next_token], 'categor', 7)==0 ) 444 444 { 445 445 $page['section'] = 'categories'; … … 506 506 } 507 507 } 508 else if (0 === strpos(@$tokens[$next_token], 'tag'))508 elseif ( 'tags' == @$tokens[$next_token] ) 509 509 { 510 510 $page['section'] = 'tags'; … … 519 519 while (isset($tokens[$i])) 520 520 { 521 if ( preg_match('/^(created-|posted-|start-(\d)+)/', $tokens[$i]) ) 521 if (strpos($tokens[$i], 'created-')===0 522 or strpos($tokens[$i], 'posted-')===0 523 or strpos($tokens[$i], 'start-')===0 ) 522 524 break; 523 525 … … 545 547 } 546 548 } 547 else if (0 === strpos(@$tokens[$next_token], 'fav'))549 elseif ( 'favorites' == @$tokens[$next_token] ) 548 550 { 549 551 $page['section'] = 'favorites'; 550 552 $next_token++; 551 553 } 552 else 554 elseif ('most_visited' == @$tokens[$next_token]) 553 555 { 554 556 $page['section'] = 'most_visited'; 555 557 $next_token++; 556 558 } 557 else 559 elseif ('best_rated' == @$tokens[$next_token]) 558 560 { 559 561 $page['section'] = 'best_rated'; 560 562 $next_token++; 561 563 } 562 else 564 elseif ('recent_pics' == @$tokens[$next_token]) 563 565 { 564 566 $page['section'] = 'recent_pics'; 565 567 $next_token++; 566 568 } 567 else 569 elseif ('recent_cats' == @$tokens[$next_token]) 568 570 { 569 571 $page['section'] = 'recent_cats'; 570 572 $next_token++; 571 573 } 572 else 574 elseif ('search' == @$tokens[$next_token]) 573 575 { 574 576 $page['section'] = 'search'; … … 583 585 $next_token++; 584 586 } 585 else 587 elseif ('list' == @$tokens[$next_token]) 586 588 { 587 589 $page['section'] = 'list'; … … 622 624 while (isset($tokens[$i])) 623 625 { 624 if (preg_match('/^start-(\d+)/', $tokens[$i], $matches))625 {626 $page['start'] = $matches[1];627 }628 629 626 if ( 'flat' == $tokens[$i] ) 630 627 { … … 632 629 $page['flat'] = true; 633 630 } 634 635 if (preg_match('/^(posted|created)/', $tokens[$i] )) 631 elseif (strpos($tokens[$i], 'created-')===0 or strpos($tokens[$i], 'posted-')===0) 636 632 { 637 633 $chronology_tokens = explode('-', $tokens[$i] ); … … 654 650 } 655 651 } 652 elseif (preg_match('/^start-(\d+)/', $tokens[$i], $matches)) 653 { 654 $page['start'] = $matches[1]; 655 } 656 656 $i++; 657 657 } -
branches/2.0/include/section_init.inc.php
r2517 r2772 66 66 67 67 // deleting first "/" if displayed 68 $tokens = explode( 69 '/', 70 preg_replace('#^/#', '', $rewritten) 71 ); 68 $tokens = explode('/', ltrim($rewritten, '/') ); 72 69 // $tokens = array( 73 70 // 0 => category, … … 184 181 { 185 182 $image_order_id = pwg_get_session_var('image_order'); 186 183 187 184 $orders = get_category_preferred_image_orders(); 188 185 … … 340 337 } 341 338 342 $title = get_tags_content_title(); 343 344 $page = array_merge( 345 $page, 346 array( 347 'title' => $title, 339 $page = array_merge( 340 $page, 341 array( 342 'title' => get_tags_content_title(), 348 343 'items' => $items, 349 344 )
Note: See TracChangeset
for help on using the changeset viewer.