diff options
author | friendica <info@friendica.com> | 2013-09-01 17:07:55 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-01 17:07:55 -0700 |
commit | de3345f5f39f080e00c2572b48a53d85c7f65b5c (patch) | |
tree | 6a3fbad7c70ebd561a5e0e085907480de952a91b /mod/item.php | |
parent | 00622779f3fd68bf9ae4860d776c65c82ae1c0c0 (diff) | |
download | volse-hubzilla-de3345f5f39f080e00c2572b48a53d85c7f65b5c.tar.gz volse-hubzilla-de3345f5f39f080e00c2572b48a53d85c7f65b5c.tar.bz2 volse-hubzilla-de3345f5f39f080e00c2572b48a53d85c7f65b5c.zip |
This isn't optimal, but on the short term we'll clone the page editor to use as a block editor, and probably a layout editor as well. Eventually, these should all probably just be switches onto a single editor instance. Decided to put the layout_mid into the item table directory rather than re-use resource_id, so that we can still have pages attached to different resources like photos and events and stuff. The block editor is far from finished, at this point I've only cloned it and changed the name and type of item it looks for.
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mod/item.php b/mod/item.php index 1893a6ef4..504df9d29 100644 --- a/mod/item.php +++ b/mod/item.php @@ -495,6 +495,9 @@ function item_post(&$a) { if($buildblock) $item_restrict = $item_restrict | ITEM_BUILDBLOCK; + + if($pdl) + $item_restrict = $item_restrict | ITEM_PDL; if(! strlen($verb)) @@ -764,7 +767,16 @@ function item_post(&$a) { intval($parent) ); - if($webpage) { + $page_type = ''; + + if($webpage) + $page_type = 'WEBPAGE'; + elseif($buildblock) + $page_type = 'BUILDBLOCK'; + elseif($ptemplate) + $page_type = 'PDL'; + + if($page_type) { // store page info as an alternate message_id so we can access it via // https://sitename/page/$channelname/$pagetitle @@ -773,11 +785,12 @@ function item_post(&$a) { // as the entire mid. If it were the post_id the link would be less portable. // We should have the ability to edit this and arrange pages into menus via the pages module + q("insert into item_id ( iid, uid, sid, service ) values ( %d, %d, '%s','%s' )", intval($post_id), intval($channel['channel_id']), dbesc(($pagetitle) ? $pagetitle : substr($mid,0,16)), - dbesc('WEBPAGE') + dbesc($page_type) ); } |