When calling /change, don't set prefs if empty/no parameters are given

This commit is contained in:
Duncan Sommerville 2015-03-05 12:24:02 -05:00
parent e2054c13c8
commit 918631d676
1 changed files with 6 additions and 2 deletions

View File

@ -219,8 +219,12 @@ class ProvisioningHelper
* Initialize preference values passed from the dashboard (if any exist)
*/
private function initializePrefs() {
Application_Model_Preference::SetStationName($this->station_name);
Application_Model_Preference::SetStationDescription($this->description);
if ($this->statio_name) {
Application_Model_Preference::SetStationName($this->station_name);
}
if ($this->descption) {
Application_Model_Preference::SetStationDescription($this->description);
}
}
}