mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into develop
This commit is contained in:
commit
46b3c3ecc4
54 changed files with 2298 additions and 1864 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.0.11" />
|
||||
<property name="prevversion" value="3.0.10" />
|
||||
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.11-RC1, 3.0.11-RC2" />
|
||||
<property name="newversion" value="3.1.0-dev" />
|
||||
<property name="prevversion" value="3.0.11" />
|
||||
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.10" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
|
|
|
@ -241,6 +241,7 @@
|
|||
<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}{L_COLON}</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_normal_settings_append -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
|
|
@ -76,6 +76,8 @@
|
|||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT acp_main_notice_after -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
|
@ -202,6 +204,8 @@
|
|||
<dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
|
||||
</dl>
|
||||
</form>
|
||||
|
||||
<!-- EVENT acp_main_actions_append -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}{L_COLON}</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="password_confirm" name="password_confirm" value="" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_users_overview_options_append -->
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
|
|
|
@ -42,5 +42,7 @@
|
|||
<!-- INCLUDEJS ajax.js -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT acp_overall_footer_after -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -155,6 +155,7 @@ function switch_menu()
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- EVENT acp_overall_header_head_append -->
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION}">
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||
<!-- EVENT acp_simple_footer_after -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -101,6 +101,7 @@ function find_username(url)
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- EVENT acp_simple_header_head_append -->
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION}">
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#templates">General Templating</a></li>
|
||||
<li><a href="#stylestree">Styles Tree</a></li>
|
||||
<li><a href="#template-events">Template Events</a></li>
|
||||
</ol></li>
|
||||
<li><a href="#charsets">Character Sets and Encodings</a></li>
|
||||
<li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a>
|
||||
|
@ -1678,6 +1679,57 @@ version = 3.1.0
|
|||
parent = prosilver
|
||||
</pre></div>
|
||||
|
||||
<a name="template-events"></a><h3>4.iii. Template Events</h3>
|
||||
<p>Template events must follow this format: <code><!-- EVENT event_name --></code></p>
|
||||
<p>Using the above example, files named <code>event_name.html</code> located within extensions will be injected into the location of the event.</p>
|
||||
|
||||
<h4>Template event naming guidelines:</h4>
|
||||
<ul>
|
||||
<li>An event name must be all lowercase, with each word separated by an underscore.</li>
|
||||
<li>An event name must briefly describe the location and purpose of the event.</li>
|
||||
<li>An event name must end with one of the following suffixes:</li>
|
||||
<ul>
|
||||
<li><code>_prepend</code> - This event adds an item to the beginning of a block of related items, or adds to the beginning of individual items in a block.</li>
|
||||
<li><code>_append</code> - This event adds an item to the end of a block of related items, or adds to the end of individual items in a block.</li>
|
||||
<li><code>_before</code> - This event adds content directly before the specified block</li>
|
||||
<li><code>_after</code> - This event adds content directly after the specified block</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h4>Template event documentation</h4>
|
||||
<p>Events must be documented in <code>phpBB/docs/events.md</code> in alphabetical order based on the event name. The format is as follows:</p>
|
||||
|
||||
<ul><li>An event found in only one template file:
|
||||
<div class="codebox"><pre>event_name
|
||||
===
|
||||
* Location: styles/<style_name>/template/filename.html
|
||||
* Purpose: A brief description of what this event should be used for.
|
||||
This may span multiple lines.
|
||||
</pre></div></li>
|
||||
<li>An event found in multiple template files:
|
||||
<div class="codebox"><pre>event_name
|
||||
===
|
||||
* Locations:
|
||||
+ first/file/path.html
|
||||
+ second/file/path.html
|
||||
* Purpose: Same as above.
|
||||
</pre></div>
|
||||
<li>An event that is found multiple times in a file should have the number of instances in parenthesis next to the filename.
|
||||
<div class="codebox"><pre>event_name
|
||||
===
|
||||
* Locations:
|
||||
+ first/file/path.html (2)
|
||||
+ second/file/path.html
|
||||
* Purpose: Same as above.
|
||||
</pre></div></li>
|
||||
<li>An actual example event documentation:
|
||||
<div class="codebox"><pre>forumlist_body_last_post_title_prepend
|
||||
====
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Purpose: Add content before the post title of the latest post in a forum on the forum list.</pre></div></ul><br />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
|
132
phpBB/docs/events.md
Normal file
132
phpBB/docs/events.md
Normal file
|
@ -0,0 +1,132 @@
|
|||
acp_forums_normal_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Purpose: Add settings to forums
|
||||
|
||||
acp_main_actions_append
|
||||
===
|
||||
* Location: adm/style/acp_main.html
|
||||
* Purpose: Add actions to the ACP main page below the cache purge action
|
||||
|
||||
acp_main_notice_after
|
||||
===
|
||||
* Location: adm/style/acp_main.html
|
||||
* Purpose: Add notices or other blocks in the ACP below other configuration notices
|
||||
|
||||
acp_overall_footer_after
|
||||
===
|
||||
* Location: adm/style/overall_footer.html
|
||||
* Purpose: Add content below the footer in the ACP
|
||||
|
||||
acp_overall_header_head_append
|
||||
===
|
||||
* Location: adm/style/overall_header.html
|
||||
* Add assets within the `<head>` tags in the ACP
|
||||
|
||||
acp_simple_footer_after
|
||||
===
|
||||
* Location: adm/style/simple_footer.html
|
||||
* Purpose: Add content below the simple footer in the ACP
|
||||
|
||||
acp_simple_header_head_append
|
||||
===
|
||||
* Location: adm/style/overall_header.html
|
||||
* Add assets within the `<head>` tags in the simple header of the ACP
|
||||
|
||||
acp_users_overview_options_append
|
||||
===
|
||||
* Location: adm/style/acp_users.html
|
||||
* Purpose: Add options and settings on user overview page
|
||||
|
||||
forumlist_body_last_post_title_prepend
|
||||
====
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Purpose: Add content before the post title of the latest post in a forum on the forum list.
|
||||
|
||||
index_body_stat_blocks_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
+ styles/subsilver2/template/index_body.html
|
||||
* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks
|
||||
|
||||
overall_footer_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
|
||||
|
||||
overall_footer_breadcrumb_append
|
||||
===
|
||||
* Location: styles/prosilver/template/overall_footer.html
|
||||
* Purpose: Add links to the list of breadcrumbs in the footer
|
||||
|
||||
overall_footer_copyright_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Purpose: Add content after the copyright line (no new line by default), before the ACP link
|
||||
|
||||
overall_footer_copyright_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Purpose: Add content before the copyright line
|
||||
|
||||
overall_header_breadcrumb_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/breadcrumbs.html
|
||||
* Purpose: Add links to the list of breadcrumbs in the header
|
||||
|
||||
overall_header_head_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/overall_header.html
|
||||
* Purpose: Add asset calls directly before the `</head>` tag
|
||||
|
||||
overall_header_navigation_append
|
||||
===
|
||||
* Location: styles/prosilver/template/overall_header.html
|
||||
* Purpose: Add links after the navigation links in the header
|
||||
|
||||
overall_header_navigation_prepend
|
||||
===
|
||||
* Location: styles/prosilver/template/overall_header.html
|
||||
* Purpose: Add links before the navigation links in the header
|
||||
|
||||
posting_editor_options_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/prosilver/template/posting_body.html
|
||||
* Purpose: Add posting options on the posting screen
|
||||
|
||||
simple_footer_after
|
||||
===
|
||||
* Location: styles/prosilver/template/simple_footer.html
|
||||
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
|
||||
|
||||
ucp_pm_viewmessage_print_head_append
|
||||
===
|
||||
* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
|
||||
|
||||
viewtopic_print_head_append
|
||||
===
|
||||
* Location: styles/prosilver/template/viewtopic_print.html
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
|
||||
|
||||
viewtopic_topic_title_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Purpose: Add content directly before the topic title link on the View topic screen
|
|
@ -10,21 +10,36 @@ source source_phpbb_{SPHINX_ID}_main
|
|||
sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = MAX(post_id) WHERE counter_id = 1
|
||||
sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts
|
||||
sql_range_step = 5000
|
||||
sql_query = SELECT
\
|
||||
p.post_id AS id,
\
|
||||
p.forum_id,
\
|
||||
p.topic_id,
\
|
||||
p.poster_id,
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
\
|
||||
p.post_time,
\
|
||||
p.post_subject,
\
|
||||
p.post_subject as title,
\
|
||||
p.post_text as data,
\
|
||||
t.topic_last_post_time,
\
|
||||
0 as deleted
\
|
||||
FROM phpbb_posts p, phpbb_topics t
\
|
||||
WHERE
\
|
||||
p.topic_id = t.topic_id
\
|
||||
sql_query = SELECT
|
||||
\
|
||||
p.post_id AS id,
|
||||
\
|
||||
p.forum_id,
|
||||
\
|
||||
p.topic_id,
|
||||
\
|
||||
p.poster_id,
|
||||
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
|
||||
\
|
||||
p.post_time,
|
||||
\
|
||||
p.post_subject,
|
||||
\
|
||||
p.post_subject as title,
|
||||
\
|
||||
p.post_text as data,
|
||||
\
|
||||
t.topic_last_post_time,
|
||||
\
|
||||
0 as deleted
|
||||
\
|
||||
FROM phpbb_posts p, phpbb_topics t
|
||||
\
|
||||
WHERE
|
||||
\
|
||||
p.topic_id = t.topic_id
|
||||
\
|
||||
AND p.post_id >= $start AND p.post_id <= $end
|
||||
sql_query_post =
|
||||
sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
|
||||
|
@ -42,21 +57,36 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
|
|||
{
|
||||
sql_query_range =
|
||||
sql_range_step =
|
||||
sql_query = SELECT
\
|
||||
p.post_id AS id,
\
|
||||
p.forum_id,
\
|
||||
p.topic_id,
\
|
||||
p.poster_id,
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
\
|
||||
p.post_time,
\
|
||||
p.post_subject,
\
|
||||
p.post_subject as title,
\
|
||||
p.post_text as data,
\
|
||||
t.topic_last_post_time,
\
|
||||
0 as deleted
\
|
||||
FROM phpbb_posts p, phpbb_topics t
\
|
||||
WHERE
\
|
||||
p.topic_id = t.topic_id
\
|
||||
sql_query = SELECT
|
||||
\
|
||||
p.post_id AS id,
|
||||
\
|
||||
p.forum_id,
|
||||
\
|
||||
p.topic_id,
|
||||
\
|
||||
p.poster_id,
|
||||
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
|
||||
\
|
||||
p.post_time,
|
||||
\
|
||||
p.post_subject,
|
||||
\
|
||||
p.post_subject as title,
|
||||
\
|
||||
p.post_text as data,
|
||||
\
|
||||
t.topic_last_post_time,
|
||||
\
|
||||
0 as deleted
|
||||
\
|
||||
FROM phpbb_posts p, phpbb_topics t
|
||||
\
|
||||
WHERE
|
||||
\
|
||||
p.topic_id = t.topic_id
|
||||
\
|
||||
AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 )
|
||||
sql_query_pre =
|
||||
}
|
||||
|
|
6
phpBB/includes/cache/driver/file.php
vendored
6
phpBB/includes/cache/driver/file.php
vendored
|
@ -367,12 +367,10 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
|||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save($query, $query_result, $ttl)
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
|
||||
|
|
3
phpBB/includes/cache/driver/interface.php
vendored
3
phpBB/includes/cache/driver/interface.php
vendored
|
@ -85,6 +85,7 @@ interface phpbb_cache_driver_interface
|
|||
* result to persistent storage. In other words, there is no need
|
||||
* to call save() afterwards.
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param string $query SQL query, should be used for generating storage key
|
||||
* @param mixed $query_result The result from dbal::sql_query, to be passed to
|
||||
* dbal::sql_fetchrow to get all rows and store them
|
||||
|
@ -95,7 +96,7 @@ interface phpbb_cache_driver_interface
|
|||
* representing the query should be returned. Otherwise
|
||||
* the original $query_result should be returned.
|
||||
*/
|
||||
public function sql_save($query, $query_result, $ttl);
|
||||
public function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl);
|
||||
|
||||
/**
|
||||
* Check if result for a given SQL query exists in cache.
|
||||
|
|
6
phpBB/includes/cache/driver/memory.php
vendored
6
phpBB/includes/cache/driver/memory.php
vendored
|
@ -283,12 +283,10 @@ abstract class phpbb_cache_driver_memory extends phpbb_cache_driver_base
|
|||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save($query, $query_result, $ttl)
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
$hash = md5($query);
|
||||
|
|
4
phpBB/includes/cache/driver/null.php
vendored
4
phpBB/includes/cache/driver/null.php
vendored
|
@ -105,9 +105,9 @@ class phpbb_cache_driver_null extends phpbb_cache_driver_base
|
|||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save($query, $query_result, $ttl)
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
return $query_result;
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ class phpbb_db_driver_firebird extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -168,7 +168,7 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -197,7 +197,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -337,7 +337,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -206,7 +206,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -201,7 +201,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver
|
|||
|
||||
if ($cache_ttl)
|
||||
{
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
}
|
||||
else if (defined('DEBUG'))
|
||||
|
|
|
@ -446,7 +446,7 @@ class phpbb_db_driver_oracle extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -211,7 +211,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -152,7 +152,7 @@ class phpbb_db_driver_sqlite extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -61,6 +61,20 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
{
|
||||
markread('all', false, false, request_var('mark_time', 0));
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// Tell the ajax script what language vars and URL need to be replaced
|
||||
$data = array(
|
||||
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
|
||||
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
||||
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
|
||||
);
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send($data);
|
||||
}
|
||||
|
||||
trigger_error(
|
||||
$user->lang['FORUMS_MARKED'] . '<br /><br />' .
|
||||
sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>')
|
||||
|
@ -313,6 +327,20 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
$message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
|
||||
meta_refresh(3, $redirect);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// Tell the ajax script what language vars and URL need to be replaced
|
||||
$data = array(
|
||||
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
|
||||
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
||||
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
|
||||
);
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send($data);
|
||||
}
|
||||
|
||||
trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1695,8 +1695,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
// The variable name should be $post_approved, because it indicates if the post is approved or not
|
||||
$post_approval = 1;
|
||||
|
||||
// Check the permissions for post approval. Moderators are not affected.
|
||||
if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']))
|
||||
// Check the permissions for post approval.
|
||||
// Moderators must go through post approval like ordinary users.
|
||||
if (!$auth->acl_get('f_noapprove', $data['forum_id']))
|
||||
{
|
||||
// Post not approved, but in queue
|
||||
$post_approval = 0;
|
||||
|
|
|
@ -1210,7 +1210,7 @@ function database_update_info()
|
|||
*****************************************************************************/
|
||||
function change_database_data(&$no_updates, $version)
|
||||
{
|
||||
global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $db_tools;
|
||||
global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx;
|
||||
|
||||
$update_helpers = new phpbb_update_helpers();
|
||||
|
||||
|
@ -1527,8 +1527,6 @@ function change_database_data(&$no_updates, $version)
|
|||
),
|
||||
);
|
||||
|
||||
global $db_tools;
|
||||
|
||||
$statements = $db_tools->perform_schema_changes($changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
|
@ -2170,26 +2168,41 @@ function change_database_data(&$no_updates, $version)
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
global $db_tools, $table_prefix;
|
||||
|
||||
// Recover from potentially broken Q&A CAPTCHA table on firebird
|
||||
// Q&A CAPTCHA was uninstallable, so it's safe to remove these
|
||||
// without data loss
|
||||
/*
|
||||
* Due to a bug, vanilla phpbb could not create captcha tables
|
||||
* in 3.0.8 on firebird. It was possible for board administrators
|
||||
* to adjust the code to work. If code was manually adjusted by
|
||||
* board administrators, index names would not be the same as
|
||||
* what 3.0.9 and newer expect. This code fragment drops captcha
|
||||
* tables, destroying all entered Q&A captcha configuration, such
|
||||
* that when Q&A is configured next the respective tables will be
|
||||
* created with correct index names.
|
||||
*
|
||||
* If you wish to preserve your Q&A captcha configuration, you can
|
||||
* manually rename indexes to the currently expected name:
|
||||
* phpbb_captcha_questions_lang_iso => phpbb_captcha_questions_lang
|
||||
* phpbb_captcha_answers_question_id => phpbb_captcha_answers_qid
|
||||
*
|
||||
* Again, this needs to be done only if a board was manually modified
|
||||
* to fix broken captcha code.
|
||||
*
|
||||
if ($db_tools->sql_layer == 'firebird')
|
||||
{
|
||||
$tables = array(
|
||||
$changes = array(
|
||||
'drop_tables' => array(
|
||||
$table_prefix . 'captcha_questions',
|
||||
$table_prefix . 'captcha_answers',
|
||||
$table_prefix . 'qa_confirm',
|
||||
),
|
||||
);
|
||||
foreach ($tables as $table)
|
||||
$statements = $db_tools->perform_schema_changes($changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
{
|
||||
if ($db_tools->sql_table_exists($table))
|
||||
{
|
||||
$db_tools->sql_table_drop($table);
|
||||
}
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
|
@ -2885,7 +2898,11 @@ function change_database_data(&$no_updates, $version)
|
|||
set_config('board_timezone', $update_helpers->convert_phpbb30_timezone($config['board_timezone'], $config['board_dst']));
|
||||
|
||||
// After we have calculated the timezones we can delete user_dst column from user table.
|
||||
$db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
|
||||
$statements = $db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
|
||||
foreach ($statements as $sql)
|
||||
{
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($config['site_home_url']))
|
||||
|
|
|
@ -1116,8 +1116,9 @@ if ($submit || $preview || $refresh)
|
|||
$captcha->reset();
|
||||
}
|
||||
|
||||
// Check the permissions for post approval. Moderators are not affected.
|
||||
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))
|
||||
// Check the permissions for post approval.
|
||||
// Moderators must go through post approval like ordinary users.
|
||||
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))
|
||||
{
|
||||
meta_refresh(10, $redirect_url);
|
||||
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
|
||||
|
|
|
@ -2,6 +2,94 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Close popup alert after a specified delay
|
||||
*
|
||||
* @param int Delay in ms until darkenwrapper's click event is triggered
|
||||
*/
|
||||
phpbb.closeDarkenWrapper = function(delay) {
|
||||
setTimeout(function() {
|
||||
$('#darkenwrapper').trigger('click');
|
||||
}, delay);
|
||||
};
|
||||
|
||||
// This callback will mark all forum icons read
|
||||
phpbb.add_ajax_callback('mark_forums_read', function(res) {
|
||||
var readTitle = res.NO_UNREAD_POSTS;
|
||||
var unreadTitle = res.UNREAD_POSTS;
|
||||
var iconsArray = {
|
||||
'forum_unread': 'forum_read',
|
||||
'forum_unread_subforum': 'forum_read_subforum',
|
||||
'forum_unread_locked': 'forum_read_locked',
|
||||
};
|
||||
|
||||
$('li.row').find('dl[class*="forum_unread"]').each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
$.each(iconsArray, function(unreadClass, readClass) {
|
||||
if ($this.hasClass(unreadClass)) {
|
||||
$this.removeClass(unreadClass).addClass(readClass);
|
||||
}
|
||||
});
|
||||
$this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle);
|
||||
});
|
||||
|
||||
// Mark subforums read
|
||||
$('a.subforum[class*="unread"]').removeClass('unread').addClass('read');
|
||||
|
||||
// Update mark forums read links
|
||||
$('[data-ajax="mark_forums_read"]').attr('href', res.U_MARK_FORUMS);
|
||||
|
||||
phpbb.closeDarkenWrapper(3000);
|
||||
});
|
||||
|
||||
// This callback will mark all topic icons read
|
||||
phpbb.add_ajax_callback('mark_topics_read', function(res) {
|
||||
var readTitle = res.NO_UNREAD_POSTS;
|
||||
var unreadTitle = res.UNREAD_POSTS;
|
||||
var iconsArray = {
|
||||
'global_unread': 'global_read',
|
||||
'announce_unread': 'announce_read',
|
||||
'sticky_unread': 'sticky_read',
|
||||
'topic_unread': 'topic_read'
|
||||
};
|
||||
var iconsState = ['', '_hot', '_hot_mine', '_locked', '_locked_mine', '_mine'];
|
||||
var unreadClassSelectors = '';
|
||||
var classMap = {};
|
||||
var classNames = [];
|
||||
|
||||
$.each(iconsArray, function(unreadClass, readClass) {
|
||||
$.each(iconsState, function(key, value) {
|
||||
// Only topics can be hot
|
||||
if ((value == '_hot' || value == '_hot_mine') && unreadClass != 'topic_unread') {
|
||||
return true;
|
||||
}
|
||||
classMap[unreadClass + value] = readClass + value;
|
||||
classNames.push(unreadClass + value);
|
||||
});
|
||||
});
|
||||
|
||||
unreadClassSelectors = '.' + classNames.join(',.');
|
||||
|
||||
$('li.row').find(unreadClassSelectors).each(function() {
|
||||
var $this = $(this);
|
||||
$.each(classMap, function(unreadClass, readClass) {
|
||||
if ($this.hasClass(unreadClass)) {
|
||||
$this.removeClass(unreadClass).addClass(readClass);
|
||||
}
|
||||
});
|
||||
$this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle);
|
||||
});
|
||||
|
||||
// Remove link to first unread post
|
||||
$('a').has('span.icon_topic_newest').remove();
|
||||
|
||||
// Update mark topics read links
|
||||
$('[data-ajax="mark_topics_read"]').attr('href', res.U_MARK_TOPICS);
|
||||
|
||||
phpbb.closeDarkenWrapper(3000);
|
||||
});
|
||||
|
||||
// This callback finds the post from the delete link, and removes it.
|
||||
phpbb.add_ajax_callback('post_delete', function() {
|
||||
var el = $(this),
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
|
||||
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||
<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
|
||||
<!-- ENDIF -->
|
||||
{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!-- IF S_DISPLAY_SEARCH -->
|
||||
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> • <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> • <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> • <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" data-ajax="true">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
|||
</form>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT index_body_stat_blocks_before -->
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
|
||||
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<div class="inner">
|
||||
|
||||
<ul class="linklist">
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></li>
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>
|
||||
<!-- EVENT overall_footer_breadcrumb_append --></li>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF U_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="<!-- IF not S_WATCHING_TOPIC -->icon-unsubscribe<!-- ELSE -->icon-subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">{S_WATCH_TOPIC_TITLE}</a></li><!-- ENDIF -->
|
||||
|
@ -19,8 +20,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="copyright">{CREDIT_LINE}
|
||||
<div class="copyright">
|
||||
<!-- EVENT overall_footer_copyright_prepend -->
|
||||
{CREDIT_LINE}
|
||||
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
|
||||
<!-- EVENT overall_footer_copyright_append -->
|
||||
<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
|
||||
<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
|
||||
</div>
|
||||
|
@ -55,5 +59,6 @@
|
|||
<!-- INCLUDEJS template/ajax.js -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT overall_footer_after -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -84,8 +84,9 @@
|
|||
<link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<!-- EVENT overall_header_head_append -->
|
||||
|
||||
</head>
|
||||
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
|
||||
|
||||
<div id="wrap">
|
||||
|
@ -121,7 +122,11 @@
|
|||
|
||||
<ul class="linklist navlinks">
|
||||
<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF -->
|
||||
<a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a>
|
||||
<!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks -->
|
||||
<!-- EVENT overall_header_breadcrumb_append -->
|
||||
</li>
|
||||
|
||||
<!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
|
||||
|
@ -145,12 +150,14 @@
|
|||
<!-- ENDIF -->
|
||||
|
||||
<ul class="linklist rightside">
|
||||
<!-- EVENT overall_header_navigation_prepend -->
|
||||
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
|
||||
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
|
||||
<li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT overall_header_navigation_append -->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -213,6 +213,7 @@
|
|||
<div class="inner">
|
||||
|
||||
<fieldset class="fields1">
|
||||
<!-- EVENT posting_editor_options_prepend -->
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT simple_footer_after -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<title>{SITENAME} • {PAGE_TITLE}</title>
|
||||
|
||||
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
|
||||
<!-- EVENT ucp_pm_viewmessage_print_head_append -->
|
||||
</head>
|
||||
|
||||
<body id="phpbb">
|
||||
<div id="wrap">
|
||||
<a id="top" accesskey="t"></a>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<!-- IF S_HAS_SUBFORUM -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
|
||||
<ul class="linklist">
|
||||
<li class="rightside"><a href="{U_MARK_FORUMS}">{L_MARK_SUBFORUMS_READ}</a></li>
|
||||
<li class="rightside"><a href="{U_MARK_FORUMS}" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_SUBFORUMS_READ}</a></li>
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDE forumlist_body.html -->
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
<!-- IF .pagination or TOTAL_POSTS or TOTAL_TOPICS -->
|
||||
<div class="pagination">
|
||||
<!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="true">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="mark_topics_read" data-overlay="false">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_TOPICS -->{TOTAL_TOPICS} • <!-- ENDIF -->
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
|
@ -211,7 +211,7 @@
|
|||
|
||||
<!-- IF PAGE_NUMBER or TOTAL_POSTS or TOTAL_TOPICS -->
|
||||
<div class="pagination">
|
||||
<!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read" data-overlay="false">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS} • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_USERS -->{TOTAL_USERS} • <!-- ENDIF -->
|
||||
<!-- IF .pagination -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- IF U_MCP --><p>[ <a href="{U_MCP}">{L_MCP}</a> ]</p><!-- ENDIF -->
|
||||
<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
|
||||
<h2><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
|
||||
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
|
||||
<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<title>{SITENAME} • {PAGE_TITLE}</title>
|
||||
|
||||
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
|
||||
<!-- EVENT viewtopic_print_head_append -->
|
||||
</head>
|
||||
|
||||
<body id="phpbb">
|
||||
<div id="wrap">
|
||||
<a id="top" accesskey="t"></a>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;">
|
||||
<tr>
|
||||
<td class="row1">
|
||||
<p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>»</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks --></p>
|
||||
<p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>»</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks -->
|
||||
<!-- EVENT overall_header_breadcrumb_append --></p>
|
||||
<p class="datetime">{S_TIMEZONE}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<td class="row2" align="center" nowrap="nowrap">
|
||||
<!-- IF forumrow.LAST_POST_TIME -->
|
||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||
<p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a></p>
|
||||
<!-- ENDIF -->
|
||||
<p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a> <!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
<!-- INCLUDE breadcrumbs.html -->
|
||||
|
||||
<!-- EVENT index_body_stat_blocks_before -->
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<br clear="all" />
|
||||
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
|
||||
<div id="wrapfooter">
|
||||
<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
|
||||
<span class="copyright">{CREDIT_LINE}
|
||||
<span class="copyright">
|
||||
<!-- EVENT overall_footer_copyright_prepend -->
|
||||
{CREDIT_LINE}
|
||||
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
|
||||
<!-- EVENT overall_footer_copyright_append -->
|
||||
<!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>
|
||||
</div>
|
||||
|
||||
|
@ -12,5 +15,6 @@
|
|||
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT overall_footer_after -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -129,6 +129,9 @@ function marklist(id, name, state)
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<!-- EVENT overall_header_head_append -->
|
||||
|
||||
</head>
|
||||
<body class="{S_CONTENT_DIRECTION}">
|
||||
|
||||
|
|
|
@ -257,6 +257,7 @@
|
|||
</td>
|
||||
<td class="row2">
|
||||
<table cellpadding="1">
|
||||
<!-- EVENT posting_editor_options_prepend -->
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<tr>
|
||||
<td><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT simple_footer_after -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<!-- ENDIF -->
|
||||
|
||||
<div id="pageheader">
|
||||
<h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
|
||||
<h2><!-- EVENT viewtopic_topic_title_prepend --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
|
||||
|
||||
<!-- IF MODERATORS -->
|
||||
<p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p>
|
||||
|
|
|
@ -181,6 +181,20 @@ if ($mark_read == 'topics')
|
|||
$redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// Tell the ajax script what language vars and URL need to be replaced
|
||||
$data = array(
|
||||
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
|
||||
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
||||
'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '',
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['TOPICS_MARKED']
|
||||
);
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send($data);
|
||||
}
|
||||
|
||||
trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
}
|
||||
|
||||
|
|
|
@ -38,10 +38,16 @@ class phpbb_compress_test extends phpbb_test_case
|
|||
$phpbb_root_path = '';
|
||||
|
||||
$this->path = dirname(__FILE__) . '/fixtures/';
|
||||
}
|
||||
|
||||
if (!@extension_loaded('zlib') || !@extension_loaded('bz2'))
|
||||
protected function check_extensions($extensions)
|
||||
{
|
||||
$this->markTestSkipped('PHP needs to be compiled with --with-zlib and --with-bz2 in order to run these tests');
|
||||
foreach ($extensions as $extension)
|
||||
{
|
||||
if (!@extension_loaded($extension))
|
||||
{
|
||||
$this->markTestSkipped("$extension extension is not loaded");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,17 +120,18 @@ class phpbb_compress_test extends phpbb_test_case
|
|||
public function tar_archive_list()
|
||||
{
|
||||
return array(
|
||||
array('archive.tar', '.tar'),
|
||||
array('archive.tar.gz', '.tar.gz'),
|
||||
array('archive.tar.bz2', '.tar.bz2'),
|
||||
array('archive.tar', '.tar', array()),
|
||||
array('archive.tar.gz', '.tar.gz', array('zlib')),
|
||||
array('archive.tar.bz2', '.tar.bz2', array('bz2')),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider tar_archive_list
|
||||
*/
|
||||
public function test_extract_tar($filename, $type)
|
||||
public function test_extract_tar($filename, $type, $extensions)
|
||||
{
|
||||
$this->check_extensions($extensions);
|
||||
$compress = new compress_tar('r', $this->path . $filename);
|
||||
$compress->extract('tests/compress/' . self::EXTRACT_DIR);
|
||||
$this->valid_extraction();
|
||||
|
@ -141,8 +148,10 @@ class phpbb_compress_test extends phpbb_test_case
|
|||
* @depends test_extract_tar
|
||||
* @dataProvider tar_archive_list
|
||||
*/
|
||||
public function test_compress_tar($filename, $type)
|
||||
public function test_compress_tar($filename, $type, $extensions)
|
||||
{
|
||||
$this->check_extensions($extensions);
|
||||
|
||||
$tar = dirname(__FILE__) . self::ARCHIVE_DIR . $filename;
|
||||
$compress = new compress_tar('w', $tar);
|
||||
$this->archive_files($compress);
|
||||
|
@ -160,6 +169,8 @@ class phpbb_compress_test extends phpbb_test_case
|
|||
*/
|
||||
public function test_compress_zip()
|
||||
{
|
||||
$this->check_extensions(array('zlib'));
|
||||
|
||||
$zip = dirname(__FILE__) . self::ARCHIVE_DIR . 'archive.zip';
|
||||
$compress = new compress_zip('w', $zip);
|
||||
$this->archive_files($compress);
|
||||
|
|
|
@ -44,8 +44,9 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
|
|||
|
||||
public function test_empty_file()
|
||||
{
|
||||
$this->markTestIncomplete('Test fails intermittently.');
|
||||
$crawler = $this->upload_file('empty.png', 'image/png');
|
||||
$this->assertEquals($this->lang('ATTACHED_IMAGE_NOT_IMAGE'), $crawler->filter('div#message p')->text());
|
||||
$this->assertEquals($this->lang('ATTACHED_IMAGE_NOT_IMAGE'), $this->assert_filter($crawler, 'div#message p')->text());
|
||||
}
|
||||
|
||||
public function test_invalid_extension()
|
||||
|
@ -63,6 +64,7 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
|
|||
|
||||
public function test_valid_file()
|
||||
{
|
||||
$this->markTestIncomplete('Test fails intermittently.');
|
||||
$crawler = $this->upload_file('valid.jpg', 'image/jpeg');
|
||||
$this->assert_response_success();
|
||||
// ensure there was no error message rendered
|
||||
|
|
|
@ -121,7 +121,11 @@ class phpbb_mock_cache implements phpbb_cache_driver_interface
|
|||
public function sql_load($query)
|
||||
{
|
||||
}
|
||||
public function sql_save($query, $query_result, $ttl)
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
return $query_result;
|
||||
}
|
||||
|
|
|
@ -424,4 +424,20 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||
$content = $this->client->getResponse()->getContent();
|
||||
$this->assertNotContains('Fatal error:', $content);
|
||||
}
|
||||
|
||||
public function assert_filter($crawler, $expr, $msg = null)
|
||||
{
|
||||
$nodes = $crawler->filter($expr);
|
||||
if ($msg)
|
||||
{
|
||||
$msg .= "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = '';
|
||||
}
|
||||
$msg .= "`$expr` not found in DOM.";
|
||||
$this->assertGreaterThan(0, count($nodes), $msg);
|
||||
return $nodes;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue