[TASK] Adhere to CGL: t3lib_div::getUrl() instead of t3lib_div::getURL()
authorErnesto Baschny <ernst@cron-it.de>
Thu, 7 Jul 2011 18:55:11 +0000 (20:55 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Thu, 7 Jul 2011 20:40:54 +0000 (22:40 +0200)
Change-Id: If9ad418a4a70985cd661d1dd9c6f07498e833d95
Resolves: #24551
Releases: 4.6
Reviewed-on: http://review.typo3.org/3111
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
17 files changed:
t3lib/class.t3lib_div.php
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_pagerenderer.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_tceforms.php
typo3/backend.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php
typo3/sysext/em/classes/index.php
typo3/sysext/em/classes/repository/class.tx_em_repository_utility.php
typo3/sysext/em/classes/tools/class.tx_em_tools.php
typo3/sysext/indexed_search/class.indexer.php
typo3/sysext/lowlevel/config/index.php
typo3/sysext/t3editor/classes/class.tx_t3editor.php
typo3/sysext/tsconfig_help/mod1/index.php
typo3/template.php

index 9e17c93..a24c01b 100644 (file)
  * 2242:        function xmlGetHeaderAttribs($xmlData)
  *
  *                       SECTION: FILES FUNCTIONS
- * 2275:        function getURL($url, $includeHeader=0)
+ * 2275:        function getUrl($url, $includeHeader=0)
  * 2342:        function writeFile($file,$content)
  * 2367:        function fixPermissions($file)
  * 2384:        function writeFileToTypo3tempDir($filepath,$content)
@@ -2723,7 +2723,7 @@ final class t3lib_div {
         * @param       array                   Error code/message and, if $includeHeader is 1, response meta data (HTTP status and content type)
         * @return      string  The content from the resource given as input. FALSE if an error has occured.
         */
-       public static function getURL($url, $includeHeader = 0, $requestHeaders = FALSE, &$report = NULL) {
+       public static function getUrl($url, $includeHeader = 0, $requestHeaders = FALSE, &$report = NULL) {
                $content = FALSE;
 
                if (isset($report)) {
index c81ae1b..d0fcb9c 100644 (file)
@@ -80,7 +80,7 @@
  * 1189:        function makeBase64($inputstr)
  * 1200:        function getExtendedURL($url)
  * 1222:        function addUserPass($url)
- * 1238:        function getURL($url)
+ * 1238:        function getUrl($url)
  * 1250:        function getStrippedURL($url)
  * 1271:        function getMimeType($url)
  * 1300:        function absRef($ref)
@@ -868,7 +868,7 @@ class t3lib_htmlmail {
         */
        public function fetchHTML($file) {
                        // Fetches the content of the page
-               $this->theParts['html']['content'] = $this->getURL($file);
+               $this->theParts['html']['content'] = $this->getUrl($file);
                if ($this->theParts['html']['content']) {
                        $addr = $this->extParseUrl($file);
                        $path = ($addr['scheme']) ? $addr['scheme'] . '://' . $addr['host'] . (($addr['port']) ? ':' . $addr['port'] : '') . (($addr['filepath']) ? $addr['filepath'] : '/') : $addr['filepath'];
@@ -1231,7 +1231,7 @@ class t3lib_htmlmail {
         */
        public function getExtendedURL($url) {
                $res = array();
-               $res['content'] = $this->getURL($url);
+               $res['content'] = $this->getUrl($url);
                if (!$res['content']) {
                        return FALSE;
                }
@@ -1286,9 +1286,9 @@ class t3lib_htmlmail {
         * @param       string          $url: the URL to fetch
         * @return      string          the content of the URL
         */
-       public function getURL($url) {
+       public function getUrl($url) {
                $url = $this->addUserPass($url);
-               return t3lib_div::getURL($url);
+               return t3lib_div::getUrl($url);
        }
 
 
@@ -1322,7 +1322,7 @@ class t3lib_htmlmail {
         */
        public function getMimeType($url) {
                $mimeType = '';
-               $headers = trim(t3lib_div::getURL($url, 2));
+               $headers = trim(t3lib_div::getUrl($url, 2));
                if ($headers) {
                        $matches = array();
                        if (preg_match('/(Content-Type:[\s]*)([a-zA-Z_0-9\/\-\.\+]*)([\s]|$)/', $headers, $matches)) {
index fd93b9b..265dc1a 100644 (file)
@@ -1553,7 +1553,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
 
                        // get template
                $templateFile = t3lib_div::getFileAbsFileName($this->templateFile, TRUE);
-               $template = t3lib_div::getURL($templateFile);
+               $template = t3lib_div::getUrl($templateFile);
 
                if ($this->removeLineBreaksFromTemplate) {
                        $template = strtr($template, array(LF => '', CR => ''));
index 809f425..973cb87 100644 (file)
@@ -59,7 +59,7 @@
  * 1019:        function TS_strip_db($value)
  *
  *                       SECTION: Generic RTE transformation, analysis and helper functions
- * 1050:        function getURL($url)
+ * 1050:        function getUrl($url)
  * 1064:        function HTMLcleaner_db($content,$tagList='')
  * 1091:        function getKeepTags($direction='rte',$tagList='')
  * 1200:        function divideIntoLines($value,$count=5,$returnArray=FALSE)
@@ -1042,10 +1042,10 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
         *
         * @param       string          Filepath/URL to read
         * @return      string          The content from the resource given as input.
-        * @see t3lib_div::getURL()
+        * @see t3lib_div::getUrl()
         */
-       function getURL($url) {
-               return t3lib_div::getURL($url);
+       function getUrl($url) {
+               return t3lib_div::getUrl($url);
        }
 
        /**
index 0dce214..3e32d8c 100644 (file)
@@ -4900,7 +4900,7 @@ class t3lib_TCEforms {
         * @return      void
         */
        function setNewBEDesign() {
-               $template = t3lib_div::getURL(PATH_typo3 . $this->templateFile);
+               $template = t3lib_div::getUrl(PATH_typo3 . $this->templateFile);
 
                        // Wrapping all table rows for a particular record being edited:
                $this->totalWrap = t3lib_parsehtml::getSubpart($template, '###TOTALWRAP###');
index 0840750..9115a81 100644 (file)
@@ -307,7 +307,7 @@ class TYPO3backend {
                        $cssFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'css/', 'css');
                        if (file_exists($absoluteComponentPath . 'css/loadorder.txt')) {
                                        //don't allow inclusion outside directory
-                               $loadOrder = str_replace('../', '', t3lib_div::getURL($absoluteComponentPath . 'css/loadorder.txt'));
+                               $loadOrder = str_replace('../', '', t3lib_div::getUrl($absoluteComponentPath . 'css/loadorder.txt'));
                                $cssFilesOrdered = t3lib_div::trimExplode(LF, $loadOrder, TRUE);
                                $cssFiles = array_merge($cssFilesOrdered, $cssFiles);
                        }
@@ -318,7 +318,7 @@ class TYPO3backend {
                        $jsFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'javascript/', 'js');
                        if (file_exists($absoluteComponentPath . 'javascript/loadorder.txt')) {
                                        //don't allow inclusion outside directory
-                               $loadOrder = str_replace('../', '', t3lib_div::getURL($absoluteComponentPath . 'javascript/loadorder.txt'));
+                               $loadOrder = str_replace('../', '', t3lib_div::getUrl($absoluteComponentPath . 'javascript/loadorder.txt'));
                                $jsFilesOrdered = t3lib_div::trimExplode(LF, $loadOrder, TRUE);
                                $jsFiles = array_merge($jsFilesOrdered, $jsFiles);
                        }
index fff53b2..f7e14d7 100644 (file)
                                'User-agent: ' . t3lib_div::getIndpEnv('HTTP_USER_AGENT'),
                                'Referer: ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')
                        );
-                       $res = t3lib_div::getURL($code, 1, $headerArr);
+                       $res = t3lib_div::getUrl($code, 1, $headerArr);
 
                                // Header and content are separated by an empty line
                        list($header, $content) = explode(CRLF . CRLF, $res, 2);
@@ -4995,4 +4995,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/class.tslib_fe.php']);
 }
 
-?>
\ No newline at end of file
+?>
index 9315ab8..f07cf42 100644 (file)
@@ -425,7 +425,7 @@ class tx_em_Connection_ExtDirectServer {
        public function readExtFile($path) {
                $path = PATH_site . $path;
                if (@file_exists($path)) {
-                       return t3lib_div::getURL($path);
+                       return t3lib_div::getUrl($path);
                }
                return '';
        }
index e324c15..834810d 100644 (file)
@@ -63,7 +63,7 @@ class tx_em_Connection_Ter {
        function fetchExtension($extKey, $version, $expectedMD5, $mirrorURL) {
                $extPath = t3lib_div::strtolower($extKey);
                $mirrorURL .= $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '_' . $version . '.t3x';
-               $t3x = t3lib_div::getURL($mirrorURL, 0, array(TYPO3_user_agent));
+               $t3x = t3lib_div::getUrl($mirrorURL, 0, array(TYPO3_user_agent));
                $MD5 = md5($t3x);
 
                if ($t3x === FALSE) {
@@ -89,7 +89,7 @@ class tx_em_Connection_Ter {
        function fetchTranslation($extKey, $lang, $mirrorURL) {
                $extPath = t3lib_div::strtolower($extKey);
                $mirrorURL .= $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '-l10n/' . $extPath . '-l10n-' . $lang . '.zip';
-               $l10n = t3lib_div::getURL($mirrorURL, 0, array(TYPO3_user_agent));
+               $l10n = t3lib_div::getUrl($mirrorURL, 0, array(TYPO3_user_agent));
 
                if ($l10n !== FALSE) {
                        return array($l10n);
@@ -132,7 +132,7 @@ class tx_em_Connection_Ter {
        function fetchTranslationStatus($extKey, $mirrorURL) {
                $extPath = t3lib_div::strtolower($extKey);
                $mirrorURL .= $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '-l10n/' . $extPath . '-l10n.xml';
-               $remote = t3lib_div::getURL($mirrorURL, 0, array(TYPO3_user_agent));
+               $remote = t3lib_div::getUrl($mirrorURL, 0, array(TYPO3_user_agent));
 
                if ($remote !== FALSE) {
                        $parsed = $this->emObj->xmlHandler->parseL10nXML($remote);
index c2576d8..336e2e3 100644 (file)
@@ -1102,7 +1102,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                switch ($metaType) {
                        case 'mirrors':
                                $mfile = t3lib_div::tempnam('mirrors');
-                               $mirrorsFile = t3lib_div::getURL($this->MOD_SETTINGS['mirrorListURL'], 0, array(TYPO3_user_agent));
+                               $mirrorsFile = t3lib_div::getUrl($this->MOD_SETTINGS['mirrorListURL'], 0, array(TYPO3_user_agent));
                                if ($mirrorsFile===FALSE) {
                                        t3lib_div::unlink_tempfile($mfile);
                                        $content = '<p>' .
@@ -1134,7 +1134,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
 
                                $mirror = $this->getMirrorURL();
                                $extfile = $mirror . 'extensions.xml.gz';
-                               $extmd5 = t3lib_div::getURL($mirror . 'extensions.md5', 0, array(TYPO3_user_agent));
+                               $extmd5 = t3lib_div::getUrl($mirror . 'extensions.md5', 0, array(TYPO3_user_agent));
                                if (is_file(PATH_site . 'typo3temp/extensions.xml.gz')) {
                                        $localmd5 = md5_file(PATH_site . 'typo3temp/extensions.xml.gz');
                                }
@@ -1157,7 +1157,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                        );
                                        $content .= $flashMessage->render();
                                } else {
-                                       $extXML = t3lib_div::getURL($extfile, 0, array(TYPO3_user_agent));
+                                       $extXML = t3lib_div::getUrl($extfile, 0, array(TYPO3_user_agent));
                                        if ($extXML === FALSE) {
                                                $content .= '<p>' .
                                                                sprintf($GLOBALS['LANG']->getLL('ext_import_list_unchanged'),
index 42a7a7d..34d7ec0 100644 (file)
@@ -155,13 +155,13 @@ class tx_em_Repository_Utility implements t3lib_Singleton {
         * @param   string  $remoteRessource  remote ressource to read contents from
         * @param   string  $localRessource   local ressource (absolute file path) to store retrieved contents to
         * @return  void
-        * @see  t3lib_div::getURL(), t3lib_div::writeFile()
+        * @see  t3lib_div::getUrl(), t3lib_div::writeFile()
         * @throws  tx_em_ConnectionException
         */
        protected function fetchFile($remoteRessource, $localRessource) {
                if (is_string($remoteRessource) && is_string($localRessource)
                                && !empty($remoteRessource) && !empty($localRessource)) {
-                       $fileContent = t3lib_div::getURL($remoteRessource, 0, array(TYPO3_user_agent));
+                       $fileContent = t3lib_div::getUrl($remoteRessource, 0, array(TYPO3_user_agent));
                        if ($fileContent !== FALSE) {
                                t3lib_div::writeFile($localRessource, $fileContent) || $this->throwConnectionException(sprintf('Could not write to file %s.', htmlspecialchars($localRessource)));
                        } else {
@@ -282,7 +282,7 @@ class tx_em_Repository_Utility implements t3lib_Singleton {
                if (!is_file($this->getLocalExtListFile())) {
                        $updateNecessity |= self::PROBLEM_EXTENSION_FILE_NOT_EXISTING;
                } else {
-                       $remotemd5 = t3lib_div::getURL($this->getRemoteExtHashFile(), 0, array(TYPO3_user_agent));
+                       $remotemd5 = t3lib_div::getUrl($this->getRemoteExtHashFile(), 0, array(TYPO3_user_agent));
 
                        if ($remotemd5 !== FALSE) {
                                $localmd5 = md5_file($this->getLocalExtListFile());
index 17cd742..efb1a30 100644 (file)
@@ -636,7 +636,7 @@ final class tx_em_Tools {
         * @deprecated  since TYPO3 4.5.1, will be removed in TYPO3 4.7 - use pageRenderer->addInlineLanguageLabelFile() instead
         */
        public static function getArrayFromLocallang($file, $key = 'default') {
-               $content = t3lib_div::getURL($file);
+               $content = t3lib_div::getUrl($file);
                $array = t3lib_div::xml2array($content);
 
                return $array['data'][$key];
index b60968f..4a9e7ed 100755 (executable)
@@ -942,7 +942,7 @@ class tx_indexedsearch_indexer {
         * @return      mixed           If no answer, returns FALSE. Otherwise an array where HTTP headers are keys
         */
        function getUrlHeaders($url)    {
-               $content = t3lib_div::getURL($url,2);   // Try to get the headers only
+               $content = t3lib_div::getUrl($url,2);   // Try to get the headers only
 
                if (strlen($content))   {
                                // Compile headers:
index 52f3fa0..bc41de1 100755 (executable)
@@ -270,7 +270,7 @@ class SC_mod_tools_config_index {
                                $var = substr($line, 0, $length);
                                $changedLine = '$GLOBALS[\'' . substr($line, 1, $length - 1) . '\']' . substr($line, $length);
                                        // load current extTables.php
-                               $extTables = t3lib_div::getURL(PATH_typo3conf . TYPO3_extTableDef_script);
+                               $extTables = t3lib_div::getUrl(PATH_typo3conf . TYPO3_extTableDef_script);
                                if ($var === '$TCA') {
                                                // check if we are editing the TCA
                                        preg_match_all('/\[\'([^\']+)\'\]/', $line, $parts);
index 4818f08..46f4f0b 100644 (file)
@@ -218,7 +218,7 @@ class tx_t3editor implements t3lib_Singleton {
         * @return      string  the template code, prepared to use in javascript
         */
        protected function getPreparedTemplate() {
-               $T3Editor_template = t3lib_div::getURL(
+               $T3Editor_template = t3lib_div::getUrl(
                        t3lib_div::getFileAbsFileName(
                                'EXT:t3editor/res/templates/t3editor.html'
                        )
index c338064..8a70a54 100644 (file)
@@ -275,7 +275,7 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
                        t3lib_div::mkdir($tempPath);
 
                        $this->unzip($ZIPfile, $tempPath);
-                       $output = t3lib_div::getURL($tempPath.$filename);
+                       $output = t3lib_div::getUrl($tempPath.$filename);
 
                        $cmd = 'rm -r "'.$tempPath.'"';
                        t3lib_utility_Command::exec($cmd);
index 72ce0ae..11e45cb 100644 (file)
@@ -1913,7 +1913,7 @@ $str.=$this->docBodyTagBegin().
                }
                $htmlTemplate = '';
                if ($filename !== '') {
-                       $htmlTemplate = t3lib_div::getURL($filename);
+                       $htmlTemplate = t3lib_div::getUrl($filename);
                }
                return $htmlTemplate;
        }