*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*/
$titles = array();
$count = 0;
$result = $this->getResult();
- while ( $row = $db->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
if ( ++ $count > $limit ) {
// We've reached the one extra which shows that there are additional pages to be had. Stop here...
// TODO: Security issue - if the user has no right to view next title, it will still be shown
$titles[] = Title::makeTitle( NS_IMAGE, $row->img_name );
}
}
- $db->freeResult( $res );
if ( is_null( $resultPageSet ) ) {
$result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'img' );
public function getParamDescription() {
return array(
- 'from' => 'The image title to start enumerating from.',
- 'prefix' => 'Search for all image titles that begin with this value.',
+ 'from' => 'The image title to start enumerating from',
+ 'prefix' => 'Search for all image titles that begin with this value',
'dir' => 'The direction in which to list',
'minsize' => 'Limit to images with at least this many bytes',
'maxsize' => 'Limit to images with at most this many bytes',
- 'limit' => 'How many total images to return.',
- 'sha1' => 'SHA1 hash of image. Overrides sha1base36',
+ 'limit' => 'How many images in total to return',
+ 'sha1' => "SHA1 hash of image. Overrides {$this->getModulePrefix()}sha1base36",
'sha1base36' => 'SHA1 hash of image in base 36 (used in MediaWiki)',
- 'prop' => 'Which properties to get',
+ 'prop' => array(
+ 'Which properties to get',
+ ' timestamp - Adds the timestamp when the image was upload',
+ ' user - Adds the username of the last uploader',
+ ' comment - Adds the comment of the last upload',
+ ' url - Adds the URL of the image and its description page',
+ ' size - Adds the size of the image in bytes and its height and width',
+ ' dimensions - Alias of size',
+ ' sha1 - Adds the sha1 of the image',
+ ' mime - Adds the MIME of the image',
+ ' thumbmime - Adds the MIME of the tumbnail for the image',
+ ' archivename - Adds the file name of the archive version for non-latest versions',
+ ' bitdepth - Adds the bit depth of the version',
+ ),
);
}