glom r1818 - branches/glom-1-8/glom/mode_design/users
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1818 - branches/glom-1-8/glom/mode_design/users
- Date: Fri, 19 Dec 2008 14:18:53 +0000 (UTC)
Author: murrayc
Date: Fri Dec 19 14:18:53 2008
New Revision: 1818
URL: http://svn.gnome.org/viewvc/glom?rev=1818&view=rev
Log:
2008-12-19 Murray Cumming <murrayc murrayc com>
* glom/mode_design/users/dialog_groups_list.cc
on_button_group_delete():
* glom/mode_design/users/dialog_users_list.cc
on_button_user_delete(), on_button_user_add(),
on_button_user_new(), on_button_user_edit():
Add missing quotes around user and group names in SQL queries.
Modified:
branches/glom-1-8/glom/mode_design/users/dialog_groups_list.cc
branches/glom-1-8/glom/mode_design/users/dialog_users_list.cc
Modified: branches/glom-1-8/glom/mode_design/users/dialog_groups_list.cc
==============================================================================
--- branches/glom-1-8/glom/mode_design/users/dialog_groups_list.cc (original)
+++ branches/glom-1-8/glom/mode_design/users/dialog_groups_list.cc Fri Dec 19 14:18:53 2008
@@ -205,8 +205,8 @@
{
Gtk::TreeModel::Row row = *iter;
- const Glib::ustring user = row[m_model_columns_groups.m_col_name];
- if(!user.empty())
+ const Glib::ustring group = row[m_model_columns_groups.m_col_name];
+ if(!group.empty())
{
//TODO: Prevent deletion of standard groups
Gtk::MessageDialog dialog(Bakery::App_Gtk::util_bold_message(_("Delete Group")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL);
@@ -218,7 +218,7 @@
if(response == Gtk::RESPONSE_OK)
{
- Glib::ustring strQuery = "DROP GROUP " + user;
+ Glib::ustring strQuery = "DROP GROUP \"" + group + "\";
query_execute(strQuery, this);
fill_group_list();
Modified: branches/glom-1-8/glom/mode_design/users/dialog_users_list.cc
==============================================================================
--- branches/glom-1-8/glom/mode_design/users/dialog_users_list.cc (original)
+++ branches/glom-1-8/glom/mode_design/users/dialog_users_list.cc Fri Dec 19 14:18:53 2008
@@ -166,7 +166,7 @@
if(response == Gtk::RESPONSE_OK)
{
- Glib::ustring strQuery = "DROP USER " + user;
+ Glib::ustring strQuery = "DROP USER +\"" + user + "\"";
query_execute(strQuery, this);
fill_list();
@@ -210,7 +210,7 @@
if(!user.empty())
{
//Add it to the group:
- Glib::ustring strQuery = "ALTER GROUP \"" + m_combo_group->get_active_text() + "\" ADD USER " + user;
+ Glib::ustring strQuery = "ALTER GROUP \"" + m_combo_group->get_active_text() + "\" ADD USER \"" + user + "\"";
query_execute(strQuery, this);
//Remove any user rights, so that all rights come from the user's presence in the group:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]