Compare commits

...

10 commits

Author SHA1 Message Date
v12mike
5667769eb6
Merge 17c64bada3 into bdbd0be548 2025-05-02 07:16:12 +00:00
Marc Alexander
bdbd0be548
Merge branch '3.3.x' 2025-05-02 08:32:19 +02:00
Marc Alexander
1b2ac50cfd
Merge pull request #6810 from rxu/ticket/17504
[ticket/17504] Fix tests failure caused by ondrej/php PPA repo label changed
2025-04-28 21:17:23 +02:00
rxu
779bec5fcf
[ticket/17504] Run apt-get update on runner lever rather than in bash scripts
PHPBB-17504
2025-04-28 23:28:05 +07:00
rxu
f512af1823
[ticket/17504] Fix tests
Fix the following apt-get update issue with ondrej/php PPA repo:
Repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble InRelease'
changed its 'Label' value from '***** The main PPA for supported PHP versions
with many PECL extensions *****' to 'PPA for PHP'

Alternative fix might be: sudo apt update && sudo apt full-upgrade -y

PHPBB-17504
2025-04-28 21:17:57 +07:00
v12mike
17c64bada3
Update viewonline.php
remove html from php file
2021-10-22 13:48:24 +13:00
v12mike
4761fef7a8 [ticket/16558] Improve viewonline page
Fix overload of variables

PHPBB3-16558
2020-07-29 23:49:10 -04:00
v12mike
8d0c38383c [ticket/16558] Improve viewonline page
Fix memory leak

PHPBB3-16558
2020-07-29 00:05:36 -04:00
v12mike
9f682ea220 [ticket/16558] Improve viewonline page
Remove unsupport PHP syntax

PHPBB3-16558
2020-07-28 23:54:57 -04:00
v12mike
aa3472ce76 [ticket/16558] Improve viewonline page
Pages that are not handled by viewonline now shown as "Unrecognised Page"
Admins see the URI of session table page

PHPBB3-16558
2020-07-28 19:10:07 -04:00
7 changed files with 79 additions and 9 deletions

View file

@ -10,5 +10,4 @@
#
set -e
sudo apt-get update
sudo apt-get install -y parallel libimage-exiftool-perl

View file

@ -11,7 +11,6 @@
set -e
set -x
sudo apt-get update
sudo apt-get install -q -y sphinxsearch
DIR=$(dirname "$0")

View file

@ -10,5 +10,4 @@
#
set -e
sudo apt-get update
sudo apt-get install -y expect-dev

View file

@ -11,7 +11,6 @@
set -e
set -x
sudo apt-get update
sudo apt-get install -y nginx coreutils
sudo service nginx stop

View file

@ -28,6 +28,10 @@ jobs:
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
with:
@ -169,6 +173,10 @@ jobs:
- 6379:6379
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
@ -308,6 +316,10 @@ jobs:
- 6379:6379
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
@ -412,6 +424,10 @@ jobs:
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4

View file

@ -865,6 +865,7 @@ $lang = array_merge($lang, array(
'UNREAD_MESSAGES' => 'Unread messages',
'UNREAD_POST' => 'Unread post',
'UNREAD_POSTS' => 'Unread posts',
'UNRECOGNISED_PAGE' => 'Unrecognised page',
'UNWATCH_FORUM_CONFIRM' => 'Are you sure you wish to unsubscribe from this forum?',
'UNWATCH_FORUM_DETAILED' => 'Are you sure you wish to unsubscribe from the forum “%s”?',
'UNWATCH_TOPIC_CONFIRM' => 'Are you sure you wish to unsubscribe from this topic?',

View file

@ -268,6 +268,57 @@ foreach ($session_data_rowset as $row)
case 'viewtopic':
$forum_id = $row['session_forum_id'];
if (!$forum_id)
{
$array_match_index = 5;
// find the forum_id from the page URI
$matches = array();
$pattern = '#(viewtopic|posting)\.' . $phpEx . '((\?|&)\w+=\w+)*(\?|&)';
preg_match($pattern . 'f=(\d+)#', $row['session_page'], $matches);
if ($matches[$array_match_index])
{
$forum_id = (int) $matches[$array_match_index];
}
else
{
preg_match($pattern . 't=(\d+)#', $row['session_page'], $matches);
if ($matches[$array_match_index])
{
$topic_id = $matches[$array_match_index];
$sql = 'SELECT forum_id
FROM ' . TOPICS_TABLE . "
WHERE topic_id = $topic_id";
$result1 = $db->sql_query($sql);
$forum_id = (int) $db->sql_fetchfield('forum_id');
$db->sql_freeresult($result1);
}
else
{
preg_match($pattern . 'p=(\d+)#', $row['session_page'], $matches);
if ($matches[$array_match_index])
{
$post_id = $matches[$array_match_index];
$topic_forum = array();
$sql = 'SELECT t.forum_id
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
WHERE p.post_id = ' . $post_id . '
AND t.topic_id = p.topic_id';
$result1 = $db->sql_query($sql);
$forum_id = (int) $db->sql_fetchfield('forum_id');
$db->sql_freeresult($result1);
}
else
{
$forum_id = 0;
}
}
}
}
if ($forum_id && $auth->acl_get('f_list', $forum_id))
{
$location = '';
@ -309,7 +360,7 @@ foreach ($session_data_rowset as $row)
}
else
{
$location = $user->lang['INDEX'];
$location = $user->lang['UNRECOGNISED_PAGE'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
}
break;
@ -382,17 +433,23 @@ foreach ($session_data_rowset as $row)
break;
default:
$location = $user->lang['INDEX'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
if ($row['session_page'] === 'app.' . $phpEx . '/help/faq' ||
$row['session_page'] === 'app.' . $phpEx . '/help/bbcode')
{
$location = $user->lang['VIEWING_FAQ'];
$location_url = $controller_helper->route('phpbb_help_faq_controller');
}
else
{
$location = $user->lang['UNRECOGNISED_PAGE'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
}
break;
}
if ($auth->acl_get('a_'))
{
$location .= nl2br("\n" . substr($row['session_page'], 0, 99));
}
/**
* Overwrite the location's name and URL, which are displayed in the list
@ -410,7 +467,7 @@ foreach ($session_data_rowset as $row)
extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars)));
$template_row = array(
'USERNAME' => $row['username'],
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => $row['user_colour'],
'USERNAME_FULL' => $username_full,
'LASTUPDATE' => $user->format_date($row['session_time']),