mango r188 - in trunk: . www
- From: ovitters svn gnome org
- To: svn-commits-list gnome org,gnome-sysadmin gnome org
- Subject: mango r188 - in trunk: . www
- Date: Mon, 2 Jun 2008 18:57:22 +0000 (UTC)
Author: ovitters
Date: Mon Jun 2 18:57:22 2008
New Revision: 188
URL: http://svn.gnome.org/viewvc/mango?rev=188&view=rev
Log:
* www/update_user.php: Determine if an error message was shown last
time. If so, the saving should be tried again; even if no change was
made in the form.
Modified:
trunk/ChangeLog
trunk/www/update_user.php
Modified: trunk/www/update_user.php
==============================================================================
--- trunk/www/update_user.php (original)
+++ trunk/www/update_user.php Mon Jun 2 18:57:22 2008
@@ -35,6 +35,8 @@
// Groups the user belongs to that we're not responsible for
$othergroups,
+ $has_changes,
+
// An initialisation error message
$error;
@@ -48,6 +50,7 @@
}
$this->user = $user;
+ $this->has_changes = false;
$this->othergroups = array_diff($user->groups, $AFFECTEDGROUPS);
}
@@ -117,6 +120,7 @@
return;
}
$this->user = $user;
+ $this->has_changes = false;
}
// Individual tab form handlers
@@ -128,7 +132,8 @@
$changes = $this->process_sshkeys_tab($dom, $formnode) ? true : $changes;
$changes = $this->process_groups_tab($dom, $formnode) ? true : $changes;
- if ($changes) {
+ if ($changes || $this->has_changes) {
+ $this->has_changes = true;
$formerrors = $this->user->validate();
if(count($formerrors) > 0) {
@@ -159,6 +164,8 @@
// Report successes
if(is_array($result)) {
+ $this->has_changes = false;
+
$this->user->inform_user($result);
foreach($result as $change) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]