Add some logging for weird redirected POSTs
[lhc/web/wiklou.git] / includes / api / ApiUndelete.php
index b1eeff3..4bbe568 100644 (file)
  */
 class ApiUndelete extends ApiBase {
 
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
        public function execute() {
                $params = $this->extractRequestParams();
 
@@ -45,7 +41,7 @@ class ApiUndelete extends ApiBase {
                }
 
                $titleObj = Title::newFromText( $params['title'] );
-               if ( !$titleObj ) {
+               if ( !$titleObj || $titleObj->isExternal() ) {
                        $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
                }