add title to element array

This commit is contained in:
Mario Vavti 2015-04-24 14:14:33 +02:00
parent da0875a015
commit 2583cab469
3 changed files with 5 additions and 3 deletions

View File

@ -106,7 +106,7 @@ function blocks_content(&$a) {
$editor = status_editor($a,$x);
$r = q("select iid, sid, mid, body, created, edited from item_id left join item on item_id.iid = item.id
$r = q("select iid, sid, mid, title, body, mimetype, created, edited from item_id left join item on item_id.iid = item.id
where item_id.uid = %d and service = 'BUILDBLOCK' order by item.created desc",
intval($owner)
);
@ -118,6 +118,7 @@ function blocks_content(&$a) {
foreach($r as $rr) {
$element_arr = array(
'type' => 'block',
'title' => $rr['title'],
'body' => $rr['body'],
'created' => $rr['created'],
'edited' => $rr['edited'],

View File

@ -118,4 +118,4 @@ function impel_init(&$a) {
json_return_and_die(true);
}
}

View File

@ -132,7 +132,7 @@ function layouts_content(&$a) {
$editor = status_editor($a,$x);
$r = q("select iid, sid, mid, body, created, edited from item_id left join item on item_id.iid = item.id
$r = q("select iid, sid, mid, title, body, mimetype, created, edited from item_id left join item on item_id.iid = item.id
where item_id.uid = %d and service = 'PDL' order by item.created desc",
intval($owner)
);
@ -144,6 +144,7 @@ function layouts_content(&$a) {
foreach($r as $rr) {
$element_arr = array(
'type' => 'layout',
'title' => $rr['title'],
'body' => $rr['body'],
'created' => $rr['created'],
'edited' => $rr['edited'],