From 30aa958ad837646d9bb6a525abe61302ebe3ba98 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Wed, 22 May 2019 20:33:23 +0900 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E5=8A=A0=E3=83=AB=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E7=94=A8WHERE=E5=8F=A5=E3=82=92?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8BSQL=E3=81=A7=E3=80=81DB?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83=E3=82=AF=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/netcommons/NetCommons2/issues/137 --- html/webapp/components/pages/View.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/html/webapp/components/pages/View.class.php b/html/webapp/components/pages/View.class.php index bab3b6c..fba9824 100644 --- a/html/webapp/components/pages/View.class.php +++ b/html/webapp/components/pages/View.class.php @@ -588,12 +588,17 @@ function getGroupWhereStatement() { $whereStatement = '({pages}.space_type = ' . _SPACE_TYPE_GROUP . ' ' . 'AND {pages}.private_flag = ' . _OFF . ' ' - . 'AND ({pages}.default_entry_flag = ' . _ON . ' ' + // 2019.05.22 mod by mutaguchi@opensource-workshop.jp + // DB indexが使われるように条件見直し + //. 'AND ({pages}.default_entry_flag = ' . _ON . ' ' + . 'AND (({pages}.default_entry_flag = ' . _ON . ' ' . 'AND ({pages_users_link}.role_authority_id != ' . _ROLE_AUTH_OTHER . ' ' . 'OR {pages_users_link}.role_authority_id IS NULL)) ' . 'OR ({pages}.default_entry_flag = ' . _OFF . ' ' . 'AND {pages_users_link}.role_authority_id IS NOT NULL ' - . 'AND {pages_users_link}.role_authority_id != ' . _ROLE_AUTH_OTHER . ')' + // 2019.05.22 mod by mutaguchi@opensource-workshop.jp + //. 'AND {pages_users_link}.role_authority_id != ' . _ROLE_AUTH_OTHER . ')' + . 'AND {pages_users_link}.role_authority_id != ' . _ROLE_AUTH_OTHER . '))' . ')'; return $whereStatement;