aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-10-04 21:31:35 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-10-04 21:31:35 +0000
commit5449c591a9721a63098f794a24e0bcef690ebb51 (patch)
treecffa50a6b77b053e3e738cada55f5623352977f5 /phpBB/includes/ucp
parent95ff1f3b64fdbf7d72fa86a94cf606a0369aa6bd (diff)
downloadforums-5449c591a9721a63098f794a24e0bcef690ebb51.tar
forums-5449c591a9721a63098f794a24e0bcef690ebb51.tar.gz
forums-5449c591a9721a63098f794a24e0bcef690ebb51.tar.bz2
forums-5449c591a9721a63098f794a24e0bcef690ebb51.tar.xz
forums-5449c591a9721a63098f794a24e0bcef690ebb51.zip
- changed ucp classes to work with the new module system
- mcp is no longer working, i know. git-svn-id: file:///svn/phpbb/trunk@5254 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_activate.php4
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php24
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php4
-rw-r--r--phpBB/includes/ucp/ucp_groups.php6
-rw-r--r--phpBB/includes/ucp/ucp_main.php39
-rw-r--r--phpBB/includes/ucp/ucp_pm.php100
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php7
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php6
-rw-r--r--phpBB/includes/ucp/ucp_profile.php7
-rw-r--r--phpBB/includes/ucp/ucp_register.php9
-rw-r--r--phpBB/includes/ucp/ucp_remind.php6
-rw-r--r--phpBB/includes/ucp/ucp_resend.php6
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php8
14 files changed, 111 insertions, 117 deletions
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 0241ce7974..1792922e3c 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -13,9 +13,9 @@
* ucp_activate
* User activation
*/
-class ucp_activate extends module
+class ucp_activate
{
- function ucp_activate($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index 9e8cd2d2e8..e38c9a380e 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -13,16 +13,19 @@
* ucp_attachments
* User attachments
*/
-class ucp_attachments extends module
+class ucp_attachments
{
- function ucp_attachments($id, $mode)
+ function main($id, $mode)
{
global $template, $user, $db, $config, $phpEx, $phpbb_root_path, $SID;
- $start = request_var('start', 0);
- $delete = (isset($_POST['delete'])) ? true : false;
- $confirm = (isset($_POST['confirm'])) ? true : false;
- $delete_ids = isset($_REQUEST['attachment']) ? array_keys(array_map('intval', $_REQUEST['attachment'])) : array();
+ $start = request_var('start', 0);
+ $sort_key = request_var('sk', 'a');
+ $sort_dir = request_var('sd', 'a');
+
+ $delete = (isset($_POST['delete'])) ? true : false;
+ $confirm = (isset($_POST['confirm'])) ? true : false;
+ $delete_ids = isset($_REQUEST['attachment']) ? array_keys(array_map('intval', $_REQUEST['attachment'])) : array();
if ($delete && sizeof($delete_ids))
{
@@ -49,9 +52,6 @@ class ucp_attachments extends module
}
}
- $sort_key = request_var('sk', 'a');
- $sort_dir = request_var('sd', 'a');
-
// Select box eventually
$sort_key_text = array('a' => $user->lang['SORT_FILENAME'], 'b' => $user->lang['SORT_COMMENT'], 'c' => $user->lang['SORT_EXTENSION'], 'd' => $user->lang['SORT_SIZE'], 'e' => $user->lang['SORT_DOWNLOADS'], 'f' => $user->lang['SORT_POST_TIME'], 'g' => $user->lang['SORT_TOPIC_TITLE']);
$sort_key_sql = array('a' => 'a.real_filename', 'b' => 'a.comment', 'c' => 'a.extension', 'd' => 'a.filesize', 'e' => 'a.download_count', 'f' => 'a.filetime', 'g' => 't.topic_title');
@@ -72,7 +72,7 @@ class ucp_attachments extends module
$s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
}
- $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
+ $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
$sql = 'SELECT COUNT(*) as num_attachments
FROM ' . ATTACHMENTS_TABLE . '
@@ -104,7 +104,7 @@ class ucp_attachments extends module
}
else
{
- $view_topic = "{$phpbb_root_path}viewtopic.$phpEx$SID&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_msg_id'] . '#' . $row['post_msg_id'];
+ $view_topic = "{$phpbb_root_path}viewtopic.$phpEx$SID&amp;t={$row['topic_id']}&amp;p={$row['post_msg_id']}#{$row['post_msg_id']}";
}
$template->assign_block_vars('attachrow', array(
@@ -155,7 +155,7 @@ class ucp_attachments extends module
'S_ORDER_SELECT' => $s_sort_dir)
);
- $this->display($user->lang['UCP_ATTACHMENTS'], 'ucp_attachments.html');
+ $this->tpl_name = 'ucp_attachments';
}
}
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index d50a8b72cc..9e698cadb1 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -20,9 +20,9 @@
* released or distributed in any way under a licence other
* than the GPL. We will be watching ... ;)
*/
-class ucp_confirm extends module
+class ucp_confirm
{
- function ucp_confirm($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index dbcd859997..4cbf3740c0 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -12,9 +12,9 @@
* @package ucp
* ucp_groups
*/
-class ucp_groups extends module
+class ucp_groups
{
- function ucp_groups($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -367,7 +367,7 @@ class ucp_groups extends module
break;
}
- $this->display($user->lang['UCP_GROUPS_' . strtoupper($mode)], 'ucp_groups_' . $mode . '.html');
+ $this->tpl_name = 'ucp_groups_' . $mode;
}
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index f236f5dd9d..d7e16caabb 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -13,9 +13,16 @@
* ucp_main
* UCP Front Panel
*/
-class ucp_main extends module
+class ucp_main
{
- function ucp_main($id, $mode)
+ var $p_master;
+
+ function ucp_main(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -653,9 +660,8 @@ class ucp_main extends module
break;
case 'drafts':
- global $ucp;
- $pm_drafts = ($ucp->name == 'pm') ? true : false;
+ $pm_drafts = ($this->p_master->p_name == 'pm') ? true : false;
$user->add_lang('posting');
@@ -820,7 +826,7 @@ class ucp_main extends module
$template->assign_var('S_DRAFT_ROWS', $row_count);
}
- break;
+ break;
}
@@ -832,27 +838,8 @@ class ucp_main extends module
'S_UCP_ACTION' => $phpbb_root_path . "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode")
);
- $this->display($user->lang['UCP_MAIN'], 'ucp_main_' . $mode . '.html');
- }
-
- function install()
- {
- }
-
- function uninstall()
- {
- }
-
- function module()
- {
- $details = array(
- 'name' => 'UCP - Main',
- 'description' => 'Front end for User Control Panel',
- 'filename' => 'main',
- 'version' => '1.0.0',
- 'phpbbversion' => '2.2.0'
- );
- return $details;
+ // Set desired template
+ $this->tpl_name = 'ucp_main_' . $mode;
}
}
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index 00b7c0988e..d16cf4e9fa 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -1,6 +1,5 @@
<?php
-/**
-*
+/**
* @package ucp
* @version $Id$
* @copyright (c) 2005 phpBB Group
@@ -8,9 +7,8 @@
*
*/
-/**
+/**
* @package ucp
-* ucp_pm
*
* Private Message Class
*
@@ -19,8 +17,8 @@
*
*
* Display Unread Messages - mode=unread
-* Display Messages (default to inbox) - mode=view_messages
-* Display single message - mode=view_messages&action=view_message&p=[msg_id] or &p=[msg_id] (short linkage)
+* Display Messages (default to inbox) - mode=view
+* Display single message - mode=view&p=[msg_id] or &p=[msg_id] (short linkage)
*
* if the folder id with (&f=[folder_id]) is used when displaying messages, one query will be saved. If it is not used, phpBB needs to grab
* the folder id first in order to display the input boxes and folder names and such things. ;) phpBB always checks this against the database to make
@@ -29,19 +27,14 @@
* Composing Messages (mode=compose):
* To specific user (u=[user_id])
* To specific group (g=[group_id])
-* Quoting a post (action=quote&q=1&p=[post_id])
+* Quoting a post (action=quotepost&p=[post_id])
* Quoting a PM (action=quote&p=[msg_id])
* Forwarding a PM (action=forward&p=[msg_id])
*
-*
-* @todo Review of post when replying/quoting
-* @todo Report PM
-* @todo Check Permissions (compose message - to user/group)
-*
*/
-class ucp_pm extends module
+class ucp_pm
{
- function ucp_pm($id, $mode)
+ function main($id, $mode)
{
global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $SID, $config;
@@ -73,21 +66,20 @@ class ucp_pm extends module
if (!$folder_specified)
{
- $mode = (!$mode) ? request_var('mode', 'view_messages') : $mode;
+ $mode = (!$mode) ? request_var('mode', 'view') : $mode;
}
else
{
- $mode = 'view_messages';
+ $mode = 'view';
}
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
- $tpl_file = 'ucp_pm_' . $mode . '.html';
switch ($mode)
{
// New private messages popup
case 'popup':
-
+
$l_new_message = '';
if ($user->data['is_registered'])
{
@@ -109,7 +101,7 @@ class ucp_pm extends module
);
break;
-
+
// Compose message
case 'compose':
$action = request_var('action', 'post');
@@ -123,10 +115,10 @@ class ucp_pm extends module
include($phpbb_root_path . 'includes/ucp/ucp_pm_compose.'.$phpEx);
compose_pm($id, $mode, $action);
-
- $tpl_file = 'posting_body.html';
+
+ $tpl_file = 'posting_body';
break;
-
+
case 'options':
$sql = 'SELECT group_message_limit
FROM ' . GROUPS_TABLE . '
@@ -141,18 +133,28 @@ class ucp_pm extends module
include($phpbb_root_path . 'includes/ucp/ucp_pm_options.'.$phpEx);
message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions);
+
+ $tpl_file = 'ucp_pm_options';
break;
case 'drafts':
get_folder($user->data['user_id'], $folder);
+ $this->p_name = 'pm';
+
+ // Call another module... please do not try this at home... Hoochie Coochie Man
include($phpbb_root_path . 'includes/ucp/ucp_main.'.$phpEx);
- $module = new ucp_main($id, $mode);
+
+ $module = new ucp_main($this);
+ $module->main($id, $mode);
+ $this->tpl_name = $module->tpl_name;
+
unset($module);
- exit;
- break;
+ return;
+
+ break;
case 'unread':
- case 'view_messages':
+ case 'view':
$sql = 'SELECT group_message_limit
FROM ' . GROUPS_TABLE . '
@@ -176,8 +178,9 @@ class ucp_pm extends module
$msg_id = request_var('p', 0);
$view = request_var('view', '');
-
- if ($msg_id && $action == 'view_folder')
+
+// if ($msg_id && $action == 'view_folder')
+ if ($msg_id)
{
$action = 'view_message';
}
@@ -243,15 +246,15 @@ class ucp_pm extends module
if (!($row = $db->sql_fetchrow($result)))
{
trigger_error('NO_MESSAGE');
- }
+ }
$folder_id = (int) $row['folder_id'];
}
-
+
$message_row = array();
- if ($mode == 'view_messages' && $action == 'view_message' && $msg_id)
+ if ($mode == 'view' && $action == 'view_message' && $msg_id)
{
// Get Message user want to see
-
+
if ($view == 'next' || $view == 'previous')
{
$sql_condition = ($view == 'next') ? '>' : '<';
@@ -277,7 +280,7 @@ class ucp_pm extends module
$msg_id = $row['msg_id'];
}
}
-
+
$sql = 'SELECT t.*, p.*, u.*
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE t.user_id = ' . $user->data['user_id'] . "
@@ -295,7 +298,7 @@ class ucp_pm extends module
// Update unread status
update_unread_status($message_row['unread'], $message_row['msg_id'], $user->data['user_id'], $folder_id);
}
-
+
get_folder($user->data['user_id'], $folder, $folder_id);
$s_folder_options = $s_to_folder_options = '';
@@ -307,11 +310,11 @@ class ucp_pm extends module
$s_folder_options .= $option;
}
clean_sentbox($folder[PRIVMSGS_SENTBOX]['num_messages']);
-
+
// Header for message view - folder and so on
$folder_status = get_folder_status($folder_id, $folder);
- $url = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=$id";
-
+ $url = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode";
+
$template->assign_vars(array(
'CUR_FOLDER_ID' => $folder_id,
'CUR_FOLDER_NAME' => $folder_status['folder_name'],
@@ -321,9 +324,9 @@ class ucp_pm extends module
'S_FOLDER_OPTIONS' => $s_folder_options,
'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
- 'S_FOLDER_ACTION' => "$url&amp;mode=view_messages&amp;action=view_folder",
- 'S_PM_ACTION' => "$url&amp;mode=$mode&amp;action=$action",
-
+ 'S_FOLDER_ACTION' => "$url&amp;action=view_folder",
+ 'S_PM_ACTION' => "$url&amp;action=$action",
+
'U_INBOX' => "$url&amp;folder=inbox",
'U_OUTBOX' => "$url&amp;folder=outbox",
'U_SENTBOX' => "$url&amp;folder=sentbox",
@@ -332,20 +335,20 @@ class ucp_pm extends module
'S_IN_INBOX' => ($folder_id == PRIVMSGS_INBOX) ? true : false,
'S_IN_OUTBOX' => ($folder_id == PRIVMSGS_OUTBOX) ? true : false,
'S_IN_SENTBOX' => ($folder_id == PRIVMSGS_SENTBOX) ? true : false,
-
+
'FOLDER_STATUS' => $folder_status['message'],
'FOLDER_MAX_MESSAGES' => $folder_status['max'],
'FOLDER_CUR_MESSAGES' => $folder_status['cur'],
'FOLDER_REMAINING_MESSAGES' => $folder_status['remaining'],
'FOLDER_PERCENT' => $folder_status['percent'])
);
-
+
if ($mode == 'unread' || $action == 'view_folder')
{
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewfolder.'.$phpEx);
view_folder($id, $mode, $folder_id, $folder, (($mode == 'unread') ? 'unread' : 'folder'));
- $tpl_file = 'ucp_pm_viewfolder.html';
+ $tpl_file = 'ucp_pm_viewfolder';
}
else if ($action == 'view_message')
{
@@ -353,7 +356,7 @@ class ucp_pm extends module
'S_VIEW_MESSAGE'=> true,
'MSG_ID' => $msg_id)
);
-
+
if (!$msg_id)
{
trigger_error('NO_MESSAGE');
@@ -362,21 +365,22 @@ class ucp_pm extends module
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.'.$phpEx);
view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row);
- $tpl_file = ($view == 'print') ? 'ucp_pm_viewmessage_print.html' : 'ucp_pm_viewmessage.html';
+ $tpl_file = ($view == 'print') ? 'ucp_pm_viewmessage_print' : 'ucp_pm_viewmessage';
}
-
+
break;
default:
trigger_error('NO_ACTION_MODE');
}
- $template->assign_vars(array(
+ $template->assign_vars(array(
'L_TITLE' => $user->lang['UCP_PM_' . strtoupper($mode)],
'S_UCP_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode" . ((isset($action)) ? "&amp;action=$action" : ''))
);
- $this->display($user->lang['UCP_PM'], $tpl_file);
+ // Set desired template
+ $this->tpl_name = $tpl_file;
}
}
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index c52349e92a..a15acd9c5d 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -14,13 +14,14 @@
*/
function view_folder($id, $mode, $folder_id, $folder, $type)
{
- global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
+ global $user, $template, $auth, $db, $cache;
+ global $phpbb_root_path, $config, $phpEx, $SID;
$user->add_lang('viewforum');
// Grab icons
$icons = array();
- obtain_icons($icons);
+ $cache->obtain_icons($icons);
$color_rows = array('marked', 'replied', 'message_reported', 'friend', 'foe');
@@ -127,7 +128,7 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
// Generate all URIs ...
$message_author = "<a href=\"{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $row['author_id'] . '">' . $row['username'] . '</a>';
- $view_message_url = "$url&amp;i=$id&amp;f=$folder_id&amp;p=$message_id";
+ $view_message_url = "$url&amp;i=$id&amp;mode=$mode&amp;f=$folder_id&amp;p=$message_id";
$remove_message_url = "$url&amp;i=compose&amp;action=delete&amp;p=$message_id";
$row_indicator = '';
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 9408352335..b4ffa69d7a 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -241,7 +241,7 @@ function message_history($msg_id, $user_id, $message_row, $folder)
FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
WHERE t.msg_id = p.msg_id
AND p.author_id = u.user_id
- AND t.folder_id <> ' . PRIVMSGS_NO_BOX . "
+ AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ")
AND t.user_id = $user_id";
if (!$message_row['root_level'])
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 58c6e74e47..fef42f043f 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -13,9 +13,9 @@
* ucp_prefs
* Changing user preferences
*/
-class ucp_prefs extends module
+class ucp_prefs
{
- function ucp_prefs($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -413,7 +413,7 @@ class ucp_prefs extends module
'S_UCP_ACTION' => "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode")
);
- $this->display($user->lang['UCP_PROFILE'], 'ucp_prefs_' . $mode . '.html');
+ $this->tpl_name = 'ucp_prefs_' . $mode;
}
}
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index b8ec6fb0f5..74d1c299cf 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -13,9 +13,9 @@
* ucp_profile
* Changing profile settings
*/
-class ucp_profile extends module
+class ucp_profile
{
- function ucp_profile($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -649,7 +649,8 @@ class ucp_profile extends module
'S_UCP_ACTION' => "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode")
);
- $this->display($user->lang['UCP_PROFILE'], 'ucp_profile_' . $mode . '.html');
+ // Set desired template
+ $this->tpl_name = 'ucp_profile_' . $mode;
}
}
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 775f3650cf..3ed7e7668f 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -13,9 +13,9 @@
* ucp_register
* Board registration
*/
-class ucp_register extends module
+class ucp_register
{
- function ucp_register($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -78,7 +78,8 @@ class ucp_register extends module
);
}
- $this->display($user->lang['REGISTER'], 'ucp_agreement.html');
+ $this->tpl_name = 'ucp_agreement';
+ return;
}
$var_ary = array(
@@ -480,7 +481,7 @@ class ucp_register extends module
$cp->generate_profile_fields('register', $user->get_iso_lang_id());
//
- $this->display($user->lang['REGISTER'], 'ucp_register.html');
+ $this->tpl_name = 'ucp_register';
}
}
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index dea1027ce6..7308d9b9f8 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -13,9 +13,9 @@
* ucp_remind
* Sending password reminders
*/
-class ucp_remind extends module
+class ucp_remind
{
- function ucp_remind($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -95,7 +95,7 @@ class ucp_remind extends module
'EMAIL' => $email)
);
- $this->display($user->lang['UCP_REMIND'], 'ucp_remind.html');
+ $this->tpl_name = 'ucp_remind';
}
}
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
index 8e27961bca..35cbed1522 100644
--- a/phpBB/includes/ucp/ucp_resend.php
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -13,9 +13,9 @@
* ucp_resend
* Resending activation emails
*/
-class ucp_resend extends module
+class ucp_resend
{
- function ucp_resend($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -143,7 +143,7 @@ class ucp_resend extends module
'EMAIL' => $email)
);
- $this->display($user->lang['UCP_RESEND'], 'ucp_resend.html');
+ $this->tpl_name = 'ucp_resend';
}
}
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index 496b97ece4..908ebaff5a 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -12,9 +12,9 @@
* @package ucp
* ucp_zebra
*/
-class ucp_zebra extends module
+class ucp_zebra
{
- function ucp_zebra($id, $mode)
+ function main($id, $mode)
{
global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
@@ -125,7 +125,7 @@ class ucp_zebra extends module
case 'mssql':
case 'sqlite':
$sql = 'INSERT INTO ' . ZEBRA_TABLE . " (user_id, zebra_id, $sql_mode)
- " . implode(' UNION ALL ', preg_replace('#^([0-9]+)$#', '(' . $user->data['user_id'] . ", \\1, 1)", $user_id_ary));
+ VALUES " . implode(' UNION ALL ', preg_replace('#^([0-9]+)$#', '(' . $user->data['user_id'] . ", \\1, 1)", $user_id_ary));
$db->sql_query($sql);
break;
@@ -201,7 +201,7 @@ class ucp_zebra extends module
'S_UCP_ACTION' => "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode")
);
- $this->display($user->lang['UCP_ZEBRA'], 'ucp_zebra_' . $mode . '.html');
+ $this->tpl_name = 'ucp_zebra_' . $mode;
}
}