diff options
author | Mario <mario@mariovavti.com> | 2017-09-19 18:59:06 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2017-09-19 18:59:06 +0200 |
commit | 4500faf463e7fd6fcf9948666421c941a1292df9 (patch) | |
tree | 6ce7fcce4ead9110c67eecd08be652b07350ccb5 /Zotlabs/Lib | |
parent | 66fb0fdcd77f46c614f8149e71ca0d4fb1757d0a (diff) | |
download | volse-hubzilla-4500faf463e7fd6fcf9948666421c941a1292df9.tar.gz volse-hubzilla-4500faf463e7fd6fcf9948666421c941a1292df9.tar.bz2 volse-hubzilla-4500faf463e7fd6fcf9948666421c941a1292df9.zip |
fix various wikipage widget issues (sort pages by name, respect locked mime type setting, move create tool back to the bottom)
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/NativeWikiPage.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Zotlabs/Lib/NativeWikiPage.php b/Zotlabs/Lib/NativeWikiPage.php index 4b637781e..209a5ef3c 100644 --- a/Zotlabs/Lib/NativeWikiPage.php +++ b/Zotlabs/Lib/NativeWikiPage.php @@ -21,7 +21,7 @@ class NativeWikiPage { $sql_extra = item_permissions_sql($channel_id,$observer_hash); $r = q("select * from item where resource_type = 'nwikipage' and resource_id = '%s' and uid = %d and item_deleted = 0 - $sql_extra order by created asc", + $sql_extra order by title asc", dbesc($resource_id), intval($channel_id) ); @@ -74,6 +74,7 @@ class NativeWikiPage { $arr['uid'] = $channel_id; $arr['author_xchan'] = $observer_hash; $arr['mimetype'] = $mimetype; + $arr['title'] = $name; $arr['resource_type'] = 'nwikipage'; $arr['resource_id'] = $resource_id; $arr['allow_cid'] = $w['wiki']['allow_cid']; @@ -139,8 +140,14 @@ class NativeWikiPage { if($ic) { foreach($ic as $c) { set_iconfig($c['item_id'],'nwikipage','pagetitle',$pageNewName); + $ids[] = $c['item_id']; } + $str_ids = implode(',', $ids); + q("update item set title = '%s' where id in ($str_ids)", + dbesc($pageNewName) + ); + $page = [ 'rawName' => $pageNewName, 'htmlName' => escape_tags($pageNewName), |