From 1a42580ad44f768ba8d4eb0669f3b8be03670e04 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 22 Dec 2013 18:37:39 -0800 Subject: remove a couple of mysql reserved words from being used as table or row names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code. --- boot.php | 2 +- include/Contact.php | 2 +- include/acl_selectors.php | 2 +- include/event.php | 20 ++++++++++---------- include/group.php | 24 ++++++++++++------------ include/identity.php | 2 +- include/items.php | 2 +- include/photos.php | 2 +- include/security.php | 2 +- install/database.sql | 6 +++--- install/update.php | 15 ++++++++++++++- mod/acl.php | 14 +++++++------- mod/contactgroup.php | 2 +- mod/events.php | 2 +- mod/fbrowser.php | 2 +- mod/group.php | 8 ++++---- mod/import.php | 2 +- mod/lockview.php | 4 ++-- mod/network.php | 2 +- mod/photos.php | 18 +++++++++--------- 20 files changed, 73 insertions(+), 60 deletions(-) diff --git a/boot.php b/boot.php index 6b3499a05..7d9075af2 100755 --- a/boot.php +++ b/boot.php @@ -46,7 +46,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1085 ); +define ( 'DB_UPDATE_VERSION', 1086 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/include/Contact.php b/include/Contact.php index 59605e463..fd450033c 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -255,7 +255,7 @@ function channel_remove($channel_id, $local = true) { } - q("DELETE FROM `group` WHERE `uid` = %d", intval($channel_id)); + q("DELETE FROM `groups` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `group_member` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `event` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `item` WHERE `uid` = %d", intval($channel_id)); diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 930f9967a..749ca75eb 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -14,7 +14,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { $o .= "