1
rgauci
error when Default Template is set to clone
  • 2009/10/27 7:39

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


In Templates I have cloned XOOPS Default Template and renamed it but a blank screen comes up with the following error:

Fatal error: Cannot redeclare XoopsImagesetimg::imgset_refid() in /home/gistudio/public_html/kernel/imagesetimg.php on line 65

Any clues please????

2
ghia
Re: error when Default Template is set to clone
  • 2009/10/27 9:43

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Oops, seems some unfinished business in /kernel/imagesetimg.php
le="color: #000000"><?php /** * XOOPS Image Sets Image * * @package kernel * @author Kazumi Ono <onokazu@xoops.org> * @copyright (c) 2000-2003 The XOOPS Project - http://www.xoops.org */ class XoopsImagesetimg extends XoopsObject { /** * Constructor */ function XoopsImagesetimg() { $this->XoopsObject(); $this->initVar('imgsetimg_id', XOBJ_DTYPE_INT, null, false); $this->initVar('imgsetimg_file', XOBJ_DTYPE_OTHER, null, false); $this->initVar('imgsetimg_body', XOBJ_DTYPE_SOURCE, null, false); $this->initVar('imgsetimg_imgset', XOBJ_DTYPE_INT, null, false); } /** * Returns Class Base Variable imgset_refid */ function id($format = 'N') { return $this->getVar('imgset_refid', $format); } /** * Returns Class Base Variable imgset_refid */ function imgset_refid($format = '') { return $this->getVar('imgset_refid', $format); } /** * Returns Class Base Variable imgset_refid */ function imgset_refid($format = '') { return $this->getVar('imgset_refid', $format); } /** * Returns Class Base Variable imgset_refid */ function imgset_refid($format = '') { return $this->getVar('imgset_refid', $format); } /** * Returns Class Base Variable imgset_refid */ function imgset_refid($format = '') { return $this->getVar('imgset_refid', $format); } }
Replace this class definition by:
le="color: #000000"><?php /** * XOOPS Image Sets Image * * @package kernel * @author Kazumi Ono <onokazu@xoops.org> * @copyright (c) 2000-2003 The XOOPS Project - http://www.xoops.org */ class XoopsImagesetimg extends XoopsObject { /** * Constructor */ function XoopsImagesetimg() { $this->XoopsObject(); $this->initVar('imgsetimg_id', XOBJ_DTYPE_INT, null, false); $this->initVar('imgsetimg_file', XOBJ_DTYPE_OTHER, null, false); $this->initVar('imgsetimg_body', XOBJ_DTYPE_SOURCE, null, false); $this->initVar('imgsetimg_imgset', XOBJ_DTYPE_INT, null, false); } /** * Returns Class Base Variable imgsetimg_id with default format N */ function id($format = 'N') { return $this->getVar('imgsetimg_id', $format); } /** * Returns Class Base Variable imgsetimg_id */ function imgsetimg_id($format = '') { return $this->getVar('imgsetimg_id', $format); } /** * Returns Class Base Variable imgsetimg_file */ function imgsetimg_file($format = '') { return $this->getVar('imgsetimg_file', $format); } /** * Returns Class Base Variable imgsetimg_body */ function imgsetimg_body($format = '') { return $this->getVar('imgsetimg_body', $format); } /** * Returns Class Base Variable imgsetimg_imgset */ function imgsetimg_imgset($format = '') { return $this->getVar('imgsetimg_imgset', $format); } }

3
Mamba
Re: error when Default Template is set to clone
  • 2009/10/27 10:25

  • Mamba

  • Moderator

  • Posts: 11535

  • Since: 2004/4/23


Thanks Ghia. I've updated SVN, but feel free to do it yourself next time. I assume, you have access to SVN, right?