Merge branch 'develop-olympus' into develop

* develop-olympus:
  [ticket/9851] "Search new posts" should require login.
  [task/phpdoc] Added a phpdoc task to the build process
  [task/phpdoc] Added a configuration file for phpDocumentor.
  [feature/acm-wincache] Adding caching module for WinCache's User Cache.
  [ticket/9939] Fix JavaScript error in admin recaptcha template
  [ticket/9575] Also change 'administrate' to 'administer' in templates
  [ticket/8736] guest can have 255 chars long username
  [ticket/9928] Do not link "login to your board" to the "send statistics" page.
  [ticket/9575] Change 'administrate' to 'administer'
  [ticket/9921] Adding sample configuration file for the lighttpd webserver.
  [ticket/9932] Add the Bing bot when converting
  [ticket/9930] Redirect failes with open_basedir enabled.
  [ticket/9910] Make sure S_BBCODE_ALLOWED exists when viewing PMs
This commit is contained in:
Nils Adermann 2010-12-13 17:14:36 +01:00
commit 18f74a7e10
17 changed files with 313 additions and 33 deletions

View file

@ -12,7 +12,7 @@
<!-- These are the main targets which you will probably want to use --> <!-- These are the main targets which you will probably want to use -->
<target name="package" depends="clean,prepare,create-package" /> <target name="package" depends="clean,prepare,create-package" />
<target name="all" depends="clean,prepare,test,create-package" /> <target name="all" depends="clean,prepare,test,docs,create-package" />
<target name="prepare"> <target name="prepare">
<mkdir dir="build/logs" /> <mkdir dir="build/logs" />
@ -64,6 +64,12 @@
--> -->
</target> </target>
<target name="docs">
<exec dir="build"
command="phpdoc -c phpdoc-phpbb.ini"
passthru="true" />
</target>
<target name="old-version-diffs"> <target name="old-version-diffs">
<foreach list="${oldversions}" param="version" target="old-version-diff" /> <foreach list="${oldversions}" param="version" target="old-version-diff" />
</target> </target>

106
build/phpdoc-phpbb.ini Normal file
View file

@ -0,0 +1,106 @@
;; phpDocumentor parse configuration file
;;
;; This file is designed to cut down on repetitive typing on the command-line or web interface
;; You can copy this file to create a number of configuration files that can be used with the
;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web
;; interface will automatically generate a list of .ini files that can be used.
;;
;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs
;;
;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini
;;
;; Copyright 2002, Greg Beaver <cellog@users.sourceforge.net>
;;
;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them
[Parse Data]
;; title of all the documentation
;; legal values: any string
title = phpBB3 Sourcecode Documentation
;; parse files that start with a . like .bash_profile
;; legal values: true, false
hidden = false
;; show elements marked @access private in documentation by setting this to on
;; legal values: on, off
parseprivate = on
;; parse with javadoc-like description (first sentence is always the short description)
;; legal values: on, off
javadocdesc = off
;; add any custom @tags separated by commas here
;; legal values: any legal tagname separated by commas.
;customtags = mytag1,mytag2
;; This is only used by the XML:DocBook/peardoc2 converter
defaultcategoryname = sourcecode
;; what is the main package?
;; legal values: alphanumeric string plus - and _
defaultpackagename = phpBB3
;; output any parsing information? set to on for cron jobs
;; legal values: on
;quiet = on
;; parse a PEAR-style repository. Do not turn this on if your project does
;; not have a parent directory named "pear"
;; legal values: on/off
;pear = on
;; where should the documentation be written?
;; legal values: a legal path
target = api
;; Which files should be parsed out as special documentation files, such as README,
;; INSTALL and CHANGELOG? This overrides the default files found in
;; phpDocumentor.ini (this file is not a user .ini file, but the global file)
readmeinstallchangelog = README.html, INSTALL.html, CHANGELOG.html, COPYING
;; limit output to the specified packages, even if others are parsed
;; legal values: package names separated by commas
;packageoutput = phpBB3,ACP,SEARCH,DBAL,ACM,MCP,UCP,LOGIN,lang_english
;; comma-separated list of files to parse
;; legal values: paths separated by commas
;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory
;; comma-separated list of directories to parse
;; legal values: directory paths separated by commas
;directory = /path1,/path2,.,..,subdirectory
;directory = /home/jeichorn/cvs/pear
directory = ../phpBB/
;; template base directory (the equivalent directory of <installdir>/phpDocumentor)
;templatebase = /path/to/my/templates
;; directory to find any example files in through @example and {@example} tags
;examplesdir = c:\wamp\www\examples
;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore
;; legal values: any wildcard strings separated by commas
;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/
ignore = templates_c/,*HTML/default/*,spec/,*config.php*,*CVS/,test_chora.php,testupdate/,cache/,store/,*proSilver/,develop/,includes/utf/data/,includes/captcha/fonts/,install/update/,install/update.new/,files/,*phpinfo.php*,*update_script.php*,*upgrade.php*,*convert.php*,install/converter/,language/de/,script/,*swatch.php*,*test.php*,*test2.php*,*install.php*,*functions_diff.php*,*acp_update.php*
;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format
;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,
;; HTML:frames:earthli,
;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,
;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli
;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS
;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default
;output=HTML:frames:earthli,HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,HTML:frames:DOM/earthli,HTML:frames:DOM/phphtmllib,HTML:frames:phpedit,HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS,CHM:default:default,PDF:default:default
;output=HTML:frames:DOM/default,XML:DocBook/peardoc2:default,CHM:default:default,HTML:frames:DOM/earthli,HTML:frames:DOM/phpdoc.de,HTML:frames:DOM/phphtmllib,HTML:frames:phphtmllib
;HTML:frames:earthli
;output=XML:DocBook/peardoc2:default
;output=HTML:frames:DOM/earthli
;output=HTML:frames:earthli,HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,HTML:frames:DOM/earthli,HTML:frames:DOM/phphtmllib,HTML:frames:phpedit,HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS,CHM:default:default,PDF:default:default
;output=HTML:Smarty:PHP
output=HTML:frames:earthli
;; turn this option on if you want highlighted source code for every file
;; legal values: on/off
sourcecode = off

View file

@ -58,7 +58,7 @@
/** /**
* Init the wanted display functionality if javascript is enabled. * Init the wanted display functionality if javascript is enabled.
* If javascript is not available, the user is still able to properly administrate. * If javascript is not available, the user is still able to properly administer.
*/ */
onload = function() onload = function()
{ {

View file

@ -77,7 +77,7 @@
/** /**
* Init the wanted display functionality if javascript is enabled. * Init the wanted display functionality if javascript is enabled.
* If javascript is not available, the user is still able to properly administrate. * If javascript is not available, the user is still able to properly administer.
*/ */
onload = function() onload = function()
{ {

View file

@ -5,7 +5,7 @@
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
lang : '{LA_RECAPTCHA_LANG}', lang : '{LA_RECAPTCHA_LANG}',
theme : 'clean', theme : 'clean'
}; };
// ]]> // ]]>
</script> </script>

View file

@ -0,0 +1,60 @@
# Sample lighttpd configuration file for phpBB.
# Global settings have been removed, copy them
# from your system's lighttpd.conf.
# Tested with lighttpd 1.4.26
# Load moules
server.modules += (
"mod_access",
"mod_fastcgi",
"mod_accesslog"
)
# If you have domains with and without www prefix,
# redirect one to the other.
$HTTP["host"] =~ "^(myforums\.com)$" {
url.redirect = (
".*" => "http://www.%1$0"
)
}
$HTTP["host"] == "www.myforums.com" {
server.name = "www.myforums.com"
server.document-root = "/path/to/phpbb"
server.dir-listing = "disable"
index-file.names = ( "index.php", "index.htm", "index.html" )
accesslog.filename = "/var/log/lighttpd/access-www.myforums.com.log"
# Deny access to internal phpbb files.
$HTTP["url"] =~ "^/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload)" {
url.access-deny = ( "" )
}
# Deny access to version control system directories.
$HTTP["url"] =~ "/\.svn|/\.git" {
url.access-deny = ( "" )
}
# Deny access to apache configuration files.
$HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
url.access-deny = ( "" )
}
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 4,
"idle-timeout" => 30,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "10",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
}

View file

@ -0,0 +1,84 @@
<?php
/**
*
* @package acm
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Include the abstract base
if (!class_exists('acm_memory'))
{
require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
}
/**
* ACM for WinCache
* @package acm
*/
class acm extends acm_memory
{
var $extension = 'wincache';
/**
* Purge cache data
*
* @return void
*/
function purge()
{
wincache_ucache_clear();
parent::purge();
}
/**
* Fetch an item from the cache
*
* @access protected
* @param string $var Cache key
* @return mixed Cached data
*/
function _read($var)
{
$success = false;
$result = wincache_ucache_get($this->key_prefix . $var, $success);
return ($success) ? $result : false;
}
/**
* Store data in the cache
*
* @access protected
* @param string $var Cache key
* @param mixed $data Data to store
* @param int $ttl Time-to-live of cached data
* @return bool True if the operation succeeded
*/
function _write($var, $data, $ttl = 2592000)
{
return wincache_ucache_set($this->key_prefix . $var, $data, $ttl);
}
/**
* Remove an item from the cache
*
* @access protected
* @param string $var Cache key
* @return bool True if the operation succeeded
*/
function _delete($var)
{
return wincache_ucache_delete($this->key_prefix . $var);
}
}

View file

@ -2293,12 +2293,12 @@ function redirect($url, $return = false, $disable_cd_check = false)
// Relative uri // Relative uri
$pathinfo = pathinfo($url); $pathinfo = pathinfo($url);
if (!$disable_cd_check && !file_exists($pathinfo['dirname'])) if (!$disable_cd_check && !file_exists($pathinfo['dirname'] . '/'))
{ {
$url = str_replace('../', '', $url); $url = str_replace('../', '', $url);
$pathinfo = pathinfo($url); $pathinfo = pathinfo($url);
if (!file_exists($pathinfo['dirname'])) if (!file_exists($pathinfo['dirname'] . '/'))
{ {
// fallback to "last known user page" // fallback to "last known user page"
// at least this way we know the user does not leave the phpBB root // at least this way we know the user does not leave the phpBB root

View file

@ -1816,6 +1816,7 @@ function add_bots()
'Alta Vista [Bot]' => array('Scooter/', ''), 'Alta Vista [Bot]' => array('Scooter/', ''),
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''), 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
'Baidu [Spider]' => array('Baiduspider+(', ''), 'Baidu [Spider]' => array('Baiduspider+(', ''),
'Bing [Bot]' => array('bingbot/', ''),
'Exabot [Bot]' => array('Exabot/', ''), 'Exabot [Bot]' => array('Exabot/', ''),
'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''), 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),

View file

@ -172,6 +172,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Number of "to" recipients // Number of "to" recipients
$num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match); $num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match);
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
$template->assign_vars(array( $template->assign_vars(array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@ -229,6 +231,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)), 'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
'S_PM_RECIPIENTS' => $num_recipients, 'S_PM_RECIPIENTS' => $num_recipients,
'S_BBCODE_ALLOWED' => ($bbcode_status) ? 1 : 0,
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '', 'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '') 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')

View file

@ -255,7 +255,7 @@ $lang = array_merge($lang, array(
'MOVE_UP' => 'Move up', 'MOVE_UP' => 'Move up',
'NOTIFY' => 'Notification', 'NOTIFY' => 'Notification',
'NO_ADMIN' => 'You are not authorised to administrate this board.', 'NO_ADMIN' => 'You are not authorised to administer this board.',
'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.', 'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.',
'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.', 'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.',

View file

@ -36,7 +36,7 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administrate all your usergroups. You can delete, create and edit existing groups. Furthermore, you may choose group leaders, toggle open/hidden/closed group status and set the group name and description.', 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administer all your usergroups. You can delete, create and edit existing groups. Furthermore, you may choose group leaders, toggle open/hidden/closed group status and set the group name and description.',
'ADD_USERS' => 'Add users', 'ADD_USERS' => 'Add users',
'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a separate line.', 'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a separate line.',

View file

@ -370,7 +370,7 @@ $lang = array_merge($lang, array(
// Updater // Updater
$lang = array_merge($lang, array( $lang = array_merge($lang, array(
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.', 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
'ARCHIVE_FILE' => 'Source file within archive', 'ARCHIVE_FILE' => 'Source file within archive',
'BACK' => 'Back', 'BACK' => 'Back',

View file

@ -131,7 +131,7 @@ $lang = array_merge($lang, array(
'SORT_POST_COUNT' => 'Post count', 'SORT_POST_COUNT' => 'Post count',
'USERNAME_BEGINS_WITH' => 'Username begins with', 'USERNAME_BEGINS_WITH' => 'Username begins with',
'USER_ADMIN' => 'Administrate user', 'USER_ADMIN' => 'Administer user',
'USER_BAN' => 'Banning', 'USER_BAN' => 'Banning',
'USER_FORUM' => 'User statistics', 'USER_FORUM' => 'User statistics',
'USER_LAST_REMINDED' => array( 'USER_LAST_REMINDED' => array(

View file

@ -54,6 +54,7 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.', 'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.',
'LOGIN_EXPLAIN_UNREADSEARCH'=> 'The board requires you to be registered and logged in to view your unread posts.', 'LOGIN_EXPLAIN_UNREADSEARCH'=> 'The board requires you to be registered and logged in to view your unread posts.',
'LOGIN_EXPLAIN_NEWPOSTS' => 'The board requires you to be registered and logged in to view new posts since your last visit.',
'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.', 'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',

View file

@ -861,11 +861,18 @@ if ($submit || $preview || $refresh)
{ {
include($phpbb_root_path . 'includes/functions_user.' . $phpEx); include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$user->add_lang('ucp');
if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false) if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)
{ {
$user->add_lang('ucp');
$error[] = $user->lang[$result . '_USERNAME']; $error[] = $user->lang[$result . '_USERNAME'];
} }
if (($result = validate_string($post_data['username'], false, $config['min_name_chars'], $config['max_name_chars'])) !== false)
{
$min_max_amount = ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars'];
$error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], $min_max_amount);
}
} }
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply'))) if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))

View file

@ -47,32 +47,44 @@ $sort_dir = request_var('sd', 'd');
$return_chars = request_var('ch', ($topic_id) ? -1 : 300); $return_chars = request_var('ch', ($topic_id) ? -1 : 300);
$search_forum = request_var('fid', array(0)); $search_forum = request_var('fid', array(0));
// We put login boxes for the case if search_id is egosearch or unreadposts // We put login boxes for the case if search_id is newposts, egosearch or unreadposts
// because a guest should be able to log in even if guests search is not permitted // because a guest should be able to log in even if guests search is not permitted
// Egosearch is an author search switch ($search_id)
if ($search_id == 'egosearch')
{ {
$author_id = $user->data['user_id']; // Egosearch is an author search
case 'egosearch':
$author_id = $user->data['user_id'];
if ($user->data['user_id'] == ANONYMOUS)
{
login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
}
break;
if ($user->data['user_id'] == ANONYMOUS) // Search for unread posts needs to be allowed and user to be logged in if topics tracking for guests is disabled
{ case 'unreadposts':
login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']); if (!$config['load_unreads_search'])
} {
} $template->assign_var('S_NO_SEARCH', true);
trigger_error('NO_SEARCH_UNREADS');
// Search for unread posts needs to be allowed and user to be logged in if topics tracking for guests is disabled }
if ($search_id == 'unreadposts') else if (!$config['load_anon_lastread'] && !$user->data['is_registered'])
{ {
if (!$config['load_unreads_search']) login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
{ }
$template->assign_var('S_NO_SEARCH', true); break;
trigger_error('NO_SEARCH_UNREADS');
} // The "new posts" search uses user_lastvisit which is user based, so it should require user to log in.
else if (!$config['load_anon_lastread'] && !$user->data['is_registered']) case 'newposts':
{ if ($user->data['user_id'] == ANONYMOUS)
login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']); {
} login_box('', $user->lang['LOGIN_EXPLAIN_NEWPOSTS']);
}
break;
default:
// There's nothing to do here for now ;)
break;
} }
// Is user able to search? Has search been disabled? // Is user able to search? Has search been disabled?