function show() { global $wgOut, $IP, $wgUser, $wgScriptPath; $wgOut->setPageTitle( wfMsgHtml( 'todo-list-for', $this->target->getName() ) ); $wgOut->addWikiText( "== " . wfMsg( 'todo-new-item' ) . " ==\n" ); require_once( 'TodoForm.php' ); $form = new TodoTemplate(); $form->set( 'action', $this->self->getLocalUrl( 'action=submit' ) ); $form->set( 'script', "$wgScriptPath/extensions/Todo/todo.js" ); $wgOut->addTemplate( $form ); if ( $wgUser->getName() == $this->target->getName() ) { $wgOut->addWikiText( "== " . wfMsg( 'todo-item-list' ) . " ==\n" ); $list = new TodoList( $this->target ); $list->show(); } }