[Customisation Database Commits] r1161 - in /branches/stable: ./ titania/contributions/index.php titania/includes/core/phpbb.php titania/includes/tools/message.php
Nathan Guse
exreaction at phpbb.com
Wed Apr 28 05:14:26 BST 2010
Author: exreaction
Date: Wed Apr 28 05:14:26 2010
New Revision: 1161
Log:
Sleeptime merge
Modified:
branches/stable/ (props changed)
branches/stable/titania/contributions/index.php
branches/stable/titania/includes/core/phpbb.php
branches/stable/titania/includes/tools/message.php
Propchange: branches/stable/
------------------------------------------------------------------------------
*** svn:mergeinfo (original)
--- svn:mergeinfo Wed Apr 28 05:14:26 2010
***************
*** 1 ****
! /trunk:1058,1060,1062-1072,1075-1076,1078,1080-1082,1084-1085,1087-1088,1090,1092-1096,1098,1100-1102,1104-1105,1107,1109-1114,1117,1119,1121,1123-1125,1127-1134,1136,1138,1141,1143-1144,1148-1150,1152-1154,1157
--- 1 ----
! /trunk:1058,1060,1062-1072,1075-1076,1078,1080-1082,1084-1085,1087-1088,1090,1092-1096,1098,1100-1102,1104-1105,1107,1109-1114,1117,1119,1121,1123-1125,1127-1134,1136,1138,1141,1143-1144,1148-1150,1152-1154,1157,1159-1160
Modified: branches/stable/titania/contributions/index.php
==============================================================================
*** branches/stable/titania/contributions/index.php (original)
--- branches/stable/titania/contributions/index.php Wed Apr 28 05:14:26 2010
***************
*** 103,108 ****
--- 103,118 ----
}
}
+ // Hide the FAQ tab if no FAQ entries for public
+ if (titania::$access_level == TITANIA_ACCESS_PUBLIC)
+ {
+ $sql = 'SELECT COUNT(faq_id) AS cnt FROM ' . TITANIA_CONTRIB_FAQ_TABLE . '
+ WHERE contrib_id = ' . titania::$contrib->contrib_id;
+ phpbb::$db->sql_query($sql);
+ $faq_count = phpbb::$db->sql_fetchfield('cnt');
+ phpbb::$db->sql_freeresult();
+ }
+
/**
* Menu Array
*
***************
*** 120,125 ****
--- 130,136 ----
'faq' => array(
'title' => 'CONTRIB_FAQ',
'url' => titania::$contrib->get_url('faq'),
+ 'auth' => (titania::$access_level != TITANIA_ACCESS_PUBLIC || $faq_count) ? true : false,
),
'support' => array(
'title' => 'CONTRIB_SUPPORT',
Modified: branches/stable/titania/includes/core/phpbb.php
==============================================================================
*** branches/stable/titania/includes/core/phpbb.php (original)
--- branches/stable/titania/includes/core/phpbb.php Wed Apr 28 05:14:26 2010
***************
*** 26,31 ****
--- 26,32 ----
public static $config;
public static $db;
public static $template;
+ public static $theme_data; //self::$theme_data
public static $user;
/**
***************
*** 49,54 ****
--- 50,57 ----
self::$auth->acl(self::$user->data);
self::$user->setup();
}
+
+ self::$theme_data = self::$user->theme;
}
/**
***************
*** 99,104 ****
--- 102,116 ----
}
/**
+ * Reset the template/theme data to the phpBB information
+ */
+ public static function reset_template()
+ {
+ self::$user->theme = self::$theme_data;
+ self::$template->set_template();
+ }
+
+ /**
* Page header function for phpBB stuff
*
* @param <string> $page_title
Modified: branches/stable/titania/includes/tools/message.php
==============================================================================
*** branches/stable/titania/includes/tools/message.php (original)
--- branches/stable/titania/includes/tools/message.php Wed Apr 28 05:14:26 2010
***************
*** 204,211 ****
if ($captcha->validate($this->request_data()) !== false)
{
// Parse the captcha template
- phpbb::$template->set_template();
phpbb::$template->set_filenames(array(
'captcha' => $captcha->get_template(),
));
--- 204,212 ----
if ($captcha->validate($this->request_data()) !== false)
{
+ phpbb::reset_template();
+
// Parse the captcha template
phpbb::$template->set_filenames(array(
'captcha' => $captcha->get_template(),
));
More information about the customisationdb-commits
mailing list