From: <ma...@us...> - 2012-07-07 19:08:17
|
Revision: 9800 http://xoops.svn.sourceforge.net/xoops/?rev=9800&view=rev Author: mageg Date: 2012-07-07 19:08:10 +0000 (Sat, 07 Jul 2012) Log Message: ----------- error in installing the module banner Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-07-07 19:07:20 UTC (rev 9799) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-07-07 19:08:10 UTC (rev 9800) @@ -38,8 +38,6 @@ // Call header $xoops->header('banners_admin_banners.html'); -// Get Action type -$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); // Get start pager $start = $system->cleanVars($_REQUEST, 'start', 0, 'int'); $startF = $system->cleanVars($_REQUEST, 'startF', 0, 'int'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-07-07 19:07:20 UTC (rev 9799) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-07-07 19:08:10 UTC (rev 9800) @@ -69,15 +69,15 @@ $xoops->db->queryF($sql); $sql = "DELETE FROM " . $xoops->db->prefix("config") . " WHERE `conf_name` = 'my_ip'"; $xoops->db->queryF($sql); - + // change 'imptotal' $sql = "ALTER TABLE " . $xoops->db->prefix("banner") . " CHANGE `imptotal` `imptotal` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'"; $xoops->db->queryF($sql); - + // move file // Get banners handler - $banner_Handler = $xoops->getHandlerBanner(); + $banner_Handler = $xoops->getModuleHandler('banner','banners'); $banner_arr = $banner_Handler->getall(); foreach (array_keys($banner_arr) as $i) { $namefile = substr_replace($banner_arr[$i]->getVar('imageurl'),'',0,strlen(XOOPS_URL . '/images/banners/')); @@ -91,13 +91,13 @@ $banner_Handler->insert($obj); } } + // data for table 'banner' - /*$sql = "DELETE FROM " . $xoops->db->prefix("config") . " WHERE `conf_name` = 'banners'";*/ - $dbm = new XoopsDatabaseManager(); - //$xoops->db->queryF($sql); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); - + $sql = "INSERT INTO `" . $xoops->db->prefix("banner") . "` (`cid`, `imptotal`, `impmade`, `clicks`, `imageurl`, `clickurl`, `datestart`, `dateend`, `htmlbanner`, `htmlcode`, `status`) VALUES (1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"; + $xoops->db->queryF($sql); + $sql = "INSERT INTO `" . $xoops->db->prefix("banner") . "` (`cid`, `imptotal`, `impmade`, `clicks`, `imageurl`, `clickurl`, `datestart`, `dateend`, `htmlbanner`, `htmlcode`, `status`) VALUES (1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"; + $xoops->db->queryF($sql); + $sql = "INSERT INTO `" . $xoops->db->prefix("banner") . "` (`cid`, `imptotal`, `impmade`, `clicks`, `imageurl`, `clickurl`, `datestart`, `dateend`, `htmlbanner`, `htmlcode`, `status`) VALUES (1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"; + $xoops->db->queryF($sql); return true; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |