[Mapbender-commits] r6621 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jul 23 05:45:44 EDT 2010
Author: kmq
Date: 2010-07-23 09:45:44 +0000 (Fri, 23 Jul 2010)
New Revision: 6621
Modified:
trunk/mapbender/http/classes/class_gui.php
trunk/mapbender/http/classes/class_user.php
Log:
modify change function to check for existance of keys rather than falsity
Modified: trunk/mapbender/http/classes/class_gui.php
===================================================================
--- trunk/mapbender/http/classes/class_gui.php 2010-07-23 09:42:46 UTC (rev 6620)
+++ trunk/mapbender/http/classes/class_gui.php 2010-07-23 09:45:44 UTC (rev 6621)
@@ -114,10 +114,10 @@
*/
public function change($changes) {
//FIXME: validate input
- $this->name = $changes->name ? $changes->name : $this->name;
- $this->description = $changes->description ? $changes->description : $this->description;
- $this->id = $changes->id ? $changes->id : $this->id;
- $this->public = $changes->public ? $changes->public : $this->public;
+ $this->name = isset($changes->name) ? $changes->name : $this->name;
+ $this->description = isset($changes->description) ? $changes->description : $this->description;
+ $this->id = isset($changes->id) ? $changes->id : $this->id;
+ $this->public = isset($changes->public) ? $changes->public : $this->public;
return true;
}
Modified: trunk/mapbender/http/classes/class_user.php
===================================================================
--- trunk/mapbender/http/classes/class_user.php 2010-07-23 09:42:46 UTC (rev 6620)
+++ trunk/mapbender/http/classes/class_user.php 2010-07-23 09:45:44 UTC (rev 6621)
@@ -194,34 +194,34 @@
if($changes->owner) {
$owner = User::byName($changes->owner);
}
- $this->name = $changes->name ? $changes->name : $this->name;
- $this->owner = $changes->owner ? $owner->id : $this->owner;
- $this->description = $changes->description ? $changes->description : $this->description;
- $this->email = $changes->email ? $changes->email : $this->email;
- $this->phone = $changes->phone ? $changes->phone : $this->phone;
- $this->department = $changes->department ? $changes->department : $this->department;
- $this->resolution = $changes->resolution ? $changes->resolution : $this->resolution;
- $this->organization = $changes->organization ? $changes->organization : $this->organization;
- $this->position = $changes->position ? $changes->position : $this->position;
- $this->phone1 = $changes->phone1 ? $changes->phone1 : $this->phone1;
- $this->facsimile = $changes->facsimile ? $changes->facsimile : $this->facsimile;
- $this->deliveryPoint = $changes->deliveryPoint ? $changes->deliveryPoint : $this->deliveryPoint;
- $this->city = $changes->city ? $changes->city : $this->city;
- $this->postalCode = $changes->postalCode ? $changes->postalCode : $this->postalCode;
- $this->country = $changes->country ? $changes->country : $this->country;
- $this->url = $changes->url ? $changes->url : $this->url;
- $this->id = $changes->id ? $changes->id : $this->id;
- $this->realName = $changes->realName ? $changes->realName : $this->realName;
- $this->street = $changes->street ? $changes->street : $this->street;
- $this->houseNumber = $changes->houseNumber ? $changes->houseNumber : $this->houseNumber;
- $this->reference = $changes->reference ? $changes->reference : $this->reference;
- $this->forAttentionOf = $changes->forAttentionOf ? $changes->forAttentionOf : $this->forAttentionOf;
- $this->validFrom = $changes->validFrom ? $changes->validFrom : $this->validFrom;
- $this->validTo = $changes->validTo ? $changes->validTo : $this->validTo;
- $this->passwordTicket = $changes->passwordTicket ? $changes->passwordTicket : $this->passwordTicket;
- $this->firstName = $changes->firstName ? $changes->firstName : $this->firstName;
- $this->lastName = $changes->lastName ? $changes->lastName : $this->lastName;
- $this->academicTitle = $changes->academicTitle ? $changes->academicTitle : $this->academicTitle;
+ $this->name = isset($changes->name) ? $changes->name : $this->name;
+ $this->owner = isset($changes->owner) ? $owner->id : $this->owner;
+ $this->description = isset($changes->description) ? $changes->description : $this->description;
+ $this->email = isset($changes->email) ? $changes->email : $this->email;
+ $this->phone = isset($changes->phone) ? $changes->phone : $this->phone;
+ $this->department = isset($changes->department) ? $changes->department : $this->department;
+ $this->resolution = isset($changes->resolution) ? $changes->resolution : $this->resolution;
+ $this->organization = isset($changes->organization) ? $changes->organization : $this->organization;
+ $this->position = isset($changes->position) ? $changes->position : $this->position;
+ $this->phone1 = isset($changes->phone1) ? $changes->phone1 : $this->phone1;
+ $this->facsimile = isset($changes->facsimile) ? $changes->facsimile : $this->facsimile;
+ $this->deliveryPoint = isset($changes->deliveryPoint) ? $changes->deliveryPoint : $this->deliveryPoint;
+ $this->city = isset($changes->city) ? $changes->city : $this->city;
+ $this->postalCode = isset($changes->postalCode) ? $changes->postalCode : $this->postalCode;
+ $this->country = isset($changes->country) ? $changes->country : $this->country;
+ $this->url = isset($changes->url) ? $changes->url : $this->url;
+ $this->id = isset($changes->id) ? $changes->id : $this->id;
+ $this->realName = isset($changes->realName) ? $changes->realName : $this->realName;
+ $this->street = isset($changes->street) ? $changes->street : $this->street;
+ $this->houseNumber = isset($changes->houseNumber) ? $changes->houseNumber : $this->houseNumber;
+ $this->reference = isset($changes->reference) ? $changes->reference : $this->reference;
+ $this->forAttentionOf = isset($changes->forAttentionOf) ? $changes->forAttentionOf : $this->forAttentionOf;
+ $this->validFrom = isset($changes->validFrom) ? $changes->validFrom : $this->validFrom;
+ $this->validTo = isset($changes->validTo) ? $changes->validTo : $this->validTo;
+ $this->passwordTicket = isset($changes->passwordTicket) ? $changes->passwordTicket : $this->passwordTicket;
+ $this->firstName = isset($changes->firstName) ? $changes->firstName : $this->firstName;
+ $this->lastName = isset($changes->lastName) ? $changes->lastName : $this->lastName;
+ $this->academicTitle = isset($changes->academicTitle) ? $changes->academicTitle : $this->academicTitle;
return true;
}
More information about the Mapbender_commits
mailing list