From 9f24170cb866e35b88313556707482fefb55a453 Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Wed, 21 Jul 2010 01:25:04 +0000 Subject: [PATCH] MDL-20876 - updating third-party library readme_moodle with changes. Author: Jonathan Harker --- lib/alfresco/README_MOODLE.txt | 2 +- lib/excel/readme_moodle.txt | 93 +++++++++++++++++++++++++++++ lib/geoip/readme_moodle.txt | 29 +++++++++ lib/jabber/readme_moodle.txt | 3 +- lib/pear/README_MOODLE.txt | 7 +++ lib/simpletestlib/readme_moodle.txt | 1 + lib/smarty/readme_moodle.txt | 4 +- 7 files changed, 134 insertions(+), 5 deletions(-) diff --git a/lib/alfresco/README_MOODLE.txt b/lib/alfresco/README_MOODLE.txt index 5f4df9fc1e0..308e3c3b0de 100644 --- a/lib/alfresco/README_MOODLE.txt +++ b/lib/alfresco/README_MOODLE.txt @@ -1,9 +1,9 @@ -@VERSION $Id$ == CHANGELOG == 1. Rename class name , see Service/Repository.php & Service/WebService/AlfrescoWebService.php 2. Change library path name 3. In Alfresco_Repository class construct function, set _port to 80 if it is not specified +4. MDL-20876 - replaced deprecated split() with explode() == Alfresco PHP Libarary == diff --git a/lib/excel/readme_moodle.txt b/lib/excel/readme_moodle.txt index 50a0c665b5a..e5341caddbc 100644 --- a/lib/excel/readme_moodle.txt +++ b/lib/excel/readme_moodle.txt @@ -1,3 +1,96 @@ +20 Jul 2010 +MDL-20876 - replaced deprecated split() with explode() or str_split() where appropriate + +diff --git a/lib/excel/Parser.php b/lib/excel/Parser.php +index f91cf98..06b9e23 100644 +--- a/lib/excel/Parser.php ++++ b/lib/excel/Parser.php +@@ -538,10 +538,10 @@ class Parser + + // Split the range into 2 cell refs + if(preg_match("/^([A-I]?[A-Z])(\d+)\:([A-I]?[A-Z])(\d+)$/",$range)) { +- list($cell1, $cell2) = split(':', $range); ++ list($cell1, $cell2) = explode(':', $range); + } + elseif(preg_match("/^([A-I]?[A-Z])(\d+)\.\.([A-I]?[A-Z])(\d+)$/",$range)) { +- list($cell1, $cell2) = split('\.\.', $range); ++ list($cell1, $cell2) = explode('..', $range); + } + else { + die("Unknown range separator"); +@@ -993,4 +993,4 @@ class Parser + return $polish; + } + } +-?> +\ No newline at end of file ++?> +diff --git a/lib/excel/Worksheet.php b/lib/excel/Worksheet.php +index 1eb7682..d7c5cfc 100644 +--- a/lib/excel/Worksheet.php ++++ b/lib/excel/Worksheet.php +@@ -909,7 +909,7 @@ class Worksheet extends BIFFwriter + $row = $match[2]; + + // Convert base26 column string to number +- $chars = split('', $col); ++ $chars = str_split($col); + $expn = 0; + $col = 0; + +@@ -1530,13 +1530,13 @@ class Worksheet extends BIFFwriter + // Determine if the link contains a sheet reference and change some of the + // parameters accordingly. + // Split the dir name and sheet name (if it exists) +- list($dir_long , $sheet) = split('/\#/', $url); ++ list($dir_long , $sheet) = explode('/#/', $url); + $link_type = 0x01 | $absolute; + + if (isset($sheet)) { + $link_type |= 0x08; + $sheet_len = pack("V", strlen($sheet) + 0x01); +- $sheet = join("\0", split('', $sheet)); ++ $sheet = join("\0", str_split($sheet)); + $sheet .= "\0\0\0"; + } + else { +@@ -1555,7 +1555,7 @@ class Worksheet extends BIFFwriter + $dir_short = preg_replace('/\.\.\\/', '', $dir_long) . "\0"; + + // Store the long dir name as a wchar string (non-null terminated) +- $dir_long = join("\0", split('', $dir_long)); ++ $dir_long = join("\0", str_split($dir_long)); + $dir_long = $dir_long . "\0"; + + // Pack the lengths of the dir strings +@@ -1644,7 +1644,7 @@ class Worksheet extends BIFFwriter + if (defined $sheet) { + $link_type |= 0x08; + $sheet_len = pack("V", length($sheet) + 0x01); +- $sheet = join("\0", split('', $sheet)); ++ $sheet = join("\0", str_split($sheet)); + $sheet .= "\0\0\0"; + } + else { +@@ -1665,7 +1665,7 @@ class Worksheet extends BIFFwriter + + + # Store the long dir name as a wchar string (non-null terminated) +- $dir_long = join("\0", split('', $dir_long)); ++ $dir_long = join("\0", str_split($dir_long)); + $dir_long = $dir_long . "\0"; + + +@@ -2832,4 +2832,4 @@ class Worksheet extends BIFFwriter + $this->_append($header.$data); + } + } +-?> +\ No newline at end of file ++?> + + + 18 Nov 2009 Description of WriteExcel modifications to remove functions deprecated as of php 5.3 diff --git a/lib/geoip/readme_moodle.txt b/lib/geoip/readme_moodle.txt index 26fbc607e69..d2f2812cf04 100644 --- a/lib/geoip/readme_moodle.txt +++ b/lib/geoip/readme_moodle.txt @@ -1,3 +1,32 @@ +20 Jul 2010 +MDL-20876 - replaced deprecated split() with explode() + +diff --git a/lib/geoip/geoipcity.inc b/lib/geoip/geoipcity.inc +index 2297745..4e7b397 100644 +--- a/lib/geoip/geoipcity.inc ++++ b/lib/geoip/geoipcity.inc +@@ -67,9 +67,9 @@ class geoipdnsrecord { + + function getrecordwithdnsservice($str){ + $record = new geoipdnsrecord; +- $keyvalue = split(";",$str); ++ $keyvalue = explode(";",$str); + foreach ($keyvalue as $keyvalue2){ +- list($key,$value) = split("=",$keyvalue2); ++ list($key,$value) = explode("=",$keyvalue2); + if ($key == "co"){ + $record->country_code = $value; + } +@@ -214,4 +214,4 @@ function GeoIP_record_by_addr ($gi,$addr){ + return _get_record($gi, $ipnum); + } + +-?> +\ No newline at end of file ++?> + + + 18 Nov 2009 Description of geoip modifications to remove ereg related functions deprecated as of php 5.3. Patch below. diff --git a/lib/jabber/readme_moodle.txt b/lib/jabber/readme_moodle.txt index 3f7d63ffb01..f8328fbbb73 100644 --- a/lib/jabber/readme_moodle.txt +++ b/lib/jabber/readme_moodle.txt @@ -1,4 +1,3 @@ Description of XMPPHP (aka jabber) version 0.1rc2-r77 library import into Moodle -Changes: none - +MDL-20876 - replaced deprecated split() with explode() diff --git a/lib/pear/README_MOODLE.txt b/lib/pear/README_MOODLE.txt index 3989b791eb1..00eeff53349 100644 --- a/lib/pear/README_MOODLE.txt +++ b/lib/pear/README_MOODLE.txt @@ -20,6 +20,8 @@ and documented for Moodle at: 3/ removed deprecated "=& new" +4/ MDL-20876 - replaced deprecated split() with explode() or str_split() where appropriate + Such modifications should be carefully each time the Excel PEAR package is updated to a new release within Moodle. @@ -32,6 +34,8 @@ XML/Parser PHP/CodeSniffer =============== +MDL-20876 - replaced deprecated split() with explode() + A whole Moodle coding standards definition sits in lib/pear/PHP/CodeSniffer/Standards/Moodle To run the codesniffer, you can call the runsniffer script using your command-line php binary: @@ -43,3 +47,6 @@ Quickforms ========== Full of our custom hacks, no way to upgrade to latest upstream. Most probably we will stop using this library in the future. + +MDL-20876 - replaced split() with explode() or preg_split() where appropriate + diff --git a/lib/simpletestlib/readme_moodle.txt b/lib/simpletestlib/readme_moodle.txt index fdbcd6b38da..c29913d53c5 100644 --- a/lib/simpletestlib/readme_moodle.txt +++ b/lib/simpletestlib/readme_moodle.txt @@ -11,5 +11,6 @@ Changes: list. Hopefully will be included in a future release. * modified run() in test_case.php - skipping tests that need fake db if prefix not set * search replace deprecated "=& new" + * MDL-20876 - replaced deprecated split() with explode() skodak, Tim diff --git a/lib/smarty/readme_moodle.txt b/lib/smarty/readme_moodle.txt index 55d37ed6b74..612852cae1d 100644 --- a/lib/smarty/readme_moodle.txt +++ b/lib/smarty/readme_moodle.txt @@ -1,6 +1,6 @@ Description of Smarty 2.6.26 library import -* no changes * please do not use Smarty in any code, we are going to remove it from distribution in Moodle 2.0 +* MDL-20876 - replaced deprecated split() with explode() -skodak \ No newline at end of file +skodak