Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • to/docker-forum
  • lnovy/docker-forum
2 results
Show changes
Commits on Source (18)
......@@ -2,7 +2,7 @@ image: docker:20.10.9
variables:
DOCKER_TLS_CERTDIR: "/certs"
BUILD_VERSION: p2
BUILD_VERSION: p11
services:
- docker:20.10.9-dind
......
FROM bitnami/phpbb:3.3.8
MAINTAINER Andrej Ramašeuski <andrej.ramaseuski@pirati.cz>
USER 0
RUN install_packages cron
COPY crontab /etc/cron.d/
COPY phpbb-htaccess.conf /opt/bitnami/apache/conf/vhosts/htaccess
USER 1001
COPY phpbb /opt/bitnami/phpbb
CMD [ "/opt/bitnami/scripts/apache/run.sh" ]
*/5 * * * * daemon /opt/bitnami/php/bin/php /opt/bitnami/phpbb/bin/phpbbcli.php -v cron:run
<Directory "/opt/bitnami/phpbb/files">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb/cache">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb">
<IfModule mod_rewrite.c>
RewriteEngine on
#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB
# in http://www.test.com/phpBB/index.php you have to set
# the statement RewriteBase /phpBB/
#
#RewriteBase /
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
# FORUM ALL MODES
RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$2&start=$4 [QSA,L,NC,R=302]
# TOPIC WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC,R=302]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^announces/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$2&start=$4 [QSA,L,NC,R=302]
# PHPBB FILES ALL MODES
RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/file.php?id=$2&t=$1 [QSA,L,NC,R=302]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC,R=302]
#
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]
#
# If symbolic links are not already being followed,
# uncomment the line below.
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
#
#Options +FollowSymLinks
</IfModule>
# Apache content negotation tries to interpret non-existent paths as files if
# MultiViews is enabled. This will however cause issues with paths containg
# dots, e.g. for the cron tasks
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfVersion>
<IfVersion >= 2.4>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfModule>
<IfModule mod_authz_core.c>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb/store">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb/includes">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb/config">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb/images/avatars/upload">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
<Directory "/opt/bitnami/phpbb/phpbb/db/migration/data">
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>
</Directory>
......@@ -256,7 +256,7 @@ function generate_smilies($mode, $forum_id)
*/
function update_post_information($type, $ids, $return_update_sql = false)
{
global $db;
global $db, $phpbb_dispatcher;
if (empty($ids))
{
......@@ -340,14 +340,35 @@ function update_post_information($type, $ids, $return_update_sql = false)
if (count($last_post_ids))
{
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE p.poster_id = u.user_id
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
$result = $db->sql_query($sql);
$sql_ary = array(
'SELECT' => 'p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour',
'FROM' => array(
POSTS_TABLE => 'p',
USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('p.post_id', $last_post_ids) . '
AND p.poster_id = u.user_id',
);
/**
* Event to modify the SQL array to get the post and user data from all last posts
*
* @event core.update_post_info_modify_posts_sql
* @var string type The table being updated (forum or topic)
* @var array sql_ary SQL array to get some of the last posts' data
* @since 3.3.5-RC1
*/
$vars = [
'type',
'sql_ary',
];
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars)));
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[] = $row;
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
......@@ -356,6 +377,23 @@ function update_post_information($type, $ids, $return_update_sql = false)
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
}
$db->sql_freeresult($result);
/**
* Event to modify the update_sql array to add new update data for forum or topic last posts
*
* @event core.update_post_info_modify_sql
* @var string type The table being updated (forum or topic)
* @var array rowset Array with the posts data
* @var array update_sql Array with SQL data to update the forums or topics table with
* @since 3.3.5-RC1
*/
$vars = [
'type',
'rowset',
'update_sql',
];
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars)));
unset($rowset);
}
unset($empty_forums, $ids, $last_post_ids);
......@@ -775,20 +813,42 @@ function posting_gen_inline_attachments(&$attachment_data)
}
/**
* Generate inline attachment entry
*/
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
* Generate inline attachment entry
*
* @param array $attachment_data The attachment data
* @param string $filename_data The filename data (filecomment)
* @param bool $show_attach_box Whether to show the attach box
* @param mixed $forum_id The forum id to check or false if private message
* @return int
*/
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false)
{
global $template, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
global $template, $cache, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
$allowed_attachments = array_keys($cache->obtain_attach_extensions($forum_id)['_allowed_']);
// Some default template variables
$template->assign_vars(array(
$default_vars = [
'S_SHOW_ATTACH_BOX' => $show_attach_box,
'S_HAS_ATTACHMENTS' => count($attachment_data),
'FILESIZE' => $config['max_filesize'],
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
));
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? implode(',', $allowed_attachments) : '',
];
/**
* Modify default attachments template vars
*
* @event core.modify_default_attachments_template_vars
* @var array allowed_attachments Array containing allowed attachments data
* @var array default_vars Array containing default attachments template vars
* @since 3.3.6-RC1
*/
$vars = ['allowed_attachments', 'default_vars'];
extract($phpbb_dispatcher->trigger_event('core.modify_default_attachments_template_vars', compact($vars)));
$template->assign_vars($default_vars);
if (count($attachment_data))
{
......@@ -937,10 +997,10 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;
$link_topic = true;
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&amp;t=' . $draft['topic_id']);
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
$title = $topic_rows[$draft['topic_id']]['topic_title'];
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&amp;t=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
}
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
{
......@@ -1160,7 +1220,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_subject = censor_text($post_subject);
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&amp;t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
$l_deleted_message = '';
if ($row['post_visibility'] == ITEM_DELETED)
......@@ -1193,11 +1253,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
'S_FRIEND' => ($row['friend']) ? true : false,
'S_IGNORE_POST' => ($row['foe']) ? true : false,
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,
'S_HAS_ATTACHMENTS' => !empty($attachments[$row['post_id']]),
'S_FRIEND' => (bool) $row['friend'],
'S_IGNORE_POST' => (bool) $row['foe'],
'L_IGNORE_POST' => $row['foe'] ? $user->lang('POST_BY_FOE', get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'S_POST_DELETED' => $row['post_visibility'] == ITEM_DELETED,
'L_DELETE_POST' => $l_deleted_message,
'POST_SUBJECT' => $post_subject,
......@@ -1209,7 +1269,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'POST_TIME' => $row['post_time'],
'USER_ID' => $row['user_id'],
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;p=' . $row['post_id'], true, $user->session_id) : '',
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
);
......@@ -1836,14 +1896,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
'poll_start' => $poll_start,
'poll_max_options' => $poll_ary['poll_max_options'],
'poll_length' => $poll_length,
'poll_vote_change' => $poll_ary['poll_vote_change']
/* BEGIN SHOW_RESULTS */
,'poll_show_results' => $poll_ary['poll_show_results']
/* END SHOW_RESULTS */
)
'poll_vote_change' => $poll_ary['poll_vote_change'],
'poll_show_results' => $poll_ary['poll_show_results']
)
);
}
......@@ -1920,13 +1975,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
'poll_max_options' => (isset($poll_ary['poll_options'])) ? $poll_ary['poll_max_options'] : 1,
'poll_length' => (isset($poll_ary['poll_options'])) ? $poll_length : 0,
'poll_vote_change' => (isset($poll_ary['poll_vote_change'])) ? $poll_ary['poll_vote_change'] : 0,
/* BEGIN SHOW_RESULTS */
'poll_show_results' => (isset($poll_ary['poll_show_results'])) ? $poll_ary['poll_show_results'] : 1,
/* END SHOW_RESULTS */
'topic_last_view_time' => $current_time,
'topic_attachment' => (!empty($data_ary['attachment_data'])) ? 1 : (isset($data_ary['topic_attachment']) ? $data_ary['topic_attachment'] : 0),
......@@ -2517,27 +2566,35 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
}
}
$params = $add_anchor = '';
$params = [];
$add_anchor = '';
$url = "{$phpbb_root_path}viewtopic.$phpEx";
if ($post_visibility == ITEM_APPROVED ||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
{
$params .= '&amp;t=' . $data_ary['topic_id'];
if ($mode != 'post')
{
$params .= '&amp;p=' . $data_ary['post_id'];
$params['p'] = $data_ary['post_id'];
$add_anchor = '#p' . $data_ary['post_id'];
}
else
{
$params['t'] = $data_ary['topic_id'];
}
}
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
{
$params .= '&amp;t=' . $data_ary['topic_id'];
$params['t'] = $data_ary['topic_id'];
}
else
{
$url = "{$phpbb_root_path}viewforum.$phpEx";
$params['f'] = $data_ary['forum_id'];
}
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
$url = append_sid($url, 'f=' . $data_ary['forum_id'] . $params) . $add_anchor;
$url = append_sid($url, $params) . $add_anchor;
$poll = $poll_ary;
$data = $data_ary;
......@@ -2598,7 +2655,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
* - 'topic_last_poster_name'
* - 'topic_last_poster_colour'
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().
* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&amptopic_id=2&ampp=3#p3
* @return string An URL to the bumped topic, example: ./viewtopic.php?p=3#p3
*/
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
{
......@@ -2687,7 +2744,7 @@ function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
$post_data['topic_title']
));
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
return $url;
}
......@@ -2818,7 +2875,7 @@ function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $
$delete_reason
));
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
$message = $user->lang['POST_DELETED'];
if (!$request->is_ajax())
......
This diff is collapsed.
......@@ -234,7 +234,7 @@
{% EVENT overall_header_breadcrumbs_after %}
<li class="rightside responsive-hide"><a href="https://www.pirati.cz/rules/start" title="Předpisy Pirátů">Předpisy</a></li>
<li class="rightside responsive-hide"><a href="https://wiki.pirati.cz/rules/start" title="Předpisy Pirátů">Předpisy</a></li>
<li class="rightside responsive-hide">&bull;</li>
<li class="rightside responsive-hide"><a href="https://redmine.pirati.cz/issues?query_id=29" title="Volné úkoly pro dobrovolníky">Volné úkoly</a></li>
<li class="rightside responsive-hide">&bull;</li>
......
......@@ -348,6 +348,17 @@ $('.display_post').click(function(e) {
$('#post_hidden' + postId).hide();
});
/**
* Display hidden post on post review page
*/
$('.display_post_review').on('click', function(e) {
e.preventDefault();
let $displayPostLink = $(this);
$displayPostLink.closest('.post-ignore').removeClass('post-ignore');
$displayPostLink.hide();
});
/**
* Toggle the member search panel in memberlist.php.
*
......
<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open -->
<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->
<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open -->
<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
<!-- BEGIN quote_extended -->
<blockquote>
<xsl:if test="@post_url">
<xsl:attribute name="cite"><xsl:value-of select="@post_url"/></xsl:attribute>
</xsl:if>
<xsl:if test="not(@author)">
<xsl:attribute name="class">uncited</xsl:attribute>
</xsl:if>
<div>
<xsl:if test="@author">
<cite>
<xsl:choose>
<xsl:when test="@url">
<a href="{@url}" class="postlink"><xsl:value-of select="@author"/></a>
</xsl:when>
<xsl:when test="@profile_url">
<a href="{@profile_url}"><xsl:value-of select="@author"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@author"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:value-of select="$L_WROTE"/>
<xsl:value-of select="$L_COLON"/>
<xsl:if test="@post_url">
<xsl:text> </xsl:text>
<a href="{@post_url}" data-post-id="{@post_id}" onclick="if(document.getElementById(hash.substr(1)))href=hash">&#8593;</a>
</xsl:if>
<xsl:if test="@msg_url">
<xsl:text> </xsl:text>
<a href="{@msg_url}" data-msg-id="{@msg_id}">&#8593;</a>
</xsl:if>
<xsl:if test="@date">
<span class="responsive-hide"><xsl:value-of select="@date"/></span>
</xsl:if>
</cite>
</xsl:if>
<xsl:apply-templates/>
</div>
</blockquote>
<!-- END quote_extended -->
<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><pre><code><!-- END code_open -->
<!-- BEGIN code_close --></code></pre></div><!-- END code_close -->
<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open -->
<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close -->
<!-- BEGIN b_open --><strong class="text-strong"><!-- END b_open -->
<!-- BEGIN b_close --></strong><!-- END b_close -->
<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->
<!-- BEGIN i_open --><em class="text-italics"><!-- END i_open -->
<!-- BEGIN i_close --></em><!-- END i_close -->
<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color -->
<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size -->
<!-- BEGIN img --><a href="{URL}" class="postlink">{L_IMAGE}</a><!-- END img -->
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
<!-- BEGIN email -->
<a>
<xsl:attribute name="href">
<xsl:text>mailto:</xsl:text>
<xsl:value-of select="@email"/>
<xsl:if test="@subject or @body">
<xsl:text>?</xsl:text>
<xsl:if test="@subject">subject=<xsl:value-of select="@subject"/></xsl:if>
<xsl:if test="@body"><xsl:if test="@subject">&amp;</xsl:if>body=<xsl:value-of select="@body"/></xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:apply-templates/>
</a>
<!-- END email -->
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
<!DOCTYPE html>
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet">
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->
<!-- EVENT ucp_pm_viewmessage_print_head_append -->
</head>
<body id="phpbb">
<div id="wrap" class="wrap">
<a id="top" class="top-anchor" accesskey="t"></a>
<div id="page-header">
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}</p>
<h2>{L_PRIVATE_MESSAGING}</h2>
</div>
<div id="page-body" class="page-body">
<div class="page-number">{PAGE_NUMBER}</div>
<div class="post">
<h3>{SUBJECT}</h3>
<div class="date">{L_SENT_AT} <strong>{SENT_DATE}</strong></div>
<div class="author">{L_PM_FROM} <strong>{MESSAGE_AUTHOR}</strong></div>
<!-- IF S_TO_RECIPIENT -->
<div class="author">{L_TO} <strong><!-- BEGIN to_recipient -->{to_recipient.NAME}&nbsp;<!-- END to_recipient --></strong></div>
<!-- ENDIF -->
<!-- IF S_BCC_RECIPIENT -->
<div class="author">{L_BCC} <strong><!-- BEGIN bcc_recipient -->{bcc_recipient.NAME}&nbsp;<!-- END bcc_recipient --></strong></div>
<!-- ENDIF -->
<hr />
<div class="content">{MESSAGE}</div>
</div>
<hr />
</div>
<div id="page-footer" class="page-footer">
<div class="page-number">{S_TIMEZONE}<br />{PAGE_NUMBER}</div>
<div class="copyright">
<p>{{ CREDIT_LINE }}
</p>
{% if TRANSLATION_INFO %}
<p>{{ TRANSLATION_INFO }}
</p>
{% endif %}
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet">
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->
<!-- EVENT viewtopic_print_head_append -->
</head>
<body id="phpbb" class="{S_CONTENT_DIRECTION}">
<div id="wrap" class="wrap">
<a id="top" class="top-anchor" accesskey="t"></a>
<div id="page-header">
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}<br /><a href="{U_FORUM}">{U_FORUM}</a></p>
<h2>{TOPIC_TITLE}</h2>
<p><a href="{U_TOPIC}">{U_TOPIC}</a></p>
</div>
<div id="page-body" class="page-body">
<div class="page-number">{PAGE_NUMBER}</div>
<!-- BEGIN postrow -->
<div class="post">
<h3>{postrow.POST_SUBJECT}</h3>
<div class="date">{L_POSTED}{L_COLON} <strong>{postrow.POST_DATE}</strong></div>
<div class="author">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR}</strong></div>
<div class="content">{postrow.MESSAGE}</div>
</div>
<hr />
<!-- END postrow -->
</div>
<div id="page-footer" class="page-footer">
<div class="page-number">{S_TIMEZONE}<br />{PAGE_NUMBER}</div>
<div class="copyright">
<p>{{ CREDIT_LINE }}
</p>
{% if TRANSLATION_INFO %}
<p>{{ TRANSLATION_INFO }}
</p>
{% endif %}
</div>
</div>
</div>
</body>
</html>
This diff is collapsed.
#!/bin/bash
# shellcheck disable=SC1091
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purpose
# Load libraries
. /opt/bitnami/scripts/libapache.sh
. /opt/bitnami/scripts/liblog.sh
# Load Apache environment
. /opt/bitnami/scripts/apache-env.sh
info "** Starting Apache **"
exec cron -l -f && "${APACHE_BIN_DIR}/httpd" -f "$APACHE_CONF_FILE" -D "FOREGROUND"