From af6e6b55ca0a3eb8c5af4cce4b0f4385bb74fd89 Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 13 Jan 2011 20:51:57 +0000 Subject: feature 2108 finalize upload removal (php warnings) git-svn-id: http://piwigo.org/svn/trunk@8652 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_category.inc.php | 55 ------------------ include/menubar.inc.php | 1 - themes/default/template/upload.tpl | 115 ------------------------------------- 3 files changed, 171 deletions(-) delete mode 100644 themes/default/template/upload.tpl diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index f0e1f63c9..675b310d5 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -495,59 +495,4 @@ function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_ return $display_text; } -/** - * returns the link of upload menu - * - * @param null - * @return string or null - */ -function get_upload_menu_link() -{ - global $conf, $page, $user; - - $show_link = false; - $arg_link = null; - - if (is_autorize_status($conf['upload_user_access'])) - { - if (isset($page['category']) and $page['category']['uploadable'] ) - { - // upload a picture in the category - $show_link = true; - $arg_link = 'cat='.$page['category']['id']; - } - else - if ($conf['upload_link_everytime']) - { - // upload a picture in the category - $query = ' -SELECT - 1 -FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' - ON id = cat_id and user_id = '.$user['id'].' -WHERE - uploadable = \'true\' - '.get_sql_condition_FandF - ( - array - ( - 'visible_categories' => 'id', - ), - 'AND' - ).' -LIMIT 1'; - - $show_link = pwg_db_num_rows(pwg_query($query)) <> 0; - } - } - if ($show_link) - { - return get_root_url().'upload.php'.(empty($arg_link) ? '' : '?'.$arg_link); - } - else - { - return; - } -} - ?> \ No newline at end of file diff --git a/include/menubar.inc.php b/include/menubar.inc.php index c50b34461..a138e8786 100644 --- a/include/menubar.inc.php +++ b/include/menubar.inc.php @@ -105,7 +105,6 @@ function initialize_menu() 'NB_PICTURE' => $user['nb_total_images'], 'MENU_CATEGORIES' => get_categories_menu(), 'U_CATEGORIES' => make_index_url(array('section' => 'categories')), - 'U_UPLOAD' => get_upload_menu_link() ); $block->template = 'menubar_categories.tpl'; } diff --git a/themes/default/template/upload.tpl b/themes/default/template/upload.tpl deleted file mode 100644 index 268ccbfa7..000000000 --- a/themes/default/template/upload.tpl +++ /dev/null @@ -1,115 +0,0 @@ -{* Example of resizeable *} -{* -{include file='include/autosize.inc.tpl'} -*} - -
- -
- -

{'Upload a picture'|@translate}

-
- - {if !empty($errors)} -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
- {/if} - - {if not $UPLOAD_SUCCESSFUL } -
- - - - - - - - {if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {/if} - - - -
- -
{'Category'|@translate} - {html_options name="category" options=$categories selected=$categories_selected} -
{'Username'|@translate} * - -
{'E-mail address'|@translate} * - -
{'Name of the picture'|@translate} - -
{'Author'|@translate} - -
{'Creation date'|@translate} (DD/MM/YYYY) - -
{'Comment'|@translate} - -
- -
-
- {else} - {'Picture uploaded with success, an administrator will validate it as soon as possible'|@translate}
-
- [ {'Home'|@translate} ] -
- {/if} - - {if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS} -
* : {'obligatory'|@translate}
- {/if} -
-- cgit v1.2.3