aboutsummaryrefslogtreecommitdiffstats
path: root/mod/impel.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/impel.php')
-rw-r--r--mod/impel.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/mod/impel.php b/mod/impel.php
index dcc82c9ba..711547624 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;
@@ -113,7 +113,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())
);
@@ -126,7 +127,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']),