new: cleaner URL. Instead of category.php?cat=search&search=123&start=42,
you now have category.php?/search/123/start-42. Functions make_index_url and make_picture_url build these new URLs. Functions duplicate_picture_url and duplicate_index_url provide shortcuts to URL creation. The current main page page is still category.php but this can be modified easily in make_index_url function. In this first version, no backward compatibility. Calendar definition in URL must be discussed with rvelices. improvement: picture.php redesigned. First actions like "set as representative" or "delete a comment" which all lead to a redirection. Then the page (the big mess) and includes of new sub pages to manage specific parts of the page (metadata, user comments, rates). new: with the cleaner URL comes a new terminology. $page['cat'] doesn't exist anymore. $page['section'] is among 'categories', 'tags' (TODO), 'list', 'most_seen'... And sub parameters are set : $page['category'] if $page['section'] is "categories". See URL analyse in include/section_init.inc.php for details. git-svn-id: http://piwigo.org/svn/trunk@1082 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
88e3b36e2f
commit
114ae32445
28 changed files with 1774 additions and 1245 deletions
60
upload.php
60
upload.php
|
|
@ -125,12 +125,10 @@ if (isset($page['cat']))
|
|||
$page['cat_site_id'] = $result['site_id'];
|
||||
$page['cat_name'] = $result['name'];
|
||||
$page['cat_uploadable'] = $result['uploadable'];
|
||||
if ( url_is_remote($page['cat_dir']) or !$page['cat_uploadable'])
|
||||
|
||||
if (url_is_remote($page['cat_dir']) or !$page['cat_uploadable'])
|
||||
{
|
||||
echo '<div style="text-align:center;">'.$lang['upload_forbidden'].'<br />';
|
||||
echo '<a href="./category.php">';
|
||||
echo $lang['thumbnails'].'</a></div>';
|
||||
exit();
|
||||
die('Fatal: you take a wrong way, bye bye');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -280,32 +278,34 @@ $author = !empty($_POST['author'])?$_POST['author']:'';
|
|||
$date_creation = !empty($_POST['date_creation'])?$_POST['date_creation']:'';
|
||||
$comment = !empty($_POST['comment'])?$_POST['comment']:'';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ADVISE_TITLE' => $advise_title,
|
||||
'NAME' => $username,
|
||||
'EMAIL' => $mail_address,
|
||||
'NAME_IMG' => $name,
|
||||
'AUTHOR_IMG' => $author,
|
||||
'DATE_IMG' => $date_creation,
|
||||
'COMMENT_IMG' => $comment,
|
||||
$template->assign_vars(
|
||||
array(
|
||||
'ADVISE_TITLE' => $advise_title,
|
||||
'NAME' => $username,
|
||||
'EMAIL' => $mail_address,
|
||||
'NAME_IMG' => $name,
|
||||
'AUTHOR_IMG' => $author,
|
||||
'DATE_IMG' => $date_creation,
|
||||
'COMMENT_IMG' => $comment,
|
||||
|
||||
'L_TITLE' => $lang['upload_title'],
|
||||
'L_USERNAME' => $lang['upload_username'],
|
||||
'L_EMAIL' => $lang['mail_address'],
|
||||
'L_NAME_IMG' => $lang['upload_name'],
|
||||
'L_SUBMIT' => $lang['submit'],
|
||||
'L_AUTHOR' => $lang['upload_author'],
|
||||
'L_CREATION_DATE' => $lang['upload_creation_date'],
|
||||
'L_COMMENT' => $lang['comment'],
|
||||
'L_RETURN' => $lang['home'],
|
||||
'L_RETURN_HINT' => $lang['home_hint'],
|
||||
'L_UPLOAD_DONE' => $lang['upload_successful'],
|
||||
'L_MANDATORY' => $lang['mandatory'],
|
||||
|
||||
'F_ACTION' => $u_form,
|
||||
|
||||
'L_TITLE' => $lang['upload_title'],
|
||||
'L_USERNAME' => $lang['upload_username'],
|
||||
'L_EMAIL' => $lang['mail_address'],
|
||||
'L_NAME_IMG' => $lang['upload_name'],
|
||||
'L_SUBMIT' => $lang['submit'],
|
||||
'L_AUTHOR' => $lang['upload_author'],
|
||||
'L_CREATION_DATE' => $lang['upload_creation_date'],
|
||||
'L_COMMENT' => $lang['comment'],
|
||||
'L_RETURN' => $lang['home'],
|
||||
'L_RETURN_HINT' => $lang['home_hint'],
|
||||
'L_UPLOAD_DONE' => $lang['upload_successful'],
|
||||
'L_MANDATORY' => $lang['mandatory'],
|
||||
|
||||
'F_ACTION' => $u_form,
|
||||
|
||||
'U_RETURN' => PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING']
|
||||
));
|
||||
'U_RETURN' => make_index_url(array('category' => $page['cat'])),
|
||||
)
|
||||
);
|
||||
|
||||
if ( !$page['upload_successful'] )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue