diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-04-13 23:58:28 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-04-13 23:58:28 +0000 |
commit | f386460ec31490ced9d169afe500dfb00ae3aed8 (patch) | |
tree | dfbd2049af849520bd250cb2c399c2571470de6f /include/section_init.inc.php | |
parent | 38ca856ea4adf9daf7cdb91e580a70ab176eb6f4 (diff) |
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)
git-svn-id: http://piwigo.org/svn/trunk@1956 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/section_init.inc.php')
-rw-r--r-- | include/section_init.inc.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php index 9b16f937b..1d4f63723 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -140,6 +140,7 @@ if (0 === strpos(@$tokens[$next_token], 'categor')) { if ( strpos($tokens[$next_token], 'created-')!==0 and strpos($tokens[$next_token], 'posted-')!==0 + and strpos($tokens[$next_token], 'start-')!==0 and $tokens[$next_token] != 'flat') {// try a permalink $cat_id = get_cat_id_from_permalink($tokens[$next_token]); @@ -159,8 +160,16 @@ if (0 === strpos(@$tokens[$next_token], 'categor')) unset($cat_id); $next_token++; } + elseif ( script_basename()=='picture' ) + { //access a picture only by id, file or id-file without given section + $page['flat']=true; + } } } + elseif ( script_basename()=='picture' ) + { //access a picture only by id, file or id-file without given section + $page['flat']=true; + } } else if (0 === strpos(@$tokens[$next_token], 'tag')) { @@ -314,7 +323,8 @@ while (isset($tokens[$i])) } if ('categories' == $page['section'] and - 'flat' == $tokens[$i]) + 'flat' == $tokens[$i] and + !isset($page['chronology_field']) ) { // indicate a special list of images $page['flat'] = true; @@ -340,12 +350,12 @@ while (isset($tokens[$i])) } $page['chronology_date'] = $chronology_tokens; } + unset($page['flat']); } $i++; } - // $page['nb_image_page'] is the number of picture to display on this page // By default, it is the same as the $user['nb_image_page'] $page['nb_image_page'] = $user['nb_image_page']; |