Removed intval for undelete reason in API
authorPetr Onderka <gsvick@gmail.com>
Tue, 1 May 2012 22:04:11 +0000 (00:04 +0200)
committerPetr Onderka <gsvick@gmail.com>
Tue, 1 May 2012 22:04:11 +0000 (00:04 +0200)
Undelete reason is a string, it doesn't make sense to use
intval() to change it into an integer.

Change-Id: I76553d6a22305dca8cdc5d676ad60a9b146a0212

includes/api/ApiUndelete.php

index d342997..856e2ac 100644 (file)
@@ -76,7 +76,7 @@ class ApiUndelete extends ApiBase {
                $info['title'] = $titleObj->getPrefixedText();
                $info['revisions'] = intval( $retval[0] );
                $info['fileversions'] = intval( $retval[1] );
-               $info['reason'] = intval( $retval[2] );
+               $info['reason'] = $retval[2];
                $this->getResult()->addValue( null, $this->getModuleName(), $info );
        }