Home » Authentication » LiveUser » Bug #1673
Admin_Perm_DB_Medium::updateGroup never completed
Details
| Submitted | 2004-06-18 11:10 UTC |
|---|---|
| From | xav at spotk dot net |
| Assigned | lsmith |
| Status | No Feedback |
| Package | LiveUser |
| PHP Version | 4.3.7 |
| OS | linux debian sarge |
| Roadmaps | (Not assigned) |
Comments
[2004-06-18 11:10 UTC] xav at spotk dot net
Description:
------------
method LiveUser_Admin_Perm_Container_DB_Medium::updateGroup() never update group datas;
due to a boolean param $update which can't pass to true, the group is never updated;
proposed patch attached.
Reproduce code:
---------------
--- /home/pear_cvs/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php 2004-06-18 13:13:04.000000000 +0200
+++ ./DB_Medium.php 2004-06-18 13:17:40.000000000 +0200
@@ -210,7 +210,7 @@
function updateGroup($group_id, $group_name, $group_description = null,
$active = null, $define_name = null, $group_type = null, $customFields = array())
{
- $update = false;
+
if(!is_null($active)) {
$updateValues[] = 'is_active = ' . $this->dbc->quoteSmart(($active ? 'Y' : 'N'));
}
@@ -226,20 +226,19 @@
$k . ' = ' . $this->dbc->quoteSmart($v['value']);
}
}
- if ($update) {
- $query = 'UPDATE
- ' . $this->prefix . 'groups
- SET '
- . implode(', ', $updateValues) .
- 'WHERE
- group_id = ' . (int)$group_id;
- $result = $this->dbc->query($query);
+ $query = 'UPDATE
+ ' . $this->prefix . 'groups
+ SET '
+ . implode(', ', $updateValues) .
+ 'WHERE
+ group_id = ' . (int)$group_id;
+ $result = $this->dbc->query($query);
+
+ if (DB::isError($result)) {
+ return $result;
+ };
- if (DB::isError($result)) {
- return $result;
- };
- }
// Update Group translation into Translations table
$result = $this->updateTranslation(
Expected result:
----------------
update done
Actual result:
--------------
no update done
[2004-06-18 11:15 UTC] xav at spotk dot net
hum, a space is missing in the patch to fix a second problem
WHERE is currently attached to last updated value, just add a space juste before WHERE > ' WHERE
[2004-06-18 12:22 UTC] smith at backendmedia dot com
Actually I think all that needs to happen is replace $update with $updateValues and add that space before WHERE
[2004-06-21 20:30 UTC] smith at backendmedia dot com
please check the updated version in CVS
[2004-10-11 11:31 UTC] smith at backendmedia dot com
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.