Created
May 6, 2013 13:54
-
-
Save kylejohnson/5525307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function edit() { | |
| if (!empty($this->data)) { | |
| foreach ($this->data['Config'] as $key => $value) { | |
| foreach ($value as $fieldName => $fieldValue) { | |
| $id = intval($key); | |
| $this->Config->id = $id; | |
| $this->Config->read(); // Removing this has no affect | |
| $this->Config->saveField($fieldName, $fieldValue, array('validate' => false, 'callbacks' => false)); | |
| $this->Config->create(); // Removing this has no affect | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 SELECT COUNT(*) AS `count` FROM `zm`.`Config` AS `Config` WHERE `Config`.`Id` = 109 1 1 0 | |
| 2 SELECT `Config`.`Id`, `Config`.`Name`, `Config`.`Value`, `Config`.`Type`, `Config`.`DefaultValue`, `Config`.`Hint`, `Config`.`Pattern`, `Config`.`Format`, `Config`.`Prompt`, `Config`.`Help`, `Config`.`Category`, `Config`.`Readonly`, `Config`.`Requires` FROM `zm`.`Config` AS `Config` WHERE `Config`.`Id` = 110 LIMIT 1 1 1 0 | |
| 3 SELECT COUNT(*) AS `count` FROM `zm`.`Config` AS `Config` WHERE `Config`.`Id` = 110 1 1 0 | |
| 4 SELECT `Config`.`Id`, `Config`.`Name`, `Config`.`Value`, `Config`.`Type`, `Config`.`DefaultValue`, `Config`.`Hint`, `Config`.`Pattern`, `Config`.`Format`, `Config`.`Prompt`, `Config`.`Help`, `Config`.`Category`, `Config`.`Readonly`, `Config`.`Requires` FROM `zm`.`Config` AS `Config` WHERE `Config`.`Id` = 112 LIMIT 1 1 1 0 | |
| 5 SELECT COUNT(*) AS `count` FROM `zm`.`Config` AS `Config` WHERE `Config`.`Id` = 112 1 1 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment