From: <ni...@us...> - 2007-08-24 23:09:06
|
Update of /cvsroot/tikiwiki/tiki/lib/mypage In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15793/lib/mypage Modified Files: mypagelib.php Log Message: [FIX] mypage: allow modifing a mypage name with the same name Index: mypagelib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/mypage/mypagelib.php,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- mypagelib.php 24 Aug 2007 01:13:29 -0000 1.48 +++ mypagelib.php 24 Aug 2007 23:09:08 -0000 1.49 @@ -283,8 +283,8 @@ if (count($this->modified) > 0) { if (isset($this->modified['name'])) { - $c=$tikilib->getOne('SELECT COUNT(*) FROM tiki_mypage WHERE name=?', - array($this->params['name'])); + $c=$tikilib->getOne('SELECT COUNT(*) FROM tiki_mypage WHERE `name`=? AND `id`!=?', + array($this->params['name'], $this->id)); if ($c != 0) return tra(sprintf('Name "%s" is already exists', $this->params['name'])); } |