r93872 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93871‎ | r93872 | r93873 >
Date:01:02, 4 August 2011
Author:jlemley
Status:deferred
Tags:
Comment:
Fixed move and delete bugs. Added parser argument. Fixed formatting. Fixed edit page count.
Modified paths:
  • /branches/REL1_17/extensions/Favorites/FavParser.php (modified) (history)
  • /branches/REL1_17/extensions/Favorites/FavoritedItem.php (modified) (history)
  • /branches/REL1_17/extensions/Favorites/FavoritelistEditor.php (modified) (history)
  • /branches/REL1_17/extensions/Favorites/Favorites.php (modified) (history)
  • /branches/REL1_17/extensions/Favorites/SpecialFavoritelist.php (modified) (history)
  • /branches/REL1_17/extensions/Favorites/favorites.i18n.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/Favorites/FavParser.php
@@ -2,58 +2,66 @@
33
44 class FavParser {
55
6 -function wfSpecialFavoritelist() {
 6+ function wfSpecialFavoritelist($argv, $parser) {
 7+
 8+ global $wgUser, $wgOut, $wgLang, $wgRequest;
 9+ global $wgRCShowFavoritingUsers, $wgEnotifFavoritelist, $wgShowUpdatedMarker;
 10+ $output = '';
711
8 - global $wgUser, $wgOut, $wgLang, $wgRequest;
9 - global $wgRCShowFavoritingUsers, $wgEnotifFavoritelist, $wgShowUpdatedMarker;
10 - $output = '';
11 -
12 - $skin = $wgUser->getSkin();
13 - $specialTitle = SpecialPage::getTitleFor( 'Favoritelist' );
14 - //$wgOut->setRobotPolicy( 'noindex,nofollow' );
15 -
16 - # Anons don't get a favoritelist
17 - if( $wgUser->isAnon() ) {
18 - //$wgOut->setPageTitle( wfMsg( 'favoritenologin' ) );
19 - $llink = $skin->linkKnown(
20 - SpecialPage::getTitleFor( 'Userlogin' ),
21 - wfMsg( 'loginreqlink' ),
22 - array(),
23 - array( 'returnto' => $specialTitle->getPrefixedText() )
24 - );
25 - $output = wfMsgHtml( 'favoritelistanontext', $llink ) ;
 12+ $skin = $wgUser->getSkin();
 13+ $specialTitle = SpecialPage::getTitleFor( 'Favoritelist' );
 14+ //$wgOut->setRobotPolicy( 'noindex,nofollow' );
 15+
 16+ # Anons don't get a favoritelist
 17+ if( $wgUser->isAnon() ) {
 18+ //$wgOut->setPageTitle( wfMsg( 'favoritenologin' ) );
 19+ $llink = $skin->linkKnown(
 20+ SpecialPage::getTitleFor( 'Userlogin' ),
 21+ wfMsg( 'loginreqlink' ),
 22+ array(),
 23+ array( 'returnto' => $specialTitle->getPrefixedText() )
 24+ );
 25+ $output = wfMsgHtml( 'favoritelistanontext', $llink ) ;
 26+
 27+
 28+ return $output ;
 29+
 30+ }
 31+
 32+ $output = $this->viewFavList($wgUser, $output, $wgRequest);
 33+ if ( array_key_exists('editlink', $argv) && $argv['editlink']) {
 34+ # Add an edit link if you want it:
 35+ $output .= "<div id='contentSub'><br>" .
 36+ $skin->link(
 37+ SpecialPage::getTitleFor( 'Favoritelist', 'edit' ),
 38+ wfMsgHtml( "favoritelisttools-edit" ),
 39+ array(),
 40+ array(),
 41+ array( 'known', 'noclasses' )
 42+ ) . "</div>";
 43+ }
 44+
2645 return $output ;
27 -
2846 }
2947
30 -
31 -
3248
33 - $output = $this->viewFavList($wgUser, $output, $wgRequest);
34 - return $output ;
35 -}
36 -
37 -
3849 private function viewFavList ($user, $output, $request) {
39 - global $wgUser, $wgOut, $wgLang, $wgRequest;
40 - $uid = $wgUser->getId();
41 - $output = $this->showNormalForm( $output, $user );
42 -
43 - $dbr = wfGetDB( DB_SLAVE, 'favoritelist' );
 50+ global $wgUser, $wgOut, $wgLang, $wgRequest;
 51+ $uid = $wgUser->getId();
 52+ $output = $this->showNormalForm( $output, $user );
4453
45 -
46 - $favoritelistCount = $dbr->selectField( 'favoritelist', 'COUNT(*)',
47 - array( 'fl_user' => $uid ), __METHOD__ );
48 - // Adjust for page X, talk:page X, which are both stored separately,
49 - // but treated together
50 - $nitems = floor($favoritelistCount);
51 -
52 - if( $nitems == 0 ) {
53 - $output = wfmsg('nofavoritelist');
 54+ $dbr = wfGetDB( DB_SLAVE, 'favoritelist' );
5455
 56+ $favoritelistCount = $dbr->selectField( 'favoritelist', 'COUNT(*)',
 57+ array( 'fl_user' => $uid ), __METHOD__ );
 58+ $nitems = floor($favoritelistCount);
 59+
 60+ if( $nitems == 0 ) {
 61+ $output = wfmsg('nofavoritelist');
 62+
 63+ }
 64+ return $output;
5565 }
56 - return $output;
57 -}
5866
5967
6068 /**
@@ -193,9 +201,10 @@
194202 * @param $user User
195203 */
196204 private function showNormalForm( $output, $user ) {
197 - global $wgUser;
 205+ global $wgUser, $wgOut;
 206+ $skin = $wgUser->getSkin();
198207 if( ( $count = $this->showItemCount( $output, $user ) ) > 0 ) {
199 - $form = $this->buildRemoveList( $user, $wgUser->getSkin() );
 208+ $form = $this->buildRemoveList( $user, $skin );
200209 $output .= $form ;
201210 return $output;
202211 }
@@ -209,15 +218,14 @@
210219 */
211220 private function buildRemoveList( $user, $skin ) {
212221 $list = "";
 222+ $list .= "<ul>\n";
213223 foreach( $this->getFavoritelistInfo( $user ) as $namespace => $pages ) {
214 -
215 - $list .= "<ul>\n";
216224 foreach( $pages as $dbkey => $redirect ) {
217225 $title = Title::makeTitleSafe( $namespace, $dbkey );
218226 $list .= $this->buildRemoveLine( $title, $redirect, $skin );
219227 }
220 - $list .= "</ul>\n";
221228 }
 229+ $list .= "</ul>\n";
222230 return $list;
223231 }
224232
Index: branches/REL1_17/extensions/Favorites/SpecialFavoritelist.php
@@ -449,12 +449,16 @@
450450 */
451451 private function buildRemoveLine( $title, $redirect, $skin ) {
452452 global $wgLang;
453 -
 453+ # In case the user adds something unusual to their list using the raw editor
 454+ # We moved the Tools array completely into the "if( $title->exists() )" section.
 455+ $showlinks=false;
454456 $link = $skin->link( $title );
455457 if( $redirect )
456458 $link = '<span class="favoritelistredir">' . $link . '</span>';
457 - $tools[] = $skin->link( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
 459+
458460 if( $title->exists() ) {
 461+ $showlinks = true;
 462+ $tools[] = $skin->link( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
459463 $tools[] = $skin->link(
460464 $title,
461465 wfMsgHtml( 'history_short' ),
@@ -472,10 +476,15 @@
473477 array( 'known', 'noclasses' )
474478 );
475479 }
476 - return "<li>"
477 - //. Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
 480+
 481+ if ($showlinks) {
 482+ return "<li>"
478483 . $link . " (" . $wgLang->pipeList( $tools ) . ")" . "</li>\n";
 484+ } else {
 485+ return "<li>"
 486+ . $link . "</li>\n";
479487 }
 488+ }
480489
481490 /**
482491 * Show a form for editing the favoritelist in "raw" mode
Index: branches/REL1_17/extensions/Favorites/favorites.i18n.php
@@ -60,7 +60,7 @@
6161 'favoritelistall2' => 'all',
6262
6363 # Favoritelist editor
64 -'favoritelistedit-numitems' => 'Your favorites contain {{PLURAL:$1|1 title|$1 titles}}, excluding talk pages.',
 64+'favoritelistedit-numitems' => 'Your favorites contain {{PLURAL:$1|1 title|$1 titles}}.',
6565 'favoritelistedit-noitems' => 'Your favorites contain no titles.',
6666 'favoritelistedit-normal-title' => 'Edit favorites',
6767 'favoritelistedit-normal-legend' => 'Remove titles from favorites',
@@ -120,7 +120,7 @@
121121 'tooltip-ca-unfavorite' => 'Entferne diese Seite von deiner Favoritenliste',
122122 'tooltip-favorite' => 'Füge diese Seite zu deiner Favoritenliste hinzu',
123123 'favoritelistall2' => 'alle',
124 - 'favoritelistedit-numitems' => 'Deine Favoritenliste enthält {{PLURAL:$1|einen Eintrag |$1 Einträge}}. Die Diskussionsseiten wurden dabei nicht mitgezählt.',
 124+ 'favoritelistedit-numitems' => 'Deine Favoritenliste enthält {{PLURAL:$1|einen Eintrag |$1 Einträge}}.',
125125 'favoritelistedit-noitems' => 'Deine Favoritenliste enthält keine Einträge.',
126126 'favoritelistedit-normal-title' => 'Favoritenliste bearbeiten',
127127 'favoritelistedit-normal-legend' => 'Einträge aus der Favoritenliste entfernen',
@@ -158,7 +158,7 @@
159159 'tooltip-ca-favorite' => 'Fügen Sie diese Seite zu Ihrer Favoritenliste hinzu',
160160 'tooltip-ca-unfavorite' => 'Entfernen Sie diese Seite von Ihrer Favoritenliste',
161161 'tooltip-favorite' => 'Fügen Sie diese Seite zu Ihrer Favoritenliste hinzu',
162 - 'favoritelistedit-numitems' => 'Ihre Favoritenliste enthält {{PLURAL:$1|einen Eintrag|$1 Einträge}}. Die Diskussionsseiten wurden dabei nicht mitgezählt.',
 162+ 'favoritelistedit-numitems' => 'Ihre Favoritenliste enthält {{PLURAL:$1|einen Eintrag|$1 Einträge}}.',
163163 'favoritelistedit-noitems' => 'Ihre Favoritenliste enthält keine Einträge.',
164164 'favoritelistedit-normal-explain' => 'Dies sind die Einträge Ihrer Favoritenliste.
165165 Um Einträge zu entfernen, markieren Sie die Kästchen neben den Einträgen und klicken Sie am Ende der Seite auf „{{int:Favoritelistedit-normal-submit}}“.
@@ -205,17 +205,69 @@
206206 * @author Bjankuloski06
207207 */
208208 $messages['mk'] = array(
 209+ 'favorites-desc' => 'Создај список на бендисани',
 210+ 'favoritethis' => 'Бендисај ја станицава',
 211+ 'prefs-favoritelist' => 'Бендисани',
 212+ 'prefs-favoritelist-token' => 'Жетон за бендисани:',
 213+ 'prefs-advancedfavoritelist' => 'Напредни поставки',
 214+ 'favoritelist' => 'Мои бендисани',
 215+ 'myfavoritelist' => 'Мои бендисани',
209216 'favoritelistfor' => "(за '''$1''')",
 217+ 'nofavoritelist' => 'Немате бендисани.',
 218+ 'favoritelistanontext' => '$1 за да ги погледате или уредите бендисаните.',
 219+ 'favoritenologin' => 'Не сте најавени',
 220+ 'favoritenologintext' => 'Мора да сте [[Special:UserLogin|најавени]] за да можете да ги менувате бендисаните.',
 221+ 'addedfavorite' => 'Додадено во бендисаните',
 222+ 'addedfavoritetext' => 'Страницата „[[:$1]]“ е додадена во [[Special:Favoritelist|бендисаните]].',
 223+ 'removedfavorite' => 'Отстрането од бендисаните',
 224+ 'removedfavoritetext' => 'Страницата „[[:$1]]“ е отстранета од [[Special:Favoritelist|бендисаните]].',
 225+ 'favorite' => 'Бендисај',
 226+ 'favoritethispage' => 'Бендисај ја страницава',
 227+ 'unfavorite' => 'Одбендисај',
 228+ 'unfavoritethispage' => 'Одбендисај ја страницава',
 229+ 'favoritelist-options' => 'Поставки за бендисани',
210230 'favoriteing' => 'Бендисувам...',
211231 'unfavoriteing' => 'Одбендисувам...',
 232+ 'tooltip-pt-favoritelist' => 'Список на страници кои сте избрале да ги набљудувате',
 233+ 'tooltip-ca-favorite' => 'Додај ја страницава во бендисаните',
 234+ 'tooltip-ca-unfavorite' => 'Отстрани ја страницава од бендисаните',
 235+ 'tooltip-favorite' => 'Додај ја страницава во бендисаните',
212236 'favoritelistall2' => 'сите',
 237+ 'favoritelistedit-numitems' => 'Во бендисаните има {{PLURAL:$1|1 наслов|$1 наслови}}.',
 238+ 'favoritelistedit-noitems' => 'Немате наслови во бендисаните.',
 239+ 'favoritelistedit-normal-title' => 'Уреди бендисани',
 240+ 'favoritelistedit-normal-legend' => 'Отстрани наслови од бендисаните',
 241+ 'favoritelistedit-normal-explain' => 'Насловите во вашиот список на набљудувања се прикажани подолу.
 242+За да избришете наслов, штиклирајте го квадратчето лево од насловот, и стиснете на „{{int:Favoritelistedit-normal-submit}}“.
 243+Можете да го [[Special:Favoritelist/raw|уредите сировниот список]].',
 244+ 'favoritelistedit-normal-submit' => 'Отстрани наслови',
 245+ 'favoritelistedit-normal-done' => '{{PLURAL:$1|1 наслов|$1 наслови}} се отстранети од бендисаните:',
 246+ 'favoritelistedit-raw-title' => 'Уреди сиров список на бендисани',
 247+ 'favoritelistedit-raw-legend' => 'Уреди сиров список на бендисани',
 248+ 'favoritelistedit-raw-explain' => 'Насловите во бендисаните се прикажани подолу, и можат да се уредуваат со додавање или бришење на ставки од списокот;
 249+по еден наслов во секој ред.
 250+Кога ќе завршите, стиснете на „{{int:Favoritelistedit-raw-submit}}“.
 251+Можете и да го [[Special:Favoritelist/edit|употребите обичниот уредувач]].',
213252 'favoritelistedit-raw-titles' => 'Наслови:',
 253+ 'favoritelistedit-raw-submit' => 'Поднови бендисани',
 254+ 'favoritelistedit-raw-done' => 'Бендисаните се подновени.',
 255+ 'favoritelistedit-raw-added' => '{{PLURAL:$1|Додаден е 1 наслов|Додадени се $1 наслови}}:',
 256+ 'favoritelistedit-raw-removed' => '{{PLURAL:$1|Отстранет е 1 наслов|Отстранети се $1 наслови}}:',
 257+ 'favoritelisttools-view' => 'Погледај „Бендисани“',
 258+ 'favoritelisttools-edit' => 'Погледај и уреди „Бендисани“',
 259+ 'favoritelisttools-raw' => 'Уреди сирови бендисани',
214260 );
215261
216262 /** Dutch (Nederlands)
 263+ * @author SPQRobin
217264 * @author Siebrand
218265 */
219266 $messages['nl'] = array(
 267+ 'prefs-favoritelist' => 'Favorieten',
 268+ 'favoritelist' => 'Mijn favorieten',
 269+ 'myfavoritelist' => 'Mijn favorieten',
 270+ 'favoritelistfor' => "(voor '''$1''')",
 271+ 'favoritenologin' => 'Niet aangemeld',
220272 'favoritelistall2' => 'alle',
221273 'favoritelistedit-normal-submit' => "Pagina's verwijderen",
222274 'favoritelistedit-normal-done' => 'Er {{PLURAL:$1|is 1 pagina|zijn $1 pagina’s}} verwijderd uit uw favorieten:',
@@ -268,7 +320,7 @@
269321 'tooltip-ca-unfavorite' => 'Remover esta página das páginas preferidas',
270322 'tooltip-favorite' => 'Adicionar esta página às suas preferidas',
271323 'favoritelistall2' => 'todas',
272 - 'favoritelistedit-numitems' => 'A sua lista de páginas preferidas contém {{PLURAL:$1|uma página|$1 páginas}}, excluindo páginas de discussão.',
 324+ 'favoritelistedit-numitems' => 'A sua lista de páginas preferidas contém {{PLURAL:$1|uma página|$1 páginas}}.',
273325 'favoritelistedit-noitems' => 'A sua lista de página preferidas está vazia.',
274326 'favoritelistedit-normal-title' => 'Editar a lista de preferidas',
275327 'favoritelistedit-normal-legend' => 'Remover páginas das preferidas',
Index: branches/REL1_17/extensions/Favorites/FavoritedItem.php
@@ -89,7 +89,7 @@
9090 */
9191 public static function duplicateEntries( $ot, $nt ) {
9292 FavoritedItem::doDuplicateEntries( $ot->getSubjectPage(), $nt->getSubjectPage() );
93 - FavoritedItem::doDuplicateEntries( $ot->getTalkPage(), $nt->getTalkPage() );
 93+ //FavoritedItem::doDuplicateEntries( $ot->getTalkPage(), $nt->getTalkPage() );
9494 }
9595
9696 /**
@@ -126,6 +126,12 @@
127127 # Note that multi-row replace is very efficient for MySQL but may be inefficient for
128128 # some other DBMSes, mostly due to poor simulation by us
129129 $dbw->replace( 'favoritelist', array( array( 'fl_user', 'fl_namespace', 'fl_title' ) ), $values, __METHOD__ );
 130+
 131+ # Delete the old item - we don't need to have the old page on the list of favorites.
 132+ $dbw->delete('favoritelist', array(
 133+ 'fl_namespace' => $oldnamespace,
 134+ 'fl_title' => $oldtitle),
 135+ $fname = 'Database::delete');
130136 return true;
131137 }
132138 }
Index: branches/REL1_17/extensions/Favorites/FavoritelistEditor.php
@@ -150,7 +150,7 @@
151151 }
152152
153153 /**
154 - * Count the number of titles on a user's favoritelist, excluding talk pages
 154+ * Count the number of titles on a user's favoritelist
155155 *
156156 * @param $user User
157157 * @return int
@@ -159,11 +159,11 @@
160160 $dbr = wfGetDB( DB_MASTER );
161161 $res = $dbr->select( 'favoritelist', 'COUNT(*) AS count', array( 'fl_user' => $user->getId() ), __METHOD__ );
162162 $row = $dbr->fetchObject( $res );
163 - return ceil( $row->count / 2 ); // Paranoia
 163+ return ceil( $row->count);
164164 }
165165
166166 /**
167 - * Prepare a list of titles on a user's favoritelist (excluding talk pages)
 167+ * Prepare a list of titles on a user's favoritelist
168168 * and return an array of (prefixed) strings
169169 *
170170 * @param $user User
@@ -192,7 +192,7 @@
193193 }
194194
195195 /**
196 - * Get a list of titles on a user's favoritelist, excluding talk pages,
 196+ * Get a list of titles on a user's favoritelist,
197197 * and return as a two-dimensional array with namespace, title and
198198 * redirect status
199199 *
@@ -220,7 +220,7 @@
221221 $cache->addBadLinkObj( $title );
222222 }
223223 // Ignore non-talk
224 - if( !$title->isTalkPage() )
 224+ //if( !$title->isTalkPage() )
225225 $titles[$row->fl_namespace][$row->fl_title] = $row->page_is_redirect;
226226 }
227227 }
@@ -274,12 +274,6 @@
275275 if( $title instanceof Title ) {
276276 $rows[] = array(
277277 'fl_user' => $user->getId(),
278 - 'fl_namespace' => ( $title->getNamespace() & ~1 ),
279 - 'fl_title' => $title->getDBkey(),
280 - 'fl_notificationtimestamp' => null,
281 - );
282 - $rows[] = array(
283 - 'fl_user' => $user->getId(),
284278 'fl_namespace' => ( $title->getNamespace() | 1 ),
285279 'fl_title' => $title->getDBkey(),
286280 'fl_notificationtimestamp' => null,
@@ -308,15 +302,6 @@
309303 'favoritelist',
310304 array(
311305 'fl_user' => $user->getId(),
312 - 'fl_namespace' => ( $title->getNamespace() & ~1 ),
313 - 'fl_title' => $title->getDBkey(),
314 - ),
315 - __METHOD__
316 - );
317 - $dbw->delete(
318 - 'favoritelist',
319 - array(
320 - 'fl_user' => $user->getId(),
321306 'fl_namespace' => ( $title->getNamespace() | 1 ),
322307 'fl_title' => $title->getDBkey(),
323308 ),
@@ -370,12 +355,12 @@
371356 $list .= $skin->makeHeadLine( 2, ">", $anchor, $heading, "" );
372357 $toc .= $skin->tocLine( $anchor, $heading, $tocLength, 1 ) . $skin->tocLineEnd();
373358
374 - $list .= "<ul>\n";
 359+ $list .= "\n";
375360 foreach( $pages as $dbkey => $redirect ) {
376361 $title = Title::makeTitleSafe( $namespace, $dbkey );
377362 $list .= $this->buildRemoveLine( $title, $redirect, $skin );
378363 }
379 - $list .= "</ul>\n";
 364+ $list .= "\n";
380365 }
381366 // ISSUE: omit the TOC if the total number of titles is low?
382367 if( $tocLength > 1 ) {
@@ -407,12 +392,15 @@
408393 */
409394 private function buildRemoveLine( $title, $redirect, $skin ) {
410395 global $wgLang;
411 -
 396+ # In case the user adds something unusual to their list using the raw editor
 397+ # We moved the Tools array completely into the "if( $title->exists() )" section.
 398+ $showlinks=false;
412399 $link = $skin->link( $title );
413400 if( $redirect )
414401 $link = '<span class="favoritelistredir">' . $link . '</span>';
415 - $tools[] = $skin->link( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
416402 if( $title->exists() ) {
 403+ $showlinks = true;
 404+ $tools[] = $skin->link( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
417405 $tools[] = $skin->link(
418406 $title,
419407 wfMsgHtml( 'history_short' ),
@@ -430,10 +418,18 @@
431419 array( 'known', 'noclasses' )
432420 );
433421 }
434 - return "<li>"
435 - . Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
436 - . $link . " (" . $wgLang->pipeList( $tools ) . ")" . "</li>\n";
 422+
 423+ if ($showlinks) {
 424+ return
 425+ Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
 426+ . $link . " (" . $wgLang->pipeList( $tools ) . ")" . "\n<br>";
 427+ } else {
 428+ return
 429+ Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
 430+ . $link . "\n<br>";
437431 }
 432+
 433+ }
438434
439435 /**
440436 * Show a form for editing the favoritelist in "raw" mode
Index: branches/REL1_17/extensions/Favorites/Favorites.php
@@ -22,7 +22,7 @@
2323 'name' => 'Favorites',
2424 'author' => 'Jeremy Lemley',
2525 'descriptionmsg' => 'favorites-desc',
26 - 'version' => '0.0.7',
 26+ 'version' => '0.1.4',
2727 'url' => "http://www.mediawiki.org/wiki/Extension:Favorites",
2828 );
2929
@@ -55,8 +55,9 @@
5656 //add or remove
5757 $wgHooks['UnknownAction'][] = 'fnAction';
5858
59 -//handle page moves
 59+//handle page moves and deletes
6060 $wgHooks['TitleMoveComplete'][] = 'fnHookMoveToFav';
 61+$wgHooks['ArticleDeleteComplete'][] = 'fnHookDeleteFav';
6162
6263 //add CSS
6364 $wgHooks['BeforePageDisplay'][] = 'fnAddCss';
@@ -96,6 +97,14 @@
9798 return true;
9899 }
99100
 101+function fnHookDeleteFav(&$article, &$user, $reason, $id ){
 102+ $dbw = wfGetDB( DB_MASTER );
 103+ $dbw->delete('favoritelist', array(
 104+ 'fl_title' => $article->mTitle->getDBKey()),
 105+ $fname = 'Database::delete');
 106+ return true;
 107+}
 108+
100109 function fnAddCss (&$out) {
101110 global $wgScriptPath;
102111 $out->addStyle($wgScriptPath. '/extensions/favorites/favorites.css');
@@ -115,10 +124,10 @@
116125 # The parser function itself
117126 # The input parameters are wikitext with templates expanded
118127 # The output should be wikitext too
119 - $output = "Parser Output goes here.";
 128+ //$output = "Parser Output goes here.";
120129
121130 $favParse = new FavParser();
122 - $output = $favParse->wfSpecialFavoritelist();
 131+ $output = $favParse->wfSpecialFavoritelist($argv, $parser);
123132 $parser->disableCache();
124133 return $output;
125134

Status & tagging log