Changeset 6411
- Timestamp:
- May 28, 2010, 9:58:51 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r6365 r6411 115 115 case 'main' : 116 116 { 117 if ( !url_is_remote($_POST['gallery_url']) )118 {119 array_push($page['errors'], l10n('The gallery URL is not valid.'));120 }121 117 foreach( $main_checkboxes as $checkbox) 122 118 { -
trunk/admin/include/functions_notification_by_mail.inc.php
r5559 r6411 94 94 95 95 /* 96 * Execute all main queries to get list of user 96 * Execute all main queries to get list of user 97 97 * 98 98 * Type are the type of list 'subscribe', 'send' … … 111 111 if (count($quoted_check_key_list) != 0 ) 112 112 { 113 $query_and_check_key = ' and 113 $query_and_check_key = ' and 114 114 check_key in ('.implode(",", $quoted_check_key_list).') '; 115 115 } … … 132 132 where 133 133 N.user_id = U.'.$conf['user_fields']['id']; 134 134 135 135 if ($action == 'send') 136 136 { … … 419 419 $section_action_by => true, 420 420 'GOTO_GALLERY_TITLE' => $conf['gallery_title'], 421 'GOTO_GALLERY_URL' => $conf['gallery_url'],421 'GOTO_GALLERY_URL' => get_gallery_home_url(), 422 422 ) 423 423 ); -
trunk/admin/notification_by_mail.php
r6363 r6411 382 382 ( 383 383 'GOTO_GALLERY_TITLE' => $conf['gallery_title'], 384 'GOTO_GALLERY_URL' => $conf['gallery_url'],384 'GOTO_GALLERY_URL' => get_gallery_home_url(), 385 385 'SEND_AS_NAME' => $env_nbm['send_as_name'], 386 386 ) -
trunk/feed.php
r6363 r6411 111 111 $rss->title.= ' (as '.stripslashes($user['username']).')'; 112 112 113 $rss->link = $conf['gallery_url'];113 $rss->link = get_gallery_home_url(); 114 114 115 115 // +-----------------------------------------------------------------------+ … … 126 126 $item = new FeedItem(); 127 127 $item->title = sprintf(l10n('New on %s'), format_date($dbnow) ); 128 $item->link = $conf['gallery_url'];128 $item->link = get_gallery_home_url(); 129 129 130 130 // content creation -
trunk/include/config_default.inc.php
r6365 r6411 329 329 // If set true, the login "user" will equal "User" or "USER" or "user", 330 330 // etc. ... And it will be impossible to use such login variation to create a 331 // new user account. 331 // new user account. 332 332 $conf['insensitive_case_logon'] = false; 333 333 … … 335 335 // 'filename' 336 336 $conf['uniqueness_mode'] = 'md5sum'; 337 338 // home_page : relative url of the homepage. Empty by default.339 // It points to the index of the gallery.340 // This parameter is used if home page is not index.php of the gallery.341 // We suggest avoid the names "index.htm" or "index.html" if you set $conf['php_extension_in_urls'] to false.342 $conf['home_page'] = '';343 337 344 338 // +-----------------------------------------------------------------------+ … … 464 458 // activate template debugging - a new window will appear 465 459 $conf['debug_template'] = false; 460 461 // save copies of sent mails into local data dir 462 $conf['debug_mail'] = false; 466 463 467 464 // die_on_sql_error: if an SQL query fails, should everything stop? -
trunk/include/functions_mail.inc.php
r6363 r6411 151 151 } 152 152 153 /**154 * Returns an completed array template/theme155 * completed with get_default_theme()156 *157 * @params:158 * - args: incompleted array of template/theme159 * o template: template to use [default get_default_theme()]160 * o theme: template to use [default get_default_theme()]161 */162 function get_array_template_theme($args = array())163 {164 global $conf;165 166 $res = array();167 168 if (empty($args['template']) or empty($args['theme']))169 {170 list($res['template'], $res['theme']) = explode('/', get_default_theme());171 }172 173 if (!empty($args['template']))174 {175 $res['template'] = $args['template'];176 }177 178 if (!empty($args['theme']))179 {180 $res['theme'] = $args['theme'];181 }182 183 return $res;184 }185 153 186 154 /** … … 642 610 643 611 // Footer 644 'GALLERY_URL' => 645 isset($page['gallery_url']) ? 646 $page['gallery_url'] : $conf['gallery_url'], 612 'GALLERY_URL' => get_gallery_home_url(), 647 613 'GALLERY_TITLE' => 648 614 isset($page['gallery_title']) ? … … 829 795 830 796 /*Testing block*/ 831 /*function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args)797 function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args) 832 798 { 833 799 global $conf, $user, $lang_info; … … 835 801 if ( mkgetdir( $dir, MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR) ) 836 802 { 837 $filename = $dir.'/mail.'.stripslashes($user['username']).'.'.$lang_info['code'].'.'.$args['t emplate'].'.'.$args['theme'];803 $filename = $dir.'/mail.'.stripslashes($user['username']).'.'.$lang_info['code'].'.'.$args['theme'].'-'.date('YmdHis'); 838 804 if ($args['content_format'] == 'text/plain') 839 805 { … … 853 819 return $result; 854 820 } 855 add_event_handler('send_mail', 'pwg_send_mail_test', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 6);*/ 821 if ($conf['debug_mail']) 822 add_event_handler('send_mail', 'pwg_send_mail_test', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 6); 856 823 857 824 -
trunk/include/functions_url.inc.php
r6363 r6411 59 59 if ($with_scheme) 60 60 { 61 if (isset($_SERVER['HTTPS']) && 61 if (isset($_SERVER['HTTPS']) && 62 62 ((strtolower($_SERVER['HTTPS']) == 'on') or ($_SERVER['HTTPS'] == 1))) 63 63 { … … 728 728 } 729 729 730 /** 731 * Returns the 'home page' of this gallery 732 */ 733 function get_gallery_home_url() 734 { 735 global $conf; 736 if (!empty($conf['gallery_url'])) 737 { 738 if (url_is_remote($conf['gallery_url']) or strncmp($conf['gallery_url'], '/', 1)==0) 739 { 740 return $conf['gallery_url']; 741 } 742 return get_root_url().$conf['gallery_url']; 743 } 744 else 745 { 746 return make_index_url(); 747 } 748 } 730 749 ?> -
trunk/include/section_init.inc.php
r6363 r6411 220 220 if ('categories' == $page['section']) 221 221 { 222 $page['title'] = '<a href="'.get_absolute_root_url().$conf['home_page'].'">'.l10n('Home').'</a>';223 224 222 if (isset($page['category'])) 225 223 { … … 233 231 'main_page_category_description' 234 232 ), 235 'title' => 236 $page['title'].$conf['level_separator'].get_cat_display_name($page['category']['upper_names'], '', false), 237 ) 238 ); 239 } 233 'title' => get_cat_display_name($page['category']['upper_names'], '', false), 234 ) 235 ); 236 } 237 else 238 $page['title'] = ''; // will be set later 240 239 241 240 if … … 374 373 $page, 375 374 array( 376 377 375 'title' => l10n('Favorites') 376 ) 378 377 ); 379 378 … … 559 558 } 560 559 560 // title update 561 if (isset($page['title'])) 562 { 563 if (!empty($page['title'])) 564 { 565 $page['title'] = $conf['level_separator'].$page['title']; 566 } 567 $page['title'] = '<a href="'.get_gallery_home_url().'">'.l10n('Home').'</a>'.$page['title']; 568 } 569 561 570 // add meta robots noindex, nofollow to avoid unnecesary robot crawls 562 571 $page['meta_robots']=array(); -
trunk/install/config.sql
r5741 r6411 11 11 INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_locked','false','Lock your gallery temporary for non admin users'); 12 12 INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_title','Piwigo demonstration site','Title at top of each page and for RSS feed'); 13 INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_url',' http://piwigo.org/demo','URL given in RSS feed');13 INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_url','','Optional alternate homepage for the gallery'); 14 14 INSERT INTO piwigo_config (param,value,comment) VALUES ('rate','true','Rating pictures feature is enabled'); 15 15 INSERT INTO piwigo_config (param,value,comment) VALUES ('rate_anonymous','true','Rating pictures feature is also enabled for visitors'); -
trunk/install/upgrade_1.5.0.php
r5215 r6411 319 319 $params = array( 320 320 'gallery_url' => array( 321 ' http://piwigo.org/demo',322 ' URL given in RSS feed'321 '', 322 'Optional alternate homepage for the gallery' 323 323 ), 324 324 'rate' => array(
Note: See TracChangeset
for help on using the changeset viewer.