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 /include | |
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-- | include/functions_url.inc.php | 30 | ||||
-rwxr-xr-x | include/menubar.inc.php | 28 | ||||
-rw-r--r-- | include/picture_comment.inc.php | 2 |
3 files changed, 30 insertions, 30 deletions
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'], |