aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/items.php b/include/items.php
index 18e777a7f..09479e428 100755
--- a/include/items.php
+++ b/include/items.php
@@ -274,7 +274,7 @@ function can_comment_on_post($observer_xchan, $item) {
return true;
if(strstr($item['comment_policy'],'network:') && strstr($item['comment_policy'],'diaspora'))
return true;
- if(strstr($item['comment_policy'],'site:') && strstr($item['comment_policy'],get_app()->get_hostname()))
+ if(strstr($item['comment_policy'],'site:') && strstr($item['comment_policy'],App::get_hostname()))
return true;
return false;
@@ -413,8 +413,8 @@ function post_activity_item($arr) {
if(! array_key_exists('item_thread_top',$arr) && (! $is_comment))
$arr['item_thread_top'] = 1;
- $channel = get_app()->get_channel();
- $observer = get_app()->get_observer();
+ $channel = App::get_channel();
+ $observer = App::get_observer();
$arr['aid'] = ((x($arr,'aid')) ? $arr['aid'] : $channel['channel_account_id']);
$arr['uid'] = ((x($arr,'uid')) ? $arr['uid'] : $channel['channel_id']);
@@ -602,7 +602,7 @@ function get_feed_for($channel, $observer_hash, $params) {
'order' => 'post',
'top' => $params['top'],
'cat' => $params['cat']
- ), $channel, $observer_hash, CLIENT_MODE_NORMAL, get_app()->module);
+ ), $channel, $observer_hash, CLIENT_MODE_NORMAL, App::$module);
$feed_template = get_markup_template('atom_feed.tpl');
@@ -1362,7 +1362,7 @@ function map_scope($scope, $strip = false) {
case PERMS_AUTHED:
return 'authenticated';
case PERMS_SITE:
- return 'site: ' . get_app()->get_hostname();
+ return 'site: ' . App::get_hostname();
case PERMS_PENDING:
return 'any connections';
case PERMS_CONTACTS:
@@ -2265,7 +2265,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
if(local_channel() && (! $arr['sig'])) {
- $channel = get_app()->get_channel();
+ $channel = App::get_channel();
if($channel['channel_hash'] === $arr['author_xchan']) {
$arr['sig'] = base64url_encode(rsa_sign($arr['body'],$channel['channel_prvkey']));
$arr['item_verified'] = 1;
@@ -2661,7 +2661,7 @@ function item_store_update($arr,$allow_exec = false, $deliver = true) {
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
if(local_channel() && (! $arr['sig'])) {
- $channel = get_app()->get_channel();
+ $channel = App::get_channel();
if($channel['channel_hash'] === $arr['author_xchan']) {
$arr['sig'] = base64url_encode(rsa_sign($arr['body'],$channel['channel_prvkey']));
$arr['item_verified'] = 1;
@@ -2887,7 +2887,7 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
logger('storing diaspora comment signature',LOGGER_DEBUG);
- $diaspora_handle = $channel['channel_address'] . '@' . get_app()->get_hostname();
+ $diaspora_handle = $channel['channel_address'] . '@' . App::get_hostname();
$signed_text = $datarray['mid'] . ';' . $parent_item['mid'] . ';' . $signed_body . ';' . $diaspora_handle;
@@ -4612,7 +4612,7 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = fal
$ok_to_delete = true;
// author deletion
- $observer = $a->get_observer();
+ $observer = App::get_observer();
if($observer && $observer['xchan_hash'] && ($observer['xchan_hash'] === $item['author_xchan']))
$ok_to_delete = true;
@@ -5201,8 +5201,8 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$pager_sql = '';
} else {
$itemspage = (($channel) ? get_pconfig($uid,'system','itemspage') : 20);
- $a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
- $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(get_app()->pager['itemspage']), intval(get_app()->pager['start']));
+ App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
+ $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start']));
}
if (isset($arr['start']) && isset($arr['records']))
@@ -5472,7 +5472,7 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow,
* @return boolean
*/
function comment_local_origin($item) {
- if(stripos($item['mid'], get_app()->get_hostname()) && ($item['parent'] != $item['id']))
+ if(stripos($item['mid'], App::get_hostname()) && ($item['parent'] != $item['id']))
return true;
return false;