From: Jan P. <mi...@us...> - 2005-09-29 15:52:52
|
Update of /cvsroot/xoops/xoops2/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3459/kernel Modified Files: Tag: xoops2_2_3-branch module.php Log Message: Changed module installation and update routine so it now halts, when xoops_module_pre_xxx function fails Index: module.php =================================================================== RCS file: /cvsroot/xoops/xoops2/kernel/module.php,v retrieving revision 1.12.6.42.2.7 retrieving revision 1.12.6.42.2.8 diff -C2 -d -r1.12.6.42.2.7 -r1.12.6.42.2.8 *** module.php 29 Sep 2005 15:50:13 -0000 1.12.6.42.2.7 --- module.php 29 Sep 2005 15:52:40 -0000 1.12.6.42.2.8 *************** *** 448,452 **** $this->setVar('weight', 1); ! $this->executeScript('onInstall', 1); $error = $this->executeSQL(); --- 448,458 ---- $this->setVar('weight', 1); ! if (!$this->executeScript('onInstall', 1)) { ! echo "<p>".sprintf(_MD_AM_FAILINS, "<b>".$this->getVar('name')."</b>")."</p>"; ! foreach ($this->getMessages() as $msg) { ! echo '<code>'.$msg.'</code><br />'; ! } ! return; ! } $error = $this->executeSQL(); *************** *** 498,502 **** $this->setVar('version', $prev_version); ! $this->executeScript('onUpdate', 1); echo $this->insert(); --- 504,514 ---- $this->setVar('version', $prev_version); ! if (!$this->executeScript('onUpdate', 1)) { ! echo "<p>".sprintf(_MD_AM_FAILUPD, "<b>".$this->getVar('name')."</b>")."</p>"; ! foreach ($this->getMessages() as $msg) { ! echo '<code>'.$msg.'</code><br />'; ! } ! return; ! } echo $this->insert(); |