Last active
August 29, 2015 03:17
-
-
Save MiLk/7db36223bd69a63c1d74 to your computer and use it in GitHub Desktop.
CraftaShop fix
This file contains 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
<?php | |
// controller/AdminController.php | |
function description($action=null) { | |
$this->loadModel("Configs"); | |
$datas["configs"] = $this->Configs->listed("Presentation"); | |
$datas["messages"] = $this->Configs->listed("Message"); | |
$this->set($datas); | |
if ($this->request->data) { | |
$update = false; | |
foreach ($this->request->data as $key => $value) { | |
if($key != "checkbox") { | |
$update = $this->Configs->updt(array('config_text' => $value), $key) && update; | |
} | |
} | |
if ($update) { | |
$this->Session->setFlash("Félicitations, vous venez de modifier la description.", "success"); | |
} | |
$this->redirect("previous"); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment