2009/6/11 Nan Li <[email protected]>: > Thanks .I have add this into my class to edit page. > $params = new FauxRequest(array ( > > 'action' => 'edit', > > 'title' => $page, > > 'basetimestamp' => $ts, > > 'starttimestamp' => $sts, > > 'token' => $token, > > 'text' => $newtext > )); > > $api = new ApiMain($params); > $api->execute(); > > $data = & $api->getResultData(); > > return $data; > > and then add this > require_once('../../includes/WebRequest.php'); > > require_once('../../includes/api/ApiMain.php'); > at the top of my class. > Instead of this, you should write your extension as a special page <http://www.mediawiki.org/wiki/Manual:Special_pages>.
Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
