From d5ffa5508d4c04be801d049b63ae6881460abe82 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 16 Sep 2017 10:11:59 +0200 Subject: [PATCH 1/3] db update to add index to item.resource_id we query this in wikis a lot --- boot.php | 2 +- install/schema_mysql.sql | 1 + install/schema_postgres.sql | 1 + install/update.php | 18 ++++++++++++++++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index aeb3ec8b6..2b290862b 100755 --- a/boot.php +++ b/boot.php @@ -52,7 +52,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' ); define ( 'STD_VERSION', '2.7.3' ); define ( 'ZOT_REVISION', '1.3' ); -define ( 'DB_UPDATE_VERSION', 1195 ); +define ( 'DB_UPDATE_VERSION', 1196 ); define ( 'PROJECT_BASE', __DIR__ ); diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 0988bfa4a..3143854f5 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -656,6 +656,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `aid` (`aid`), KEY `owner_xchan` (`owner_xchan`), KEY `author_xchan` (`author_xchan`), + KEY `resource_id` (`resource_id`), KEY `resource_type` (`resource_type`), KEY `item_restrict` (`item_restrict`), KEY `item_flags` (`item_flags`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 381c262a7..65acb644b 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -627,6 +627,7 @@ create index "item_comments_closed" on item ("comments_closed"); create index "item_aid" on item ("aid"); create index "item_owner_xchan" on item ("owner_xchan"); create index "item_author_xchan" on item ("author_xchan"); +create index "item_resource_id" on item ("resource_id"); create index "item_resource_type" on item ("resource_type"); create index "item_restrict" on item ("item_restrict"); create index "item_flags" on item ("item_flags"); diff --git a/install/update.php b/install/update.php index 8c9f83033..07675a973 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Sat, 16 Sep 2017 14:00:55 -0400 Subject: [PATCH 2/3] Page title is what we need in order to delete pages, not the url --- view/tpl/wiki_page_list.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/tpl/wiki_page_list.tpl b/view/tpl/wiki_page_list.tpl index 3d38a0b81..cfaa50395 100644 --- a/view/tpl/wiki_page_list.tpl +++ b/view/tpl/wiki_page_list.tpl @@ -7,7 +7,7 @@ {{foreach $pages as $page}} From 6239a27288bacad225606a40a3dc6ac26072d329 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 16 Sep 2017 14:27:40 -0400 Subject: [PATCH 3/3] Moved add wiki page form to top of page list to address issue https://github.com/redmatrix/hubzilla/issues/719 --- view/tpl/wiki_page_list.tpl | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/view/tpl/wiki_page_list.tpl b/view/tpl/wiki_page_list.tpl index cfaa50395..bf5f6697d 100644 --- a/view/tpl/wiki_page_list.tpl +++ b/view/tpl/wiki_page_list.tpl @@ -3,6 +3,23 @@ {{/if}}

{{$header}}

- {{if $canadd}} - - {{/if}} {{if ! $refresh}} {{/if}}