aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php2
-rw-r--r--phpBB/includes/acp/acp_board.php1
-rw-r--r--phpBB/includes/acp/acp_icons.php111
-rw-r--r--phpBB/includes/acp/acp_permissions.php2
-rw-r--r--phpBB/includes/acp/acp_users.php10
5 files changed, 68 insertions, 58 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 641ceac03e..52c5460847 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -97,7 +97,7 @@ class acp_attachments
'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'type' => 'text:3:3', 'explain' => false),
'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'type' => 'radio:yes_no', 'explain' => true),
'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
- 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERER', 'type' => 'radio:yes_no', 'explain' => true),
+ 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => $l_legend_cat_images,
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'type' => 'radio:yes_no', 'explain' => true),
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 011bbede7f..be98c6fd49 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -204,7 +204,6 @@ class acp_board
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'type' => 'radio:yes_no', 'explain' => true),
'coppa_mail' => array('lang' => 'COPPA_MAIL', 'type' => 'textarea:5:40', 'explain' => true),
'coppa_fax' => array('lang' => 'COPPA_FAX', 'type' => 'text:25:100', 'explain' => false),
- 'coppa_hide_groups' => array('lang' => 'COPPA_HIDE_GROUPS', 'type' => 'radio:yes_no', 'explain' => true),
)
);
break;
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index b74e5f8b4f..0587122423 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -108,44 +108,41 @@ class acp_icons
ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
$result = $db->sql_query($sql);
- if ($row = $db->sql_fetchrow($result))
+ while ($row = $db->sql_fetchrow($result))
{
- do
+ if ($action == 'add')
{
- if ($action == 'add')
- {
- unset($_images[$row[$fields . '_url']]);
- }
+ unset($_images[$row[$fields . '_url']]);
+ }
- if ($row[$fields . '_id'] == $icon_id)
+ if ($row[$fields . '_id'] == $icon_id)
+ {
+ $after = true;
+ $data[$row[$fields . '_url']] = $row;
+ }
+ else
+ {
+ if ($action == 'edit' && !$icon_id)
{
- $after = true;
$data[$row[$fields . '_url']] = $row;
}
- else
- {
- if ($action == 'edit' && !$icon_id)
- {
- $data[$row[$fields . '_url']] = $row;
- }
-
- $selected = '';
- if (!empty($after))
- {
- $selected = ' selected="selected"';
- $after = false;
- }
- $after_txt = ($mode == 'smilies') ? $row['code'] : $row['icons_url'];
- $order_list = '<option value="' . ($row[$fields . '_order']) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . htmlspecialchars($after_txt)) . '</option>' . $order_list;
+ $selected = '';
+ if (!empty($after))
+ {
+ $selected = ' selected="selected"';
+ $after = false;
}
+
+ $after_txt = ($mode == 'smilies') ? $row['code'] : $row['icons_url'];
+ $order_list = '<option value="' . ($row[$fields . '_order']) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . htmlspecialchars($after_txt)) . '</option>' . $order_list;
}
- while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>' . $order_list;
+ $data = array();
if ($action == 'add')
{
$data = $_images;
@@ -231,20 +228,20 @@ class acp_icons
}
$img_sql = array(
- $fields . '_url' => $image,
- $fields . '_width' => $image_width[$image],
- $fields . '_height' => $image_height[$image],
- 'display_on_posting'=> (isset($image_display_on_posting[$image])) ? 1 : 0,
+ $fields . '_url' => $image,
+ $fields . '_width' => $image_width[$image],
+ $fields . '_height' => $image_height[$image],
+ 'display_on_posting' => (isset($image_display_on_posting[$image])) ? 1 : 0,
);
if ($mode == 'smilies')
{
$img_sql = array_merge($img_sql, array(
- 'emotion' => $image_emotion[$image],
- 'code' => $image_code[$image])
+ 'emotion' => $image_emotion[$image],
+ 'code' => $image_code[$image])
);
}
-
+
if (!empty($image_order[$image]))
{
$img_sql = array_merge($img_sql, array(
@@ -351,7 +348,10 @@ class acp_icons
$cur_img = array();
$field_sql = ($mode == 'smilies') ? 'code' : 'icons_url';
- $result = $db->sql_query("SELECT $field_sql FROM $table");
+
+ $sql = "SELECT $field_sql
+ FROM $table";
+ $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
@@ -371,8 +371,8 @@ class acp_icons
$data = array();
if (preg_match_all("#'(.*?)', #", $pak_entry, $data))
{
- if ((sizeof($data[1]) != 3 && $mode == 'icons') ||
- (sizeof($data[1]) != 5 && $mode == 'smilies'))
+ if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
+ (sizeof($data[1]) != 6 && $mode == 'smilies'))
{
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action));
}
@@ -381,11 +381,12 @@ class acp_icons
$img = stripslashes($data[1][0]);
$width = stripslashes($data[1][1]);
$height = stripslashes($data[1][2]);
+ $display_on_posting = stripslashes($data[1][3]);
- if (isset($data[1][3]) && isset($data[1][4]))
+ if (isset($data[1][4]) && isset($data[1][5]))
{
- $emotion = stripslashes($data[1][3]);
- $code = stripslashes($data[1][4]);
+ $emotion = stripslashes($data[1][4]);
+ $code = stripslashes($data[1][5]);
}
if ($current == 'replace' &&
@@ -394,15 +395,16 @@ class acp_icons
{
$replace_sql = ($mode == 'smilies') ? $code : $img;
$sql = array(
- $fields . '_url' => $img,
- $fields . '_height' => (int) $height,
- $fields . '_width' => (int) $width,
+ $fields . '_url' => $img,
+ $fields . '_height' => (int) $height,
+ $fields . '_width' => (int) $width,
+ 'display_on_posting' => (int) $display_on_posting,
);
if ($mode == 'smilies')
{
$sql = array_merge($sql, array(
- 'emotion' => $emotion
+ 'emotion' => $emotion,
));
}
@@ -415,17 +417,18 @@ class acp_icons
++$order;
$sql = array(
- $fields . '_url' => $img,
- $fields . '_height' => (int) $height,
- $fields . '_width' => (int) $width,
- $fields . '_order' => (int) $order,
+ $fields . '_url' => $img,
+ $fields . '_height' => (int) $height,
+ $fields . '_width' => (int) $width,
+ $fields . '_order' => (int) $order,
+ 'display_on_posting'=> (int) $display_on_posting,
);
if ($mode == 'smilies')
{
$sql = array_merge($sql, array(
- 'code' => $code,
- 'emotion' => $emotion
+ 'code' => $code,
+ 'emotion' => $emotion,
));
}
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql));
@@ -435,7 +438,7 @@ class acp_icons
$cache->destroy('icons');
$cache->destroy('sql', $table);
-
+
trigger_error($user->lang[$lang . '_IMPORT_SUCCESS'] . adm_back_link($this->u_action));
}
else
@@ -476,7 +479,7 @@ class acp_icons
);
return;
-
+
break;
case 'send':
@@ -492,6 +495,7 @@ class acp_icons
$pak .= "'" . addslashes($row[$fields . '_url']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_width']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
+ $pak .= "'" . addslashes($row['display_on_posting']) . "', ";
if ($mode == 'smilies')
{
@@ -505,7 +509,7 @@ class acp_icons
if ($pak != '')
{
- $db->sql_close();
+ garbage_collection();
header('Pragma: public');
@@ -519,15 +523,16 @@ class acp_icons
}
else
{
- trigger_error($user->lang['NO_' . $fields . '_EXPORT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action));
}
break;
case 'delete':
- $db->sql_query("DELETE FROM $table
- WHERE {$fields}_id = $icon_id");
+ $sql = "DELETE FROM $table
+ WHERE {$fields}_id = $icon_id";
+ $db->sql_query($sql);
switch ($mode)
{
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 76edb094da..3619075fc8 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -70,7 +70,7 @@ class acp_permissions
if ($select_all_groups)
{
// Add default groups to selection
- $sql_and = ($config['coppa_hide_groups']) ? " AND group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : '';
+ $sql_and = (!$config['coppa_enable']) ? " AND group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : '';
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . '
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index f8b289da5e..f6fe02e617 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1505,6 +1505,7 @@ class acp_users
case 'sig':
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false;
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false;
@@ -1576,9 +1577,14 @@ class acp_users
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
- 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],)
+ 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
+ 'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
+ 'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false)
);
+ // Assigning custom bbcodes
+ display_custom_bbcodes();
+
break;
case 'attach':
@@ -1808,7 +1814,7 @@ class acp_users
$s_group_options = '';
while ($row = $db->sql_fetchrow($result))
{
- if ($config['coppa_hide_groups'] && in_array($row['group_name'], array('INACTIVE_COPPA', 'REGISTERED_COPPA')))
+ if (!$config['coppa_enable'] && in_array($row['group_name'], array('INACTIVE_COPPA', 'REGISTERED_COPPA')))
{
continue;
}