Minahito
minah****@users*****
2007年 4月 18日 (水) 15:07:29 JST
Index: xoops2jp/html/kernel/block.php diff -u xoops2jp/html/kernel/block.php:1.2.8.10.2.4.2.2 xoops2jp/html/kernel/block.php:1.2.8.10.2.4.2.3 --- xoops2jp/html/kernel/block.php:1.2.8.10.2.4.2.2 Wed Apr 18 13:57:16 2007 +++ xoops2jp/html/kernel/block.php Wed Apr 18 15:07:29 2007 @@ -1,5 +1,5 @@ <?php -// $Id: block.php,v 1.2.8.10.2.4.2.2 2007/04/18 04:57:16 minahito Exp $ +// $Id: block.php,v 1.2.8.10.2.4.2.3 2007/04/18 06:07:29 minahito Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -906,5 +906,22 @@ list($count) = $this->db->fetchRow($result); return $count; } + + /** + * Changes 'isactive' value of the module specified by $moduleId. + * @remark This method should be called by only the base modules. + */ + function syncIsActive($moduleId, $isActive, $force = false) + { + $this->db->prepare("UPDATE " . $this->db->prefix('newblocks') . " SET isactive=? WHERE mid=?"); + $this->db->bind_param("ii", $isActive, $moduleId); + + if ($force) { + $this->db->executeF(); + } + else { + $this->db->execute(); + } + } } ?> \ No newline at end of file