aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Layouts.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-13 19:58:24 -0700
committerredmatrix <git@macgirvin.com>2016-06-13 19:58:24 -0700
commit1e68d4fb75b9831ed763328b7982e44d1d4cdc5b (patch)
tree5379f5803f4aa3ec8b5bced6b3151cd08cf89d0f /Zotlabs/Module/Layouts.php
parent6d4188f05e2a8e92508b1d38e4b7ef5156ba6c42 (diff)
downloadvolse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.tar.gz
volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.tar.bz2
volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.zip
deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication.
Diffstat (limited to 'Zotlabs/Module/Layouts.php')
-rw-r--r--Zotlabs/Module/Layouts.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/Zotlabs/Module/Layouts.php b/Zotlabs/Module/Layouts.php
index 9b9fc22f3..a0b1c31cc 100644
--- a/Zotlabs/Module/Layouts.php
+++ b/Zotlabs/Module/Layouts.php
@@ -90,13 +90,14 @@ class Layouts extends \Zotlabs\Web\Controller {
return;
}
- //This feature is not exposed in redbasic ui since it is not clear why one would want to
- //download a json encoded pdl file - we dont have a possibility to import it.
- //Use the buildin share/install feature instead.
+ // This feature is not exposed in redbasic ui since it is not clear why one would want to
+ // download a json encoded pdl file - we dont have a possibility to import it.
+ // Use the buildin share/install feature instead.
+
if((argc() > 3) && (argv(2) === 'share') && (argv(3))) {
- $r = q("select sid, service, mimetype, title, body from item_id
- left join item on item.id = item_id.iid
- where item_id.uid = %d and item.mid = '%s' and service = 'PDL' order by sid asc",
+ $r = q("select iconfig.v, iconfig.k, mimetype, title, body from iconfig
+ left join item on item.id = iconfig.iid
+ where uid = %d and mid = '%s' and iconfig.cat = 'system' and iconfig.k = 'PDL' order by iconfig.v asc",
intval($owner),
dbesc(argv(3))
);
@@ -141,8 +142,9 @@ class Layouts extends \Zotlabs\Web\Controller {
$editor = status_editor($a,$x);
- $r = q("select iid, sid, mid, title, body, mimetype, created, edited, item_type from item_id left join item on item_id.iid = item.id
- where item_id.uid = %d and service = 'PDL' and item_type = %d order by item.created desc",
+ $r = q("select iconfig.iid, iconfig.v, mid, title, body, mimetype, created, edited, item_type from iconfig
+ left join item on iconfig.iid = item.id
+ where uid = %d and iconfig.cat = 'system' and iconfig.k = 'PDL' and item_type = %d order by item.created desc",
intval($owner),
intval(ITEM_TYPE_PDL)
);
@@ -164,7 +166,7 @@ class Layouts extends \Zotlabs\Web\Controller {
);
$pages[$rr['iid']][] = array(
'url' => $rr['iid'],
- 'title' => $rr['sid'],
+ 'title' => $rr['v'],
'descr' => $rr['title'],
'mid' => $rr['mid'],
'created' => $rr['created'],