aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 888e56733..d87a8c440 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -29,7 +29,7 @@ function widget_tagcloud($args) {
$type = TERM_CATEGORY;
// FIXME there exists no $authors variable
- $r = tagadelic($uid, $count, $authors, $flags, ITEM_WEBPAGE, $type);
+ $r = tagadelic($uid, $count, $authors, $flags, ITEM_TYPE_WEBPAGE, $type);
if($r) {
$o = '<div class="tagblock widget"><h3>' . t('Categories') . '</h3><div class="tags" align="center">';
@@ -155,9 +155,8 @@ function widget_follow($args) {
$a = get_app();
$uid =$a->channel['channel_id'];
- $r = q("select count(*) as total from abook where abook_channel = %d and not (abook_flags & %d)>0 ",
- intval($uid),
- intval(ABOOK_FLAG_SELF)
+ $r = q("select count(*) as total from abook where abook_channel = %d and abook_self = 0 ",
+ intval($uid)
);
if($r)
$total_channels = $r[0]['total'];
@@ -393,7 +392,7 @@ function widget_tagcloud_wall($arr) {
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
- return wtagblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
+ return wtagblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], 'wall');
return '';
}
@@ -408,7 +407,7 @@ function widget_catcloud_wall($arr) {
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
- return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
+ return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], 'wall');
}
@@ -473,9 +472,8 @@ function widget_settings_menu($arr) {
$role = get_pconfig(local_channel(),'system','permissions_role');
- $abk = q("select abook_id from abook where abook_channel = %d and ( abook_flags & %d )>0 limit 1",
- intval(local_channel()),
- intval(ABOOK_FLAG_SELF)
+ $abk = q("select abook_id from abook where abook_channel = %d and abook_self = 1 limit 1",
+ intval(local_channel())
);
if($abk)
$abook_self_id = $abk[0]['abook_id'];
@@ -704,7 +702,7 @@ function widget_item($arr) {
require_once('include/security.php');
$sql_extra = item_permissions_sql($uid);
- $r = q("select * from item where mid = '%s' and uid = %d and item_restrict = " . intval(ITEM_WEBPAGE) . " $sql_extra limit 1",
+ $r = q("select * from item where mid = '%s' and uid = %d and item_type = " . intval(ITEM_TYPE_WEBPAGE) . " $sql_extra limit 1",
dbesc($arr['mid']),
intval($uid)
);
@@ -902,10 +900,10 @@ function widget_random_block($arr) {
$r = q("select item.* from item left join item_id on item.id = item_id.iid
where item.uid = %d and sid like '%s' and service = 'BUILDBLOCK' and
- item_restrict = %d $sql_options order by $randfunc limit 1",
+ item_type = %d $sql_options order by $randfunc limit 1",
intval($channel_id),
dbesc('%' . $contains . '%'),
- intval(ITEM_BUILDBLOCK)
+ intval(ITEM_TYPE_BUILDBLOCK)
);
if($r) {
@@ -986,3 +984,5 @@ function widget_pubsites() {
return;
return '<div class="widget"><ul class="nav nav-pills"><li><a href="pubsites">' . t('Public Hubs') . '</a></li></ul></div>';
}
+
+