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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14373, the corresponding Phabricator task for complete and up-to-date bug report information.
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