From: <var...@us...> - 2014-10-07 08:31:59
|
Revision: 9208 http://sourceforge.net/p/phpwiki/code/9208 Author: vargenau Date: 2014-10-07 08:31:56 +0000 (Tue, 07 Oct 2014) Log Message: ----------- Remove useless function fixTitleEncoding Modified Paths: -------------- trunk/lib/main.php trunk/lib/stdlib.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-10-07 08:27:17 UTC (rev 9207) +++ trunk/lib/main.php 2014-10-07 08:31:56 UTC (rev 9208) @@ -865,8 +865,6 @@ /** * Generally pagename is rawurlencoded for older browsers or mozilla. - * Typing a pagename into the IE bar will utf-8 encode it, so we have to - * fix that with fixTitleEncoding(). * If USE_PATH_INFO = true, the pagename is stripped from the "/DATA_PATH/PageName&arg=value" line. * If false, we support either "/index.php?pagename=PageName&arg=value", * or the first arg (1.2.x style): "/index.php?PageName&arg=value" @@ -874,7 +872,7 @@ function _deducePagename() { if (trim(rawurldecode($this->getArg('pagename')))) - return fixTitleEncoding(rawurldecode($this->getArg('pagename'))); + return rawurldecode($this->getArg('pagename')); if (USE_PATH_INFO) { $pathinfo = $this->get('PATH_INFO'); @@ -887,7 +885,7 @@ $tail = substr($pathinfo, strlen(PATH_INFO_PREFIX)); if (trim($tail) != '' and $pathinfo == PATH_INFO_PREFIX . $tail) { - return fixTitleEncoding($tail); + return $tail; } } elseif ($this->isPost()) { /* @@ -904,7 +902,7 @@ */ global $HTTP_GET_VARS; if (isset($HTTP_GET_VARS['pagename']) and trim($HTTP_GET_VARS['pagename'])) { - return fixTitleEncoding(rawurldecode($HTTP_GET_VARS['pagename'])); + return rawurldecode($HTTP_GET_VARS['pagename']); } } @@ -914,10 +912,10 @@ */ $query_string = $this->get('QUERY_STRING'); if (trim(rawurldecode($query_string)) and preg_match('/^([^&=]+)(&.+)?$/', $query_string, $m)) { - return fixTitleEncoding(rawurldecode($m[1])); + return rawurldecode($m[1]); } - return fixTitleEncoding(HOME_PAGE); + return HOME_PAGE; } function _deduceAction() Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-07 08:27:17 UTC (rev 9207) +++ trunk/lib/stdlib.php 2014-10-07 08:31:56 UTC (rev 9208) @@ -73,7 +73,6 @@ phpwiki_version () isWikiWord ($word) obj2hash ($obj, $exclude = false, $fields = false) - fixTitleEncoding ($s) url_get_contents ($uri) GenerateId ($name) firstNWordsOfContent ($n, $content) @@ -1776,19 +1775,6 @@ } /** - * Check for UTF-8 URLs; Internet Explorer produces these if you - * type non-ASCII chars in the URL bar or follow unescaped links. - * Requires urldecoded pagename. - * Fixes sf.net bug #953949 - * - * src: languages/Language.php:checkTitleEncoding() from mediawiki - */ -function fixTitleEncoding($s) -{ - return $s; -} - -/** * Workaround for allow_url_fopen, to get the content of an external URI. * It returns the contents in one slurp. Parsers might want to check for allow_url_fopen * and use fopen, fread chunkwise. (see lib/XmlParser.php) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |