1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-04 21:44:57 +02:00
git-svn-id: file:///svn/phpbb/trunk@6275 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-08-12 15:10:43 +00:00
parent ef71892edd
commit f5cabf864c
17 changed files with 44 additions and 62 deletions

View File

@ -34,7 +34,7 @@
<legend>{L_BBCODE_HELPLINE}</legend>
<p>{L_BBCODE_HELPLINE_EXPLAIN}</p>
<dl>
<dt><label for="bbcode_tpl">{L_BBCODE_HELPLINE_TEXT}</label></dt>
<dt><label for="bbcode_helpline">{L_BBCODE_HELPLINE_TEXT}</label></dt>
<dd><input type="text" id="bbcode_helpline" name="bbcode_helpline" size="60" maxlength="255" value="{BBCODE_HELPLINE}" /></dd>
</dl>
</fieldset>

View File

@ -759,11 +759,11 @@ function get_schema_struct()
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR', ''),
'display_on_posting' => array('BOOL', 0),
'bbcode_match' => array('VCHAR', ''),
'bbcode_match' => array('TEXT', ''),
'bbcode_tpl' => array('MTEXT', ''),
'first_pass_match' => array('VCHAR', ''),
'first_pass_replace' => array('VCHAR', ''),
'second_pass_match' => array('VCHAR', ''),
'first_pass_match' => array('MTEXT', ''),
'first_pass_replace' => array('MTEXT', ''),
'second_pass_match' => array('MTEXT', ''),
'second_pass_replace' => array('MTEXT', ''),
),
'PRIMARY_KEY' => 'bbcode_id',

View File

@ -1150,7 +1150,7 @@ class acp_attachments
{
$imagick = '';
$exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : '';
$exe = ((defined('PHP_OS')) && (preg_match('#^win#i', PHP_OS))) ? '.exe' : '';
$magic_home = getenv('MAGICK_HOME');

View File

@ -133,11 +133,6 @@ class acp_bbcodes
}
}
if (strlen($data['first_pass_match']) >= 255 || strlen($data['first_pass_replace']) >= 255 || strlen($data['second_pass_match']) >= 255)
{
trigger_error('BBCODE_TAG_TOO_LONG');
}
$sql_ary = array(
'bbcode_tag' => $data['bbcode_tag'],
'bbcode_match' => $bbcode_match,

View File

@ -14,6 +14,12 @@
class acp_users
{
var $u_action;
var $p_master;
function acp_users(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{
@ -114,7 +120,7 @@ class acp_users
foreach ($forms_ary['modes'] as $value => $ary)
{
if (!$this->is_authed($ary['auth']))
if (!$this->p_master->module_auth($ary['auth']))
{
continue;
}
@ -1996,26 +2002,6 @@ class acp_users
$var = ($data) ? $data : $user_row['user_options'];
return ($var & 1 << $user->keyoptions[$key]) ? true : false;
}
/**
* Check if user is allowed to call this user mode
*/
function is_authed($module_auth)
{
global $config, $auth;
$module_auth = trim($module_auth);
if (!$module_auth)
{
return true;
}
$is_auth = false;
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', 'true', '(int) $config["\\1"]'), $module_auth) . ');');
return $is_auth;
}
}
?>

View File

@ -1980,7 +1980,8 @@ function cache_moderators()
AND a.group_id = ug.group_id
AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . "
AND ug.user_pending = 0
AND o.auth_option LIKE 'm\_%'",
AND o.auth_option LIKE 'm\_%'" .
((SQL_LAYER == 'mssql' || SQL_LAYER == 'mssql_odbc') ? " ESCAPE '\\'" : ''),
));
$result = $db->sql_query($sql);

View File

@ -533,7 +533,7 @@ function create_thumbnail($source, $destination, $mimetype)
// Only use imagemagick if defined and the passthru function not disabled
if ($config['img_imagick'] && function_exists('passthru'))
{
passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
if (file_exists($destination))
{
$used_imagick = true;

View File

@ -318,7 +318,7 @@ class ucp_groups
$sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
$sql = 'SELECT group_id, group_name, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type
FROM ' . GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('group_id', $group_id_ary, true) . ")
WHERE ' . $db->sql_in_set('group_id', $group_id_ary, true) . "
AND group_type $sql_and
ORDER BY group_type DESC, group_name";
$result = $db->sql_query($sql);

View File

@ -247,7 +247,7 @@ class install_install extends module
}
// Can we find Imagemagick anywhere on the system?
$exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : '';
$exe = ((defined('PHP_OS')) && (preg_match('#^win#i', PHP_OS))) ? '.exe' : '';
$magic_home = getenv('MAGICK_HOME');
$img_imagick = '';

View File

@ -177,11 +177,11 @@ CREATE TABLE phpbb_bbcodes (
bbcode_tag VARCHAR(16) DEFAULT '' NOT NULL,
bbcode_helpline VARCHAR(255) DEFAULT '' NOT NULL,
display_on_posting INTEGER DEFAULT 0 NOT NULL,
bbcode_match VARCHAR(255) DEFAULT '' NOT NULL,
bbcode_match BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
bbcode_tpl BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
first_pass_match VARCHAR(255) DEFAULT '' NOT NULL,
first_pass_replace VARCHAR(255) DEFAULT '' NOT NULL,
second_pass_match VARCHAR(255) DEFAULT '' NOT NULL,
first_pass_match BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
first_pass_replace BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
second_pass_match BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
second_pass_replace BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL
);;

View File

@ -202,11 +202,11 @@ CREATE TABLE [phpbb_bbcodes] (
[bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
[bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
[display_on_posting] [int] DEFAULT (0) NOT NULL ,
[bbcode_match] [varchar] (255) DEFAULT ('') NOT NULL ,
[bbcode_match] [varchar] (8000) DEFAULT ('') NOT NULL ,
[bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
[first_pass_match] [varchar] (255) DEFAULT ('') NOT NULL ,
[first_pass_replace] [varchar] (255) DEFAULT ('') NOT NULL ,
[second_pass_match] [varchar] (255) DEFAULT ('') NOT NULL ,
[first_pass_match] [text] DEFAULT ('') NOT NULL ,
[first_pass_replace] [text] DEFAULT ('') NOT NULL ,
[second_pass_match] [text] DEFAULT ('') NOT NULL ,
[second_pass_replace] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

View File

@ -112,11 +112,11 @@ CREATE TABLE phpbb_bbcodes (
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_match varchar(255) DEFAULT '' NOT NULL,
bbcode_match text DEFAULT '' NOT NULL,
bbcode_tpl mediumtext DEFAULT '' NOT NULL,
first_pass_match varchar(255) DEFAULT '' NOT NULL,
first_pass_replace varchar(255) DEFAULT '' NOT NULL,
second_pass_match varchar(255) DEFAULT '' NOT NULL,
first_pass_match mediumtext DEFAULT '' NOT NULL,
first_pass_replace mediumtext DEFAULT '' NOT NULL,
second_pass_match mediumtext DEFAULT '' NOT NULL,
second_pass_replace mediumtext DEFAULT '' NOT NULL,
PRIMARY KEY (bbcode_id),
KEY display_on_post (display_on_posting)

View File

@ -253,11 +253,11 @@ CREATE TABLE phpbb_bbcodes (
bbcode_tag varchar2(16) DEFAULT '' ,
bbcode_helpline varchar2(255) DEFAULT '' ,
display_on_posting number(1) DEFAULT '0' NOT NULL,
bbcode_match varchar2(255) DEFAULT '' ,
bbcode_match clob DEFAULT '' ,
bbcode_tpl clob DEFAULT '' ,
first_pass_match varchar2(255) DEFAULT '' ,
first_pass_replace varchar2(255) DEFAULT '' ,
second_pass_match varchar2(255) DEFAULT '' ,
first_pass_match clob DEFAULT '' ,
first_pass_replace clob DEFAULT '' ,
second_pass_match clob DEFAULT '' ,
second_pass_replace clob DEFAULT '' ,
CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
)

View File

@ -214,11 +214,11 @@ CREATE TABLE phpbb_bbcodes (
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0),
bbcode_match varchar(255) DEFAULT '' NOT NULL,
bbcode_match varchar(8000) DEFAULT '' NOT NULL,
bbcode_tpl TEXT DEFAULT '' NOT NULL,
first_pass_match varchar(255) DEFAULT '' NOT NULL,
first_pass_replace varchar(255) DEFAULT '' NOT NULL,
second_pass_match varchar(255) DEFAULT '' NOT NULL,
first_pass_match TEXT DEFAULT '' NOT NULL,
first_pass_replace TEXT DEFAULT '' NOT NULL,
second_pass_match TEXT DEFAULT '' NOT NULL,
second_pass_replace TEXT DEFAULT '' NOT NULL,
PRIMARY KEY (bbcode_id)
);

View File

@ -205,7 +205,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B2');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');

View File

@ -110,11 +110,11 @@ CREATE TABLE phpbb_bbcodes (
bbcode_tag varchar(16) NOT NULL DEFAULT '',
bbcode_helpline varchar(255) NOT NULL DEFAULT '',
display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_match varchar(255) NOT NULL DEFAULT '',
bbcode_match text(65535) NOT NULL DEFAULT '',
bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '',
first_pass_match varchar(255) NOT NULL DEFAULT '',
first_pass_replace varchar(255) NOT NULL DEFAULT '',
second_pass_match varchar(255) NOT NULL DEFAULT '',
first_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
second_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
PRIMARY KEY (bbcode_id)
);

View File

@ -234,7 +234,7 @@ $lang = array_merge($lang, array(
'SUB_SUPPORT' => 'Support',
'SUCCESSFUL_CONNECT' => 'Successful Connection',
// TODO: Write some text on obtaining support
'SUPPORT_BODY' => 'During the beta phase a minimal level of support will be given at <a href="http://www.phpbb.com/phpBB/viewforum.php?f=46">the phpBB 3.0 Beta1 support forum</a>. We will provide answers to general setup questions, configuration problems and support for determining common problems mostly related to bugs. We will not support modifications, custom code/style additions or any users using the beta packages within a live environment.</p><p>For additional assistance, please refer to our <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a>.</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/" target="_new">subscribe to our mailing list</a>',
'SUPPORT_BODY' => 'During the beta phase a minimal level of support will be given at <a href="http://www.phpbb.com/phpBB/viewforum.php?f=46">the phpBB 3.0 Beta support forum</a>. We will provide answers to general setup questions, configuration problems and support for determining common problems mostly related to bugs. We will not support modifications, custom code/style additions or any users using the beta packages within a live environment.</p><p>For additional assistance, please refer to our <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a>.</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/" target="_new">subscribe to our mailing list</a>',
'SYNC_FORUMS' => 'Starting to sync forums',
'SYNC_TOPICS' => 'Starting to sync topics',
'SYNC_TOPIC_ID' => 'Synchronising topics from topic_id $1%s to $2%s',