aboutsummaryrefslogtreecommitdiffstats
path: root/mod/thing.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-29 15:09:35 -0800
committerfriendica <info@friendica.com>2015-01-29 15:09:35 -0800
commit912be23e1627211fb417c4b7bced414cbbe38ef0 (patch)
tree2b8567d800624167b3eadf37c8855deb0ba74b0b /mod/thing.php
parentff68ea608786a698ad46637ef13854ac1b1e6beb (diff)
parent872b165eb2bb5d632a12f2d7e1a28e195c2d5348 (diff)
downloadvolse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.tar.gz
volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.tar.bz2
volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.zip
Merge branch 'master' into tres
Conflicts: include/group.php include/text.php mod/acl.php mod/channel.php mod/connections.php mod/display.php mod/group.php mod/item.php mod/locs.php mod/network.php mod/photos.php mod/ping.php mod/starred.php mod/viewsrc.php
Diffstat (limited to 'mod/thing.php')
-rw-r--r--mod/thing.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/mod/thing.php b/mod/thing.php
index 4896c8a6e..289e968ca 100644
--- a/mod/thing.php
+++ b/mod/thing.php
@@ -6,7 +6,7 @@ require_once('include/contact_selectors.php');
function thing_init(&$a) {
- if(! local_user())
+ if(! local_channel())
return;
@@ -90,7 +90,7 @@ function thing_init(&$a) {
dbesc(($url) ? $url : z_root() . '/thing/' . $term_hash),
dbesc($local_photo),
dbesc($term_hash),
- intval(local_user())
+ intval(local_channel())
);
info( t('Thing updated') . EOL);
@@ -99,7 +99,7 @@ function thing_init(&$a) {
$sql = (($profile_guid) ? " and profile_guid = '" . dbesc($profile_guid) . "' " : " and is_default = 1 ");
$p = q("select profile_guid, is_default from profile where uid = %d $sql limit 1",
- intval(local_user())
+ intval(local_channel())
);
if($p)
@@ -117,7 +117,7 @@ function thing_init(&$a) {
$r = q("select * from term where uid = %d and otype = %d and type = %d and term = '%s' limit 1",
- intval(local_user()),
+ intval(local_channel()),
intval(TERM_OBJ_THING),
intval(TERM_THING),
dbesc($name)
@@ -126,7 +126,7 @@ function thing_init(&$a) {
$r = q("insert into term ( aid, uid, oid, otype, type, term, url, imgurl, term_hash )
values( %d, %d, %d, %d, %d, '%s', '%s', '%s', '%s' ) ",
intval($account_id),
- intval(local_user()),
+ intval(local_channel()),
0,
intval(TERM_OBJ_THING),
intval(TERM_THING),
@@ -136,7 +136,7 @@ function thing_init(&$a) {
dbesc($hash)
);
$r = q("select * from term where uid = %d and otype = %d and type = %d and term = '%s' limit 1",
- intval(local_user()),
+ intval(local_channel()),
intval(TERM_OBJ_THING),
intval(TERM_THING),
dbesc($name)
@@ -148,7 +148,7 @@ function thing_init(&$a) {
dbesc($profile['profile_guid']),
dbesc($verb),
intval(TERM_OBJ_THING),
- intval(local_user()),
+ intval(local_channel()),
dbesc($term['term_hash'])
);
@@ -203,7 +203,7 @@ function thing_init(&$a) {
$arr['item_private'] = true;
$str = '';
$r = q("select abook_xchan from abook where abook_channel = %d and abook_profile = '%s'",
- intval(local_user()),
+ intval(local_channel()),
dbesc($profile_guid)
);
if($r) {
@@ -234,7 +234,7 @@ function thing_content(&$a) {
'$header' => t('Show Thing'),
'$edit' => t('Edit'),
'$delete' => t('Delete'),
- '$canedit' => ((local_user() && local_user() == $r[0]['obj_channel']) ? true : false),
+ '$canedit' => ((local_channel() && local_channel() == $r[0]['obj_channel']) ? true : false),
'$thing' => $r[0] ));
}
else {
@@ -245,7 +245,7 @@ function thing_content(&$a) {
$channel = $a->get_channel();
- if(! (local_user() && $channel)) {
+ if(! (local_channel() && $channel)) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -262,7 +262,7 @@ function thing_content(&$a) {
dbesc($thing_hash)
);
- if((! $r) || ($r[0]['obj_channel'] != local_user())) {
+ if((! $r) || ($r[0]['obj_channel'] != local_channel())) {
notice( t('Permission denied.') . EOL);
return '';
}
@@ -270,7 +270,7 @@ function thing_content(&$a) {
$o .= replace_macros(get_markup_template('thing_edit.tpl'),array(
'$thing_hdr' => t('Edit Thing'),
- '$multiprof' => feature_enabled(local_user(),'multi_profiles'),
+ '$multiprof' => feature_enabled(local_channel(),'multi_profiles'),
'$profile_lbl' => t('Select a profile'),
'$profile_select' => contact_profile_assign($r[0]['obj_page']),
'$verb_lbl' => $channel['channel_name'],
@@ -297,7 +297,7 @@ function thing_content(&$a) {
dbesc($thing_hash)
);
- if((! $r) || ($r[0]['obj_channel'] != local_user())) {
+ if((! $r) || ($r[0]['obj_channel'] != local_channel())) {
notice( t('Permission denied.') . EOL);
return '';
}
@@ -306,18 +306,18 @@ function thing_content(&$a) {
$x = q("delete from obj where obj_obj = '%s' and obj_type = %d and obj_channel = %d",
dbesc($thing_hash),
intval(TERM_OBJ_THING),
- intval(local_user())
+ intval(local_channel())
);
$x = q("delete from term where term_hash = '%s' and uid = %d",
dbesc($thing_hash),
- intval(local_user())
+ intval(local_channel())
);
return $o;
}
$o .= replace_macros(get_markup_template('thing_input.tpl'),array(
'$thing_hdr' => t('Add Thing to your Profile'),
- '$multiprof' => feature_enabled(local_user(),'multi_profiles'),
+ '$multiprof' => feature_enabled(local_channel(),'multi_profiles'),
'$profile_lbl' => t('Select a profile'),
'$profile_select' => contact_profile_assign(''),
'$verb_lbl' => $channel['channel_name'],