From 722c4a3a9740506ed4f409fcd9517027f8cbcee5 Mon Sep 17 00:00:00 2001 From: rvelices Date: Fri, 28 May 2010 19:58:51 +0000 Subject: merge r6368,6410 from branch-2.1 to trunk - merged the linkroot integration with the existing gallery_url (unique $conf['gallery_url'] used for RSS, mail homepage root in the browse path) - added an option $conf['debug_mail'] - if set all outgoing mails are saved into local_data_dir git-svn-id: http://piwigo.org/svn/trunk@6411 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/configuration.php | 4 -- .../include/functions_notification_by_mail.inc.php | 10 ++--- admin/notification_by_mail.php | 2 +- feed.php | 4 +- include/config_default.inc.php | 11 ++---- include/functions_mail.inc.php | 43 +++------------------- include/functions_url.inc.php | 21 ++++++++++- include/section_init.inc.php | 21 ++++++++--- install/config.sql | 2 +- install/upgrade_1.5.0.php | 4 +- 10 files changed, 55 insertions(+), 67 deletions(-) diff --git a/admin/configuration.php b/admin/configuration.php index 83a44004e..0f088cc3e 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -114,10 +114,6 @@ if (isset($_POST['submit']) and !is_adviser()) { case 'main' : { - if ( !url_is_remote($_POST['gallery_url']) ) - { - array_push($page['errors'], l10n('The gallery URL is not valid.')); - } foreach( $main_checkboxes as $checkbox) { $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true'; diff --git a/admin/include/functions_notification_by_mail.inc.php b/admin/include/functions_notification_by_mail.inc.php index 4dccabb69..31175b55c 100644 --- a/admin/include/functions_notification_by_mail.inc.php +++ b/admin/include/functions_notification_by_mail.inc.php @@ -93,7 +93,7 @@ function quote_check_key_list($check_key_list = array()) } /* - * Execute all main queries to get list of user + * Execute all main queries to get list of user * * Type are the type of list 'subscribe', 'send' * @@ -110,7 +110,7 @@ function get_user_notifications($action, $check_key_list = array(), $enabled_fil $quoted_check_key_list = quote_check_key_list($check_key_list); if (count($quoted_check_key_list) != 0 ) { - $query_and_check_key = ' and + $query_and_check_key = ' and check_key in ('.implode(",", $quoted_check_key_list).') '; } else @@ -131,7 +131,7 @@ from '.USERS_TABLE.' as U where N.user_id = U.'.$conf['user_fields']['id']; - + if ($action == 'send') { // No mail empty and all users enabled @@ -418,7 +418,7 @@ function do_subscribe_unsubscribe_notification_by_mail($is_admin_request, $is_su ( $section_action_by => true, 'GOTO_GALLERY_TITLE' => $conf['gallery_title'], - 'GOTO_GALLERY_URL' => $conf['gallery_url'], + 'GOTO_GALLERY_URL' => get_gallery_home_url(), ) ); @@ -523,4 +523,4 @@ function subscribe_notification_by_mail($is_admin_request, $check_key_list = arr return do_subscribe_unsubscribe_notification_by_mail($is_admin_request, true, $check_key_list); } -?> +?> \ No newline at end of file diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php index eb36beb00..602c67394 100644 --- a/admin/notification_by_mail.php +++ b/admin/notification_by_mail.php @@ -381,7 +381,7 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l array ( 'GOTO_GALLERY_TITLE' => $conf['gallery_title'], - 'GOTO_GALLERY_URL' => $conf['gallery_url'], + 'GOTO_GALLERY_URL' => get_gallery_home_url(), 'SEND_AS_NAME' => $env_nbm['send_as_name'], ) ); diff --git a/feed.php b/feed.php index cfebc8352..642682353 100644 --- a/feed.php +++ b/feed.php @@ -110,7 +110,7 @@ $rss->encoding=get_pwg_charset(); $rss->title = $conf['gallery_title']; $rss->title.= ' (as '.stripslashes($user['username']).')'; -$rss->link = $conf['gallery_url']; +$rss->link = get_gallery_home_url(); // +-----------------------------------------------------------------------+ // | Feed creation | @@ -125,7 +125,7 @@ if (!$image_only) { $item = new FeedItem(); $item->title = sprintf(l10n('New on %s'), format_date($dbnow) ); - $item->link = $conf['gallery_url']; + $item->link = get_gallery_home_url(); // content creation $item->description = '