r88828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88827‎ | r88828 | r88829 >
Date:20:12, 25 May 2011
Author:yuvipanda
Status:ok
Tags:
Comment:
Switched from Title::getText() to Title::getDBkey()
Modified paths:
  • /trunk/extensions/ShortUrl/ShortUrl.functions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ShortUrl/ShortUrl.functions.php
@@ -51,7 +51,7 @@
5252 $query = $dbr->select(
5353 'shorturls',
5454 array( 'su_id' ),
55 - array( 'su_namespace' => $title->getNamespace(), 'su_title' => $title->getText() ),
 55+ array( 'su_namespace' => $title->getNamespace(), 'su_title' => $title->getDBkey() ),
5656 __METHOD__ );
5757 if ( $dbr->numRows( $query ) > 0 ) {
5858 $entry = $dbr->fetchRow( $query );
@@ -61,7 +61,7 @@
6262 $row_data = array(
6363 'su_id' => $dbw->nextSequenceValue( 'shorturls_id_seq' ),
6464 'su_namespace' => $title->getNamespace(),
65 - 'su_title' => $title->getText()
 65+ 'su_title' => $title->getDBkey()
6666 );
6767 $dbw->insert( 'shorturls', $row_data );
6868 $id = $dbw->insertId();

Status & tagging log