Changeset 1956


Ignore:
Timestamp:
04/14/07 01:58:28 (13 years ago)
Author:
rvelices
Message:

merge r1955 from branch-1_7 to trunk:
flat view small improvements (picture page on root category sorter urls and works in several cases)
correction in permalinks admin (error was assignment in if instead of comparison)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/permalinks.php

    r1900 r1956  
    138138} 
    139139 
    140 if ( !count($sort_by) or $sort_by[0]='name') 
     140if ( !count($sort_by) or $sort_by[0]=='name') 
    141141{ 
    142142  usort($categories, 'global_rank_compare'); 
  • trunk/include/functions_url.inc.php

    r1900 r1956  
    247247      $url .= $params['image_id']; 
    248248  } 
     249  if ( !isset($params['category'] ) ) 
     250  {// make urls shorter ... 
     251    unset( $params['flat'] );  
     252  } 
    249253  $url .= make_section_in_url($params); 
    250254  $url = add_well_known_params_in_url($url, $params); 
  • trunk/include/section_init.inc.php

    r1950 r1956  
    141141      if ( strpos($tokens[$next_token], 'created-')!==0 
    142142          and strpos($tokens[$next_token], 'posted-')!==0 
     143          and strpos($tokens[$next_token], 'start-')!==0 
    143144          and $tokens[$next_token] != 'flat') 
    144145      {// try a permalink 
     
    160161        $next_token++; 
    161162      } 
    162     } 
     163      elseif ( script_basename()=='picture' ) 
     164      { //access a picture only by id, file or id-file without given section 
     165        $page['flat']=true; 
     166      } 
     167    } 
     168  } 
     169  elseif ( script_basename()=='picture' ) 
     170  { //access a picture only by id, file or id-file without given section 
     171    $page['flat']=true; 
    163172  } 
    164173} 
     
    315324 
    316325  if ('categories' == $page['section'] and 
    317       'flat' == $tokens[$i]) 
     326      'flat' == $tokens[$i] and 
     327      !isset($page['chronology_field']) ) 
    318328  { 
    319329    // indicate a special list of images 
     
    341351      $page['chronology_date'] = $chronology_tokens; 
    342352    } 
     353    unset($page['flat']); 
    343354  } 
    344355 
    345356  $i++; 
    346357} 
    347  
    348358 
    349359// $page['nb_image_page'] is the number of picture to display on this page 
Note: See TracChangeset for help on using the changeset viewer.