Changeset 1861 for trunk/include/functions_url.inc.php
- Timestamp:
- Feb 27, 2007, 2:56:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_url.inc.php
r1800 r1861 4 4 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 5 5 // +-----------------------------------------------------------------------+ 6 // | branch : BSF (Best So Far)7 6 // | file : $Id$ 8 7 // | last update : $Date$ … … 134 133 * and removes. 135 134 * 136 * duplicate_index_url(array('category' => 12), array('start')) will create 137 * an index URL on the current section (categories), but on a redefined 138 * category and without the start URL parameter. 135 * duplicate_index_url( array( 136 * 'category' => array('id'=>12, 'name'=>'toto'), 137 * array('start') 138 * ) will create an index URL on the current section (categories), but on 139 * a redefined category and without the start URL parameter. 139 140 * 140 141 * @param array redefined keys … … 326 327 else 327 328 { 328 $section_string.= '/category/'.$params['category']; 329 if ($conf['category_url_style']=='id-name' and isset($params['cat_name']) ) 329 is_array($params['category']) or trigger_error( 330 'make_section_in_url wrong type for category', E_USER_WARNING 331 ); 332 is_numeric($params['category']['id']) or trigger_error( 333 'make_section_in_url category id not numeric', E_USER_WARNING 334 ); 335 isset($params['category']['name']) or trigger_error( 336 'make_section_in_url category name not set', E_USER_WARNING 337 ); 338 339 $section_string.= '/category/'.$params['category']['id']; 340 if ( $conf['category_url_style']=='id-name' ) 330 341 { 331 if ( is_string($params['cat_name']) ) 332 { 333 $section_string.= '-'.str2url($params['cat_name']); 334 } 335 elseif ( is_array( $params['cat_name'] ) and 336 isset( $params['cat_name'][$params['category']] ) ) 337 { 338 $section_string.= '-' 339 .str2url($params['cat_name'][$params['category']]); 340 } 342 $section_string.= '-'.str2url($params['category']['name']); 341 343 } 342 344 }
Note: See TracChangeset
for help on using the changeset viewer.