$this->parseRequest();
$o = '';
- if (!empty($_GET['force']) || !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update')) {
+ if (!empty($request['force']) || !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update')) {
$o = DI::conversation()->create(self::getItems(), 'community', true, false, 'commented', DI::userSession()->getLocalUserId());
}
{
protected function rawContent(array $request = [])
{
- if (!isset($_GET['p']) || !isset($_GET['item'])) {
+ if (!isset($request['p']) || !isset($request['item'])) {
System::exit();
}
- $this->parseRequest($_GET);
+ $this->parseRequest($request);
- $profile_uid = intval($_GET['p']);
+ $profile_uid = intval($request['p']);
$o = '';
- if (!DI::pConfig()->get($profile_uid, 'system', 'no_auto_update') || ($_GET['force'] == 1)) {
- if (!empty($_GET['item'])) {
- $item = Post::selectFirst(['parent'], ['id' => $_GET['item']]);
+ if (!DI::pConfig()->get($profile_uid, 'system', 'no_auto_update') || ($request['force'] == 1)) {
+ if (!empty($request['item'])) {
+ $item = Post::selectFirst(['parent'], ['id' => $request['item']]);
$parent = $item['parent'] ?? 0;
} else {
$parent = 0;
$a = DI::app();
// Ensure we've got a profile owner if updating.
- $a->setProfileOwner((int)($_GET['p'] ?? 0));
+ $a->setProfileOwner((int)($request['p'] ?? 0));
if (DI::config()->get('system', 'block_public') && !DI::userSession()->getLocalUserId() && !DI::userSession()->getRemoteContactID($a->getProfileOwner())) {
throw new ForbiddenException();
$o = '';
- if (empty($_GET['force']) && DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update')) {
+ if (empty($request['force']) && DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update')) {
System::htmlUpdateExit($o);
}
AND `visible` AND (NOT `deleted` OR `gravity` = ?)
AND `wall` " . $sql_extra, $a->getProfileOwner(), Item::GRAVITY_ACTIVITY];
- if ($_GET['force'] && !empty($_GET['item'])) {
+ if ($request['force'] && !empty($request['item'])) {
// When the parent is provided, we only fetch this
- $condition = DBA::mergeConditions($condition, ['parent' => $_GET['item']]);
+ $condition = DBA::mergeConditions($condition, ['parent' => $request['item']]);
} elseif ($is_owner || !$last_updated) {
// If the page user is the owner of the page we should query for unseen
// items. Otherwise use a timestamp of the last succesful update request.