From: <ru...@us...> - 2009-09-17 10:26:46
|
Revision: 7141 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7141&view=rev Author: rurban Date: 2009-09-17 10:26:37 +0000 (Thu, 17 Sep 2009) Log Message: ----------- * stabilize RPC2.php usage on wrong mime types * support action=rename&to=newpagename Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2009-09-17 10:15:21 UTC (rev 7140) +++ trunk/lib/main.php 2009-09-17 10:26:37 UTC (rev 7141) @@ -898,9 +898,10 @@ return 'soap'; // Detect XML-RPC requests. if ($this->isPost() - && ($this->get('CONTENT_TYPE') == 'text/xml' - or $this->get('CONTENT_TYPE') == 'application/xml') - && strstr($GLOBALS['HTTP_RAW_POST_DATA'], '<methodCall>') + && ((defined("WIKI_XMLRPC") and WIKI_XMLRPC) + or ($this->get('CONTENT_TYPE') == 'text/xml' + or $this->get('CONTENT_TYPE') == 'application/xml') + && strstr($GLOBALS['HTTP_RAW_POST_DATA'], '<methodCall>')) ) { return 'xmlrpc'; @@ -1057,9 +1058,15 @@ if ($action) { if (!$this->getArg('s')) $this->setArg('s', $this->getArg('pagename')); - $this->setArg('verify',1); + $this->setArg('verify', 1); // only for POST if ($this->getArg('action') != 'rename') $this->setArg('action', $action); + elseif($this->getArg('to') && empty($this->args['admin_rename'])) { + $this->args['admin_rename'] + = array('from' => $this->getArg('s'), + 'to' => $this->getArg('to'), + 'action' => 'select'); + } $this->actionpage($action); } else { trigger_error($page.": Cannot find action page", E_USER_WARNING); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |