From: <ni...@us...> - 2007-09-14 19:53:15
|
Update of /cvsroot/tikiwiki/tiki/lib/mypage In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17809/lib/mypage Modified Files: mypagelib.php Log Message: [FIX] mypage: added support for background images Index: mypagelib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/mypage/mypagelib.php,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- mypagelib.php 12 Sep 2007 01:50:57 -0000 1.71 +++ mypagelib.php 14 Sep 2007 19:53:05 -0000 1.72 @@ -147,7 +147,8 @@ } /* copy mypage params */ - $copys=array('width', 'height', 'bgcolor', 'description', 'categories'); + $copys=array('width', 'height', 'bgcolor', 'description', 'categories', 'winbgcolor', 'bgimage', 'winbgimage', + 'bgtype', 'winbgtype'); foreach($copys as $copy) $mypage_dst->setParam($copy, $mypage_src->getParam($copy)); $mypage_dst->commit(); @@ -339,7 +340,8 @@ return $this->lasterror=tra('You are not the owner of this page'); $allowed=array('width', 'height', 'wintitlecolor', 'wintextcolor', 'winbgcolor', - 'name', 'description', 'bgcolor', 'categories'); + 'name', 'description', 'bgcolor', 'categories', 'bgimage', 'winbgimage', + 'bgtype', 'winbgtype'); if ($param == 'categories') { if (is_null($value)) $value=array(); @@ -369,13 +371,18 @@ return $cat; } - function getParam($param) { + function getParam($param, $default=NULL) { if ($param=='categories') { if (array_key_exists($param['categories'])) return $param['categories']; else return $param['categories']=$this->_getcateg(); - } else return $this->params[$param]; + } else { + if (!isset($this->params[$param])) + return $default; + else + return $this->params[$param]; + } } function checkout() { |