Last modified: 2007-12-28 08:22:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12373 - Deprecated "getPrefixedText()" function still used in Special:Browse
Deprecated "getPrefixedText()" function still used in Special:Browse
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-21 20:53 UTC by Yaron Koren
Modified: 2007-12-28 08:22 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yaron Koren 2007-12-21 20:53:00 UTC
The function SMWWikiPageValue::getPrefixedText(), which is deprecated, is still being used in two places in the "Special:Browse" page. This leads to PHP "notice" messages, which show up on the screen if the wiki's site has PHP set to "debug" mode. Thankfully, there's an easy fix; below is my patch for fixing the problem, using the replacement function, SMWWikiPageValue::getLongWikiText().

-Yaron


Index: specials/SearchTriple/SMW_SpecialBrowse.php
===================================================================
--- specials/SearchTriple/SMW_SpecialBrowse.php (revision 28756)
+++ specials/SearchTriple/SMW_SpecialBrowse.php (working copy)
@@ -135,7 +135,7 @@
                                                $html .= $skin->makeKnownLinkObj($subject, smwfT($subject, TRUE)) . ' ' . $subjectlink->getHTML($skin);
                                                if ($innercount<$subjectcount) $html .= ", \n";
                                        } else {
-                                               $html .= '<a href="' . $skin->makeSpecialUrl('SearchByProperty', 'property=' . urlencode($result->getPrefixedText()) . '&value=' . urlencode($article->getPrefixedText())) . '">' . wfMsg("smw_browse_more") . "</a>\n";
+                                               $html .= '<a href="' . $skin->makeSpecialUrl('SearchByProperty', 'property=' . urlencode($result->getPrefixedText()) . '&value=' . urlencode($article->getLongWikiText())) . '">' . wfMsg("smw_browse_more") . "</a>\n";
                                        }
                                  }
                                  // replace the last two whitespaces in the relation name with
@@ -207,7 +207,7 @@
                                  $count = count($cats);
                                  foreach ($cats as $cat) {
                                        $count -= 1;
-                                       $browselink = SMWInfolink::newBrowsingLink('+', $cat->getPrefixedText());
+                                       $browselink = SMWInfolink::newBrowsingLink('+', $cat->getLongWikiText());
                                        $html .= $cat->getLongHTMLText($skin) . '&nbsp;' . $browselink->getHTML($skin);
                                        if ($count > 0) $html .= ", ";
                                  }

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links