aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-11-08 19:24:19 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-11-08 19:24:19 +0000
commit8a965db7aa17af5db4ea6ab7c970cb2a5d21bc86 (patch)
tree69e99e4a509fc5ae5f6b7a3f1f4e4a4d3a7069d1 /phpBB
parent183e968ce72ff30fc43914738fcdb6e1eb90705e (diff)
downloadforums-8a965db7aa17af5db4ea6ab7c970cb2a5d21bc86.tar
forums-8a965db7aa17af5db4ea6ab7c970cb2a5d21bc86.tar.gz
forums-8a965db7aa17af5db4ea6ab7c970cb2a5d21bc86.tar.bz2
forums-8a965db7aa17af5db4ea6ab7c970cb2a5d21bc86.tar.xz
forums-8a965db7aa17af5db4ea6ab7c970cb2a5d21bc86.zip
- add module_display to modules table (for modes executed but not displayed)
- correctly assign $id variable for modules (name for modules and id for categories) git-svn-id: file:///svn/phpbb/trunk@5295 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_module.php14
-rw-r--r--phpBB/install/schemas/firebird_schema.sql1
-rw-r--r--phpBB/install/schemas/mssql_schema.sql5
-rw-r--r--phpBB/install/schemas/mysql_schema.sql1
-rw-r--r--phpBB/install/schemas/oracle_schema.sql1
-rw-r--r--phpBB/install/schemas/postgres_schema.sql3
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql1
-rw-r--r--phpBB/language/en/ucp.php2
8 files changed, 24 insertions, 4 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index e88a506121..bd611235b1 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -154,6 +154,7 @@ class p_master
'name' => (string) $row['module_name'],
'mode' => (string) $row['module_mode'],
+ 'display' => (int) $row['module_display'],
'lang' => (function_exists($row['module_name'])) ? $row['module_name']($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']),
'langname' => $row['module_langname'],
@@ -242,7 +243,7 @@ class p_master
// Execute the main method for the new instance, we send the module
// id and mode as parameters
- $this->module->main($this->p_id, $this->p_mode);
+ $this->module->main(($this->p_name) ? $this->p_name : $this->p_id, $this->p_mode);
return;
}
@@ -288,6 +289,11 @@ class p_master
// and a linear list for subcategories/items
foreach ($this->module_ary as $row_id => $itep_ary)
{
+ if (!$itep_ary['display'])
+ {
+ continue;
+ }
+
$depth = $itep_ary['depth'];
if ($depth > $current_depth)
@@ -304,6 +310,8 @@ class p_master
}
}
+ $u_title = $module_url . '&amp;i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&amp;mode=' . $itep_ary['mode']);
+
// Only output a categories items if it's currently selected
if (!$depth || ($depth && (in_array($itep_ary['parent'], array_values($this->module_cache['parents'])) || $itep_ary['parent'] == $this->p_parent)))
{
@@ -312,7 +320,7 @@ class p_master
$tpl_ary = array(
'L_TITLE' => $itep_ary['lang'],
'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false,
- 'U_TITLE' => $module_url . '&amp;i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&amp;mode=' . $itep_ary['mode'])
+ 'U_TITLE' => $u_title
);
$template->assign_block_vars($use_tabular_offset, array_merge($tpl_ary, array_change_key_case($itep_ary, CASE_UPPER)));
@@ -321,7 +329,7 @@ class p_master
$tpl_ary = array(
'L_TITLE' => $itep_ary['lang'],
'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false,
- 'U_TITLE' => $module_url . '&amp;i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&amp;mode=' . $itep_ary['mode'])
+ 'U_TITLE' => $u_title
);
$template->assign_block_vars($linear_offset, array_merge($tpl_ary, array_change_key_case($itep_ary, CASE_UPPER)));
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 74e5dbef8f..04e86d0035 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -284,6 +284,7 @@ CREATE TABLE phpbb_moderator_cache (
CREATE TABLE phpbb_modules (
module_id INTEGER NOT NULL,
module_enabled INTEGER DEFAULT 1 NOT NULL,
+ module_display INTEGER DEFAULT 1 NOT NULL,
module_name VARCHAR(20) NOT NULL,
module_class VARCHAR(4) NOT NULL,
parent_id INTEGER NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 74a8b3be0c..6308ddb60a 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -289,6 +289,7 @@ GO
CREATE TABLE [phpbb_modules] (
[module_id] [int] IDENTITY (1, 1) NOT NULL ,
[module_enabled] [int] NOT NULL ,
+ [module_display] [int] NOT NULL ,
[module_name] [varchar] (20) NOT NULL ,
[module_class] [varchar] (4) NOT NULL ,
[parent_id] [int] NOT NULL ,
@@ -1343,6 +1344,10 @@ ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
CONSTRAINT [DF_module_module_enabled] DEFAULT (1) FOR [module_enabled]
GO
+ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
+ CONSTRAINT [DF_module_module_display] DEFAULT (1) FOR [module_display]
+GO
+
ALTER TABLE [phpbb_poll_results] WITH NOCHECK ADD
CONSTRAINT [DF_poll_r_poll_option_id] DEFAULT (0) FOR [poll_option_id],
CONSTRAINT [DF_poll_r_topic_id] DEFAULT (0) FOR [topic_id],
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql
index f7e5fea293..fa8702dbf7 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_schema.sql
@@ -334,6 +334,7 @@ CREATE TABLE phpbb_moderator_cache (
CREATE TABLE phpbb_modules (
module_id smallint(5) unsigned NOT NULL auto_increment,
module_enabled tinyint(1) NOT NULL default '1',
+ module_display tinyint(1) NOT NULL default '1',
module_name varchar(20) NOT NULL default '',
module_class varchar(4) NOT NULL default '',
parent_id smallint(5) unsigned NOT NULL default '0',
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 5b9f14baea..2e281a3d65 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -700,6 +700,7 @@ CREATE INDEX forum_id03 on phpbb_moderator_cache (forum_id)
CREATE TABLE phpbb_modules (
module_id number(8) NOT NULL,
module_enabled number(1) DEFAULT '1' NOT NULL,
+ module_display number(1) DEFAULT '1' NOT NULL,
module_name varchar2(20) DEFAULT '' NOT NULL,
module_class varchar2(4) DEFAULT '' NOT NULL,
parent_id number(5) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 805001e2fc..7dc0e2bbd6 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -457,7 +457,8 @@ CREATE SEQUENCE phpbb_modules_module_id_seq;
CREATE TABLE phpbb_modules (
module_id INT4 DEFAULT nextval('phpbb_modules_module_id_seq'),
- module_enabled INT2 DEFAULT '1' NOT NULL,
+ module_enabled INT2 DEFAULT '1' NOT NULL,
+ module_display INT2 DEFAULT '1' NOT NULL,
module_name varchar(20) DEFAULT '' NOT NULL,
module_class varchar(4) DEFAULT '' NOT NULL,
parent_id INT4 DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 320d86d8f3..128605bcc9 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -335,6 +335,7 @@ CREATE INDEX forum_id_phpbb_moderator_cache on phpbb_moderator_cache (forum_id);
CREATE TABLE phpbb_modules (
module_id INTEGER PRIMARY KEY NOT NULL,
module_enabled tinyint(1) NOT NULL DEFAULT '1',
+ module_display tinyint(1) NOT NULL DEFAULT '1',
module_name varchar(20) NOT NULL DEFAULT '',
module_class varchar(4) NOT NULL DEFAULT '',
parent_id smallint(5) NOT NULL DEFAULT '0',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 430b499937..3849a718c5 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -264,6 +264,7 @@ $lang += array(
'POST_FORWARD_PM' => 'Forward message',
'POST_NEW_PM' => 'Post message',
'POST_PM_LOCKED' => 'Private Messaging is locked',
+ 'POST_PM_POST' => 'Quote post',
'POST_QUOTE_PM' => 'Quote message',
'POST_REPLY_PM' => 'Reply to message',
'PRINT_PM' => 'Print View',
@@ -344,6 +345,7 @@ $lang += array(
'UCP_PM_DRAFTS' => 'PM Drafts',
'UCP_PM_OPTIONS' => 'Options',
'UCP_PM_POPUP' => 'Private Messages',
+ 'UCP_PM_POPUP_TITLE' => 'Private Message Popup',
'UCP_PM_UNREAD' => 'Unread Messages',
'UCP_PM_VIEW' => 'View Messages',