aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-10-19 13:57:43 +0200
committerIgor Wiedler <igor@wiedler.ch>2010-10-19 13:57:43 +0200
commit2264f88d8226336584b62d14e36f44b33712ceb0 (patch)
tree9358468470c1c6699859d85f652aedb74c63073d /phpBB
parent6213188280a8a0088fcfacc0f992075f887d3000 (diff)
parent5f0f8c25be2c51b3699768ca7857e477ac68a061 (diff)
downloadforums-2264f88d8226336584b62d14e36f44b33712ceb0.tar
forums-2264f88d8226336584b62d14e36f44b33712ceb0.tar.gz
forums-2264f88d8226336584b62d14e36f44b33712ceb0.tar.bz2
forums-2264f88d8226336584b62d14e36f44b33712ceb0.tar.xz
forums-2264f88d8226336584b62d14e36f44b33712ceb0.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9509] Remove section 8 from index [ticket/9509] Close anchor tag in coding guidelines [ticket/9854] Revise docs/auth_api.html to add more methods [ticket/9509] The VCS is now git [ticket/9840] Display view unread posts link for guests. Conflicts: phpBB/docs/coding-guidelines.html
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/auth_api.html48
-rw-r--r--phpBB/docs/coding-guidelines.html3
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/styles/prosilver/template/index_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html4
5 files changed, 52 insertions, 7 deletions
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index c83aaadc2d..50d73d4485 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -61,6 +61,9 @@
<li><a href="#acl_getf">acl_getf</a></li>
<li><a href="#acl_getf_global">acl_getf_global</a></li>
<li><a href="#acl_cache">acl_cache</a></li>
+ <li><a href="#acl_clear_prefetch">acl_clear_prefetch</a></li>
+ <li><a href="#acl_get_list">acl_get_list</a></li>
+ <li><a href="#misc">Miscellaneous</a></li>
</ol>
</li>
<li><a href="#admin_related">Admin related functions</a></li>
@@ -176,7 +179,7 @@ array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <e
<p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
<div class="codebox"><pre>
-$result = acl_getf_global(<code>option</code>)
+$result = $auth-&gt;acl_getf_global(<code>option</code>)
</pre></div>
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
@@ -187,6 +190,49 @@ $result = acl_getf_global(<code>option</code>)
<p>This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by <code>acl</code>.</p>
+ <a name="acl_clear_prefetch"></a><h3>2.vii. acl_clear_prefetch</h3>
+
+ <p>This method clears the user_permissions column in the users table for the given user. If the user ID passed is zero, the permissions cache is cleared for all users. This method should be called whenever permissions are set.</p>
+
+ <div class="codebox"><pre>
+// clear stored permissions for user 2
+$user_id = 2;
+$auth->acl_clear_prefetch($user_id);
+</pre></div>
+
+ <p>This method returns void.</p>
+
+ <a name="acl_get_list"></a><h3>2.viii. acl_get_list</h3>
+
+ <p>This method returns an an array describing which users have permissions in given fora. The resultant array contains an entry for permission that every user has in every forum when no arguments are passed.</p>
+
+ <div class="codebox"><pre>
+$user_id = array(2, 53);
+$permissions = array('f_list', 'f_read');
+$forum_id = array(1, 2, 3);
+$result = $auth-&gt;acl_get_list($user_id, $permissions, $forum_id);
+</pre></div>
+
+ <p>The parameters may be of the following legal types:</p>
+ <ul>
+ <li><strong>$user_id</strong>: <code>false</code>, int, array(int, int, int, ...)</li>
+ <li><strong>$permissions</strong>: <code>false</code>, string, array(string, string, ...)</li>
+ <li><strong>$forum_id</strong>: <code>false</code>, int, array(int, int, int, ...)</li>
+ </ul>
+
+ <a name="misc"></a><h3>2.ix. Miscellaneous</h3>
+
+ <p>There are other methods defined in the auth class which serve mostly as private methods, but are available for use if needed. Each of them is used to pull data directly from the database tables. They are:</p>
+ <ul>
+ <li><pre>function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false)</pre></li>
+ <li><pre>function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false)</pre></li>
+ <li><pre>function acl_raw_data_single_user($user_id)</pre></li>
+ <li><pre>function acl_raw_data($user_id = false, $opts = false, $forum_id = false)</pre></li>
+ <li><pre>function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)</pre></li>
+ </ul>
+
+ <p>Of these, <code>acl_raw_data</code> is the most general, but the others will be faster if you need a smaller amount of data.</p>
+
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 113910387c..9f95538c84 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -94,7 +94,6 @@
<li><a href="#commitmessage">Commit Messages and Repository Rules</a></li>
</ol>
</li>
- <li><a href="#changes">Guidelines Changelog</a></li>
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ol>
@@ -2447,7 +2446,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<a name="commitmessage"></a><h3>7.ii. Commit Messages and Reposiory Rules</h3>
- <p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</p>.
+ <p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</a></p>.
</div>
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 912d39e0f0..0f150a3d63 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4399,7 +4399,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_ENABLE_FEEDS_TOPICS_ACTIVE' => ($config['feed_topics_active']) ? true : false,
'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false,
- 'S_LOAD_UNREADS' => ($config['load_unreads_search']) ? true : false,
+ 'S_LOAD_UNREADS' => ($config['load_unreads_search'] && ($config['load_anon_lastread'] || $user->data['is_registered'])) ? true : false,
'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme',
'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template',
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index af2077141c..d4d50a11c0 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -6,7 +6,7 @@
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
<ul class="linklist">
<!-- IF S_DISPLAY_SEARCH -->
- <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --><!-- IF S_LOAD_UNREADS --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
+ <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
<!-- ENDIF -->
<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index 37691d4f1c..a8a53abd24 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -201,8 +201,8 @@ function marklist(id, name, state)
<!-- IF S_DISPLAY_SEARCH -->
<p class="searchbar">
<span style="float: {S_CONTENT_FLOW_BEGIN};"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> | <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></span>
- <!-- IF S_USER_LOGGED_IN -->
- <span style="float: {S_CONTENT_FLOW_END};"><!-- IF S_LOAD_UNREADS --><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> | <!-- ENDIF --><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span>
+ <!-- IF S_USER_LOGGED_IN or S_LOAD_UNREADS -->
+ <span style="float: {S_CONTENT_FLOW_END};"><!-- IF S_LOAD_UNREADS --><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- IF S_USER_LOGGED_IN --> | <!-- ENDIF --><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><!-- ENDIF --></span>
<!-- ENDIF -->
</p>
<!-- ENDIF -->