diff options
author | nikrou <nikrou@piwigo.org> | 2006-07-26 21:00:16 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2006-07-26 21:00:16 +0000 |
commit | e7f8b142697c6066cb4da31da94b13dec562eb2e (patch) | |
tree | dc4668aad0a8b604c71ff0b67f273f8a7c067dca | |
parent | 462a8ebbc103423fc23a5e7a06b7f13688fb6936 (diff) |
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
git-svn-id: http://piwigo.org/svn/trunk@1503 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/picture_modify.php | 4 | ||||
-rw-r--r-- | include/functions_url.inc.php | 30 | ||||
-rwxr-xr-x | include/menubar.inc.php | 28 | ||||
-rw-r--r-- | include/picture_comment.inc.php | 2 | ||||
-rw-r--r-- | index.php | 14 | ||||
-rw-r--r-- | picture.php | 16 | ||||
-rw-r--r-- | random.php | 2 |
7 files changed, 48 insertions, 48 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php index 54bb45d69..130a43931 100644 --- a/admin/picture_modify.php +++ b/admin/picture_modify.php @@ -336,7 +336,7 @@ $authorizeds = array_diff( if (isset($_GET['cat_id']) and in_array($_GET['cat_id'], $authorizeds)) { - $url_img = make_picture_URL( + $url_img = make_picture_url( array( 'image_id' => $_GET['image_id'], 'image_file' => $image_file, @@ -348,7 +348,7 @@ else { foreach ($authorizeds as $category) { - $url_img = make_picture_URL( + $url_img = make_picture_url( array( 'image_id' => $_GET['image_id'], 'image_file' => $image_file, diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index 46a9c8627..7d30577fa 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -92,7 +92,7 @@ function add_url_params($url, $params) * @param array * @return string */ -function make_index_URL($params = array()) +function make_index_url($params = array()) { global $conf; $url = get_root_url().'index'; @@ -104,7 +104,7 @@ function make_index_URL($params = array()) { $url .= '?'; } - $url.= make_section_in_URL($params); + $url.= make_section_in_url($params); $url = add_well_known_params_in_url($url, $params); return $url; } @@ -113,7 +113,7 @@ function make_index_URL($params = array()) * build an index URL with current page parameters, but with redefinitions * and removes. * - * duplicate_index_URL(array('category' => 12), array('start')) will create + * duplicate_index_url(array('category' => 12), array('start')) will create * an index URL on the current section (categories), but on a redefined * category and without the start URL parameter. * @@ -121,9 +121,9 @@ function make_index_URL($params = array()) * @param array removed keys * @return string */ -function duplicate_index_URL($redefined = array(), $removed = array()) +function duplicate_index_url($redefined = array(), $removed = array()) { - return make_index_URL( + return make_index_url( params_for_duplication($redefined, $removed) ); } @@ -166,15 +166,15 @@ function params_for_duplication($redefined, $removed) /** * create a picture URL with current page parameters, but with redefinitions - * and removes. See duplicate_index_URL. + * and removes. See duplicate_index_url. * * @param array redefined keys * @param array removed keys * @return string */ -function duplicate_picture_URL($redefined = array(), $removed = array()) +function duplicate_picture_url($redefined = array(), $removed = array()) { - return make_picture_URL( + return make_picture_url( params_for_duplication($redefined, $removed) ); } @@ -185,12 +185,12 @@ function duplicate_picture_URL($redefined = array(), $removed = array()) * @param array * @return string */ -function make_picture_URL($params) +function make_picture_url($params) { global $conf; if (!isset($params['image_id'])) { - die('make_picture_URL: image_id is a required parameter'); + die('make_picture_url: image_id is a required parameter'); } $url = get_root_url().'picture'; @@ -226,7 +226,7 @@ function make_picture_URL($params) default: $url .= $params['image_id']; } - $url .= make_section_in_URL($params); + $url .= make_section_in_url($params); $url = add_well_known_params_in_url($url, $params); return $url; } @@ -266,7 +266,7 @@ function add_well_known_params_in_url($url, $params) * @param array * @return string */ -function make_section_in_URL($params) +function make_section_in_url($params) { global $conf; $section_string = ''; @@ -323,7 +323,7 @@ function make_section_in_URL($params) { if (!isset($params['tags']) or count($params['tags']) == 0) { - die('make_section_in_URL: require at least one tag'); + die('make_section_in_url: require at least one tag'); } $section_string.= '/tags'; @@ -356,7 +356,7 @@ function make_section_in_URL($params) { if (!isset($params['search'])) { - die('make_section_in_URL: require a search identifier'); + die('make_section_in_url: require a search identifier'); } $section_string.= '/search/'.$params['search']; @@ -367,7 +367,7 @@ function make_section_in_URL($params) { if (!isset($params['list'])) { - die('make_section_in_URL: require a list of items'); + die('make_section_in_url: require a list of items'); } $section_string.= '/list/'.implode(',', $params['list']); diff --git a/include/menubar.inc.php b/include/menubar.inc.php index f17144e9b..48f372d5a 100755 --- a/include/menubar.inc.php +++ b/include/menubar.inc.php @@ -5,10 +5,10 @@ // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) -// | file : $Id:$ -// | last update : $Date:$ -// | last modifier : $Author:$ -// | revision : $Revision:$ +// | file : $Id$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | // | it under the terms of the GNU General Public License as published by | @@ -41,10 +41,10 @@ $template->assign_vars( 'USERNAME' => $user['username'], 'MENU_CATEGORIES_CONTENT' => get_categories_menu(), 'F_IDENTIFY' => get_root_url().'identification.php', - 'U_HOME' => make_index_URL(), + 'U_HOME' => make_index_url(), 'U_REGISTER' => get_root_url().'register.php', 'U_LOST_PASSWORD' => get_root_url().'password.php', - 'U_LOGOUT' => add_url_params(make_index_URL(), array('act'=>'logout') ), + 'U_LOGOUT' => add_url_params(make_index_url(), array('act'=>'logout') ), 'U_ADMIN'=> get_root_url().'admin.php', 'U_PROFILE'=> get_root_url().'profile.php', ) @@ -99,7 +99,7 @@ SELECT tag_id, name, url_name, count(*) counter $template->assign_block_vars( 'tags.tag', array( - 'URL_ADD' => make_index_URL( + 'URL_ADD' => make_index_url( array( 'tags' => array_merge( $page['tags'], @@ -113,7 +113,7 @@ SELECT tag_id, name, url_name, count(*) counter ) ), - 'URL' => make_index_URL( + 'URL' => make_index_url( array( 'tags' => array( array( @@ -147,7 +147,7 @@ if ( !$user['is_the_guest'] ) $template->assign_block_vars( 'special_cat', array( - 'URL' => make_index_URL(array('section' => 'favorites')), + 'URL' => make_index_url(array('section' => 'favorites')), 'TITLE' => $lang['favorite_cat_hint'], 'NAME' => $lang['favorite_cat'] )); @@ -156,7 +156,7 @@ if ( !$user['is_the_guest'] ) $template->assign_block_vars( 'special_cat', array( - 'URL' => make_index_URL(array('section' => 'most_visited')), + 'URL' => make_index_url(array('section' => 'most_visited')), 'TITLE' => $lang['most_visited_cat_hint'], 'NAME' => $lang['most_visited_cat'] )); @@ -166,7 +166,7 @@ if ($conf['rate']) $template->assign_block_vars( 'special_cat', array( - 'URL' => make_index_URL(array('section' => 'best_rated')), + 'URL' => make_index_url(array('section' => 'best_rated')), 'TITLE' => $lang['best_rated_cat_hint'], 'NAME' => $lang['best_rated_cat'] ) @@ -184,7 +184,7 @@ $template->assign_block_vars( $template->assign_block_vars( 'special_cat', array( - 'URL' => make_index_URL(array('section' => 'recent_pics')), + 'URL' => make_index_url(array('section' => 'recent_pics')), 'TITLE' => $lang['recent_pics_cat_hint'], 'NAME' => $lang['recent_pics_cat'] )); @@ -192,7 +192,7 @@ $template->assign_block_vars( $template->assign_block_vars( 'special_cat', array( - 'URL' => make_index_URL(array('section' => 'recent_cats')), + 'URL' => make_index_url(array('section' => 'recent_cats')), 'TITLE' => $lang['recent_cats_cat_hint'], 'NAME' => $lang['recent_cats_cat'] )); @@ -202,7 +202,7 @@ $template->assign_block_vars( 'special_cat', array( 'URL' => - make_index_URL( + make_index_url( array( 'chronology_field' => ($conf['calendar_datefield']=='date_available' ? 'posted' : 'created'), diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index 79177839d..ad2878fcb 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -135,7 +135,7 @@ if ($page['show_comments']) } $page['navigation_bar'] = create_navigation_bar( - duplicate_picture_URL(array(), array('start')), + duplicate_picture_url(array(), array('start')), $row['nb_comments'], $page['start'], $conf['nb_comment_page'], @@ -63,7 +63,7 @@ if (isset($_GET['image_order'])) ); redirect( - duplicate_index_URL( + duplicate_index_url( array(), // nothing to redefine array('start') // changing display order goes back to section first page ) @@ -86,7 +86,7 @@ if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > $user['nb_image_page']) { $page['navigation_bar'] = create_navigation_bar( - duplicate_index_URL(array(), array('start')), + duplicate_index_url(array(), array('start')), $page['cat_nb_images'], $page['start'], $user['nb_image_page'], @@ -134,7 +134,7 @@ if (!isset($page['chronology_field'])) $template->assign_block_vars( 'mode_created', array( - 'URL' => duplicate_index_URL( $chronology_params, array('start') ) + 'URL' => duplicate_index_url( $chronology_params, array('start') ) ) ); @@ -142,7 +142,7 @@ if (!isset($page['chronology_field'])) $template->assign_block_vars( 'mode_posted', array( - 'URL' => duplicate_index_URL( $chronology_params, array('start') ) + 'URL' => duplicate_index_url( $chronology_params, array('start') ) ) ); } @@ -151,7 +151,7 @@ else $template->assign_block_vars( 'mode_normal', array( - 'URL' => duplicate_index_URL( array(), array('chronology_field','start') ) + 'URL' => duplicate_index_url( array(), array('chronology_field','start') ) ) ); @@ -163,7 +163,7 @@ else { $chronology_field = 'created'; } - $url = duplicate_index_URL( + $url = duplicate_index_url( array('chronology_field'=>$chronology_field ), array('chronology_date', 'start') ); @@ -261,7 +261,7 @@ if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0 'preferred_image_order.order', array( 'DISPLAY' => $orders[$i][0], - 'URL' => add_url_params( duplicate_index_URL(), array('image_order'=>$i) ), + 'URL' => add_url_params( duplicate_index_url(), array('image_order'=>$i) ), 'SELECTED_OPTION' => ($order_idx==$i ? 'SELECTED' : ''), ) ); diff --git a/picture.php b/picture.php index ed143723f..6ebce15dd 100644 --- a/picture.php +++ b/picture.php @@ -75,7 +75,7 @@ if ($page['current_rank'] != $page['last_rank']) $page['last_item'] = $page['items'][ $page['last_rank'] ]; } -$url_up = duplicate_index_URL( +$url_up = duplicate_index_url( array( 'start' => floor($page['current_rank'] / $user['nb_image_page']) @@ -86,7 +86,7 @@ $url_up = duplicate_index_URL( ) ); -$url_self = duplicate_picture_URL(); +$url_self = duplicate_picture_url(); // +-----------------------------------------------------------------------+ // | actions | @@ -330,7 +330,7 @@ while ($row = mysql_fetch_array($result)) $picture[$i]['name'] = str_replace('_', ' ', $file_wo_ext); } - $picture[$i]['url'] = duplicate_picture_URL( + $picture[$i]['url'] = duplicate_picture_url( array( 'image_id' => $row['id'], 'image_file' => $row['file'], @@ -398,7 +398,7 @@ $picture_size = get_picture_size( ); // metadata -$url_metadata = duplicate_picture_URL(); +$url_metadata = duplicate_picture_url(); if ($conf['show_exif'] or $conf['show_iptc']) { $metadata_showable = true; @@ -466,7 +466,7 @@ $template->assign_vars( 'L_UP_HINT' => $lang['home_hint'], 'L_UP_ALT' => $lang['home'], - 'U_HOME' => make_index_URL(), + 'U_HOME' => make_index_url(), 'U_UP' => $url_up, 'U_METADATA' => $url_metadata, 'U_ADMIN' => $url_admin, @@ -627,7 +627,7 @@ else if (!empty($picture['current']['date_creation'])) { $val = format_date($picture['current']['date_creation']); - $url = make_index_URL( + $url = make_index_url( array( 'chronology_field'=>'created', 'chronology_style'=>'monthly', @@ -644,7 +644,7 @@ else // date of availability $val = format_date($picture['current']['date_available'], 'mysql_datetime'); -$url = make_index_URL( +$url = make_index_url( array( 'chronology_field'=>'posted', 'chronology_style'=>'monthly', @@ -710,7 +710,7 @@ if (mysql_num_rows($result) > 0) array_push( $tags, '<a href="' - .make_index_URL( + .make_index_url( array( 'tags' => array( array( diff --git a/random.php b/random.php index c6d5dc33b..f3ebdc3dc 100644 --- a/random.php +++ b/random.php @@ -58,5 +58,5 @@ SELECT DISTINCT(id) // | redirect | // +-----------------------------------------------------------------------+ -redirect(make_index_URL(array('list' => array_from_query($query, 'id')))); +redirect(make_index_url(array('list' => array_from_query($query, 'id')))); ?>
\ No newline at end of file |