aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_database.php4
-rw-r--r--phpBB/includes/acp/acp_forums.php10
-rw-r--r--phpBB/includes/acp/acp_inactive.php2
-rw-r--r--phpBB/includes/acp/acp_users.php24
-rw-r--r--phpBB/includes/acp/auth.php4
5 files changed, 38 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index b98756a34b..19c4f6e4f1 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -203,7 +203,7 @@ class acp_database
$file = $request->variable('file', '');
$download = $request->variable('download', '');
- if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
+ if (!preg_match('#^backup_\d{10,}_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches))
{
trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -402,7 +402,7 @@ class acp_database
{
while (($file = readdir($dh)) !== false)
{
- if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
+ if (preg_match('#^backup_(\d{10,})_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches))
{
if (in_array($matches[2], $methods))
{
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 13d74f0811..be5a7a2f26 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1541,6 +1541,16 @@ class acp_forums
$table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+ /**
+ * Perform additional actions before move forum content
+ *
+ * @event core.acp_manage_forums_move_content_sql_before
+ * @var array table_ary Array of tables from which forum_id will be updated
+ * @since 3.2.4-RC1
+ */
+ $vars = array('table_ary');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_content_sql_before', compact($vars)));
+
foreach ($table_ary as $table)
{
$sql = "UPDATE $table
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 6026f44ede..66f0d2116c 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -24,7 +24,7 @@ class acp_inactive
var $u_action;
var $p_master;
- function acp_inactive(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 60afccdc22..b74fe535ee 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -24,7 +24,7 @@ class acp_users
var $u_action;
var $p_master;
- function acp_users(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
@@ -1883,6 +1883,17 @@ class acp_users
'user_avatar_height' => $result['avatar_height'],
);
+ /**
+ * Modify users preferences data before assigning it to the template
+ *
+ * @event core.acp_users_avatar_sql
+ * @var array user_row Array with user data
+ * @var array result Array with user avatar data to be updated in the DB
+ * @since 3.2.4-RC1
+ */
+ $vars = array('user_row', 'result');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_avatar_sql', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $result) . '
WHERE user_id = ' . (int) $user_id;
@@ -2085,6 +2096,17 @@ class acp_users
'user_sig_bbcode_bitfield' => $bbcode_bitfield,
);
+ /**
+ * Modify user signature before it is stored in the DB
+ *
+ * @event core.acp_users_modify_signature_sql_ary
+ * @var array user_row Array with user data
+ * @var array sql_ary Array with user signature data to be updated in the DB
+ * @since 3.2.4-RC1
+ */
+ $vars = array('user_row', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_modify_signature_sql_ary', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user_id;
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 58da3b922f..b414a3121a 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -27,7 +27,7 @@ class auth_admin extends \phpbb\auth\auth
/**
* Init auth settings
*/
- function auth_admin()
+ function __construct()
{
global $db, $cache;
@@ -819,7 +819,7 @@ class auth_admin extends \phpbb\auth\auth
// Because we just changed the options and also purged the options cache, we instantly update/regenerate it for later calls to succeed.
$this->acl_options = array();
- $this->auth_admin();
+ $this->__construct();
return true;
}