aboutsummaryrefslogtreecommitdiffstats
path: root/mod/impel.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/impel.php')
-rw-r--r--mod/impel.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/mod/impel.php b/mod/impel.php
index 0b29bcf02..da7138438 100644
--- a/mod/impel.php
+++ b/mod/impel.php
@@ -32,17 +32,17 @@ function impel_init(&$a) {
switch($j['type']) {
case 'webpage':
- $arr['item_restrict'] = ITEM_WEBPAGE;
+ $arr['item_type'] = ITEM_TYPE_WEBPAGE;
$namespace = 'WEBPAGE';
$installed_type = t('webpage');
break;
case 'block':
- $arr['item_restrict'] = ITEM_BUILDBLOCK;
+ $arr['item_type'] = ITEM_TYPE_BLOCK;
$namespace = 'BUILDBLOCK';
$installed_type = t('block');
break;
case 'layout':
- $arr['item_restrict'] = ITEM_PDL;
+ $arr['item_type'] = ITEM_TYPE_PDL;
$namespace = 'PDL';
$installed_type = t('layout');
break;
@@ -157,7 +157,8 @@ function impel_init(&$a) {
dbesc($namespace),
intval(local_channel())
);
- $i = q("select id, edited, item_restrict from item where mid = '%s' and uid = %d limit 1",
+
+ $i = q("select id, edited, item_deleted from item where mid = '%s' and uid = %d limit 1",
dbesc($arr['mid']),
intval(local_channel())
);
@@ -170,7 +171,7 @@ function impel_init(&$a) {
$x = item_store_update($arr,$execflag);
}
else {
- if(($i) && ($i[0]['item_restrict'] & ITEM_DELETED)) {
+ if(($i) && (intval($i[0]['item_deleted']))) {
// was partially deleted already, finish it off
q("delete from item where mid = '%s' and uid = %d",
dbesc($arr['mid']),
@@ -182,7 +183,7 @@ function impel_init(&$a) {
if($x['success']) {
$item_id = $x['item_id'];
- update_remote_id($channel,$item_id,$arr['item_restrict'],$pagetitle,$namespace,$remote_id,$arr['mid']);
+ update_remote_id($channel,$item_id,$arr['item_type'],$pagetitle,$namespace,$remote_id,$arr['mid']);
}
}