Changeset 1504 for branches


Ignore:
Timestamp:
Jul 26, 2006, 11:04:23 PM (18 years ago)
Author:
nikrou
Message:

svn merge -r1502:1503 (cosmetic change)
function names are case-insensitive but it's a good idea to call functions
as they appear in their declaration.
So all functions names that manipulate url like make_index_url()
are write with lowercase

Location:
branches/branch-1_6
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/admin/picture_modify.php

    r1313 r1504  
    337337    and in_array($_GET['cat_id'], $authorizeds))
    338338{
    339   $url_img = make_picture_URL(
     339  $url_img = make_picture_url(
    340340    array(
    341341      'image_id' => $_GET['image_id'],
     
    349349  foreach ($authorizeds as $category)
    350350  {
    351     $url_img = make_picture_URL(
     351    $url_img = make_picture_url(
    352352      array(
    353353        'image_id' => $_GET['image_id'],
  • branches/branch-1_6/include/functions_url.inc.php

    r1402 r1504  
    9393 * @return string
    9494 */
    95 function make_index_URL($params = array())
     95function make_index_url($params = array())
    9696{
    9797  global $conf;
     
    105105    $url .= '?';
    106106  }
    107   $url.= make_section_in_URL($params);
     107  $url.= make_section_in_url($params);
    108108  $url = add_well_known_params_in_url($url, $params);
    109109  return $url;
     
    114114 * and removes.
    115115 *
    116  * duplicate_index_URL(array('category' => 12), array('start')) will create
     116 * duplicate_index_url(array('category' => 12), array('start')) will create
    117117 * an index URL on the current section (categories), but on a redefined
    118118 * category and without the start URL parameter.
     
    122122 * @return string
    123123 */
    124 function duplicate_index_URL($redefined = array(), $removed = array())
    125 {
    126   return make_index_URL(
     124function duplicate_index_url($redefined = array(), $removed = array())
     125{
     126  return make_index_url(
    127127    params_for_duplication($redefined, $removed)
    128128    );
     
    167167/**
    168168 * create a picture URL with current page parameters, but with redefinitions
    169  * and removes. See duplicate_index_URL.
     169 * and removes. See duplicate_index_url.
    170170 *
    171171 * @param array redefined keys
     
    173173 * @return string
    174174 */
    175 function duplicate_picture_URL($redefined = array(), $removed = array())
    176 {
    177   return make_picture_URL(
     175function duplicate_picture_url($redefined = array(), $removed = array())
     176{
     177  return make_picture_url(
    178178    params_for_duplication($redefined, $removed)
    179179    );
     
    186186 * @return string
    187187 */
    188 function make_picture_URL($params)
     188function make_picture_url($params)
    189189{
    190190  global $conf;
    191191  if (!isset($params['image_id']))
    192192  {
    193     die('make_picture_URL: image_id is a required parameter');
     193    die('make_picture_url: image_id is a required parameter');
    194194  }
    195195
     
    227227      $url .= $params['image_id'];
    228228  }
    229   $url .= make_section_in_URL($params);
     229  $url .= make_section_in_url($params);
    230230  $url = add_well_known_params_in_url($url, $params);
    231231  return $url;
     
    267267 * @return string
    268268 */
    269 function make_section_in_URL($params)
     269function make_section_in_url($params)
    270270{
    271271  global $conf;
     
    324324      if (!isset($params['tags']) or count($params['tags']) == 0)
    325325      {
    326         die('make_section_in_URL: require at least one tag');
     326        die('make_section_in_url: require at least one tag');
    327327      }
    328328
     
    357357      if (!isset($params['search']))
    358358      {
    359         die('make_section_in_URL: require a search identifier');
     359        die('make_section_in_url: require a search identifier');
    360360      }
    361361
     
    368368      if (!isset($params['list']))
    369369      {
    370         die('make_section_in_URL: require a list of items');
     370        die('make_section_in_url: require a list of items');
    371371      }
    372372
  • branches/branch-1_6/include/menubar.inc.php

    r1435 r1504  
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
    8 // | file          : $Id:$
    9 // | last update   : $Date:$
    10 // | last modifier : $Author:$
    11 // | revision      : $Revision:$
     8// | file          : $Id$
     9// | last update   : $Date$
     10// | last modifier : $Author$
     11// | revision      : $Revision$
    1212// +-----------------------------------------------------------------------+
    1313// | This program is free software; you can redistribute it and/or modify  |
     
    4242    'MENU_CATEGORIES_CONTENT' => get_categories_menu(),
    4343    'F_IDENTIFY' => get_root_url().'identification.php',
    44     'U_HOME' => make_index_URL(),
     44    'U_HOME' => make_index_url(),
    4545    'U_REGISTER' => get_root_url().'register.php',
    4646    'U_LOST_PASSWORD' => get_root_url().'password.php',
    47     'U_LOGOUT' => add_url_params(make_index_URL(), array('act'=>'logout') ),
     47    'U_LOGOUT' => add_url_params(make_index_url(), array('act'=>'logout') ),
    4848    'U_ADMIN'=> get_root_url().'admin.php',
    4949    'U_PROFILE'=> get_root_url().'profile.php',
     
    100100      'tags.tag',
    101101      array(
    102         'URL_ADD' => make_index_URL(
     102        'URL_ADD' => make_index_url(
    103103          array(
    104104            'tags' => array_merge(
     
    114114          ),
    115115
    116         'URL' => make_index_URL(
     116        'URL' => make_index_url(
    117117          array(
    118118            'tags' => array(
     
    148148    'special_cat',
    149149    array(
    150       'URL' => make_index_URL(array('section' => 'favorites')),
     150      'URL' => make_index_url(array('section' => 'favorites')),
    151151      'TITLE' => $lang['favorite_cat_hint'],
    152152      'NAME' => $lang['favorite_cat']
     
    157157  'special_cat',
    158158  array(
    159     'URL' => make_index_URL(array('section' => 'most_visited')),
     159    'URL' => make_index_url(array('section' => 'most_visited')),
    160160    'TITLE' => $lang['most_visited_cat_hint'],
    161161    'NAME' => $lang['most_visited_cat']
     
    167167    'special_cat',
    168168    array(
    169       'URL' => make_index_URL(array('section' => 'best_rated')),
     169      'URL' => make_index_url(array('section' => 'best_rated')),
    170170      'TITLE' => $lang['best_rated_cat_hint'],
    171171      'NAME' => $lang['best_rated_cat']
     
    185185  'special_cat',
    186186  array(
    187     'URL' => make_index_URL(array('section' => 'recent_pics')),
     187    'URL' => make_index_url(array('section' => 'recent_pics')),
    188188    'TITLE' => $lang['recent_pics_cat_hint'],
    189189    'NAME' => $lang['recent_pics_cat']
     
    193193  'special_cat',
    194194  array(
    195     'URL' => make_index_URL(array('section' => 'recent_cats')),
     195    'URL' => make_index_url(array('section' => 'recent_cats')),
    196196    'TITLE' => $lang['recent_cats_cat_hint'],
    197197    'NAME' => $lang['recent_cats_cat']
     
    203203  array(
    204204    'URL' =>
    205       make_index_URL(
     205      make_index_url(
    206206        array(
    207207          'chronology_field' => ($conf['calendar_datefield']=='date_available'
  • branches/branch-1_6/include/picture_comment.inc.php

    r1094 r1504  
    136136
    137137  $page['navigation_bar'] = create_navigation_bar(
    138     duplicate_picture_URL(array(), array('start')),
     138    duplicate_picture_url(array(), array('start')),
    139139    $row['nb_comments'],
    140140    $page['start'],
  • branches/branch-1_6/index.php

    r1471 r1504  
    6464
    6565  redirect(
    66     duplicate_index_URL(
     66    duplicate_index_url(
    6767      array(),        // nothing to redefine
    6868      array('start')  // changing display order goes back to section first page
     
    8787{
    8888  $page['navigation_bar'] = create_navigation_bar(
    89     duplicate_index_URL(array(), array('start')),
     89    duplicate_index_url(array(), array('start')),
    9090    $page['cat_nb_images'],
    9191    $page['start'],
     
    135135    'mode_created',
    136136    array(
    137       'URL' => duplicate_index_URL( $chronology_params, array('start') )
     137      'URL' => duplicate_index_url( $chronology_params, array('start') )
    138138      )
    139139    );
     
    143143    'mode_posted',
    144144    array(
    145       'URL' => duplicate_index_URL( $chronology_params, array('start') )
     145      'URL' => duplicate_index_url( $chronology_params, array('start') )
    146146      )
    147147    );
     
    152152    'mode_normal',
    153153    array(
    154       'URL' => duplicate_index_URL( array(), array('chronology_field','start') )
     154      'URL' => duplicate_index_url( array(), array('chronology_field','start') )
    155155      )
    156156    );
     
    164164    $chronology_field = 'created';
    165165  }
    166   $url = duplicate_index_URL(
     166  $url = duplicate_index_url(
    167167            array('chronology_field'=>$chronology_field ),
    168168            array('chronology_date', 'start')
     
    262262        array(
    263263          'DISPLAY' => $orders[$i][0],
    264           'URL' => add_url_params( duplicate_index_URL(), array('image_order'=>$i) ),
     264          'URL' => add_url_params( duplicate_index_url(), array('image_order'=>$i) ),
    265265          'SELECTED_OPTION' => ($order_idx==$i ? 'SELECTED' : ''),
    266266          )
  • branches/branch-1_6/picture.php

    r1287 r1504  
    7676}
    7777
    78 $url_up = duplicate_index_URL(
     78$url_up = duplicate_index_url(
    7979  array(
    8080    'start' =>
     
    8787  );
    8888
    89 $url_self = duplicate_picture_URL();
     89$url_self = duplicate_picture_url();
    9090
    9191// +-----------------------------------------------------------------------+
     
    331331  }
    332332
    333   $picture[$i]['url'] = duplicate_picture_URL(
     333  $picture[$i]['url'] = duplicate_picture_url(
    334334    array(
    335335      'image_id' => $row['id'],
     
    399399
    400400// metadata
    401 $url_metadata = duplicate_picture_URL();
     401$url_metadata = duplicate_picture_url();
    402402if ($conf['show_exif'] or $conf['show_iptc'])
    403403{
     
    467467    'L_UP_ALT' => $lang['home'],
    468468
    469     'U_HOME' => make_index_URL(),
     469    'U_HOME' => make_index_url(),
    470470    'U_UP' => $url_up,
    471471    'U_METADATA' => $url_metadata,
     
    628628{
    629629  $val = format_date($picture['current']['date_creation']);
    630   $url = make_index_URL(
     630  $url = make_index_url(
    631631        array(
    632632          'chronology_field'=>'created',
     
    645645// date of availability
    646646$val = format_date($picture['current']['date_available'], 'mysql_datetime');
    647 $url = make_index_URL(
     647$url = make_index_url(
    648648      array(
    649649        'chronology_field'=>'posted',
     
    711711      $tags,
    712712      '<a href="'
    713       .make_index_URL(
     713      .make_index_url(
    714714        array(
    715715          'tags' => array(
  • branches/branch-1_6/random.php

    r1082 r1504  
    5959// +-----------------------------------------------------------------------+
    6060
    61 redirect(make_index_URL(array('list' => array_from_query($query, 'id'))));
     61redirect(make_index_url(array('list' => array_from_query($query, 'id'))));
    6262?>
Note: See TracChangeset for help on using the changeset viewer.