Changeset 1955


Ignore:
Timestamp:
Apr 14, 2007, 1:57:55 AM (17 years ago)
Author:
rvelices
Message:

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:
branches/branch-1_7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/admin/permalinks.php

    r1900 r1955  
    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');
  • branches/branch-1_7/include/functions_url.inc.php

    r1900 r1955  
    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);
  • branches/branch-1_7/include/section_init.inc.php

    r1949 r1955  
    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
Note: See TracChangeset for help on using the changeset viewer.