Skip to content

Commit

Permalink
MDL-20876 - updating third-party library readme_moodle with changes.
Browse files Browse the repository at this point in the history
Author: Jonathan Harker <[email protected]>
  • Loading branch information
doctorlard committed Jul 21, 2010
1 parent 1a874bc commit 9f24170
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/alfresco/README_MOODLE.txt
Original file line number Diff line number Diff line change
@@ -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 ==

Expand Down
93 changes: 93 additions & 0 deletions lib/excel/readme_moodle.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
29 changes: 29 additions & 0 deletions lib/geoip/readme_moodle.txt
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
3 changes: 1 addition & 2 deletions lib/jabber/readme_moodle.txt
Original file line number Diff line number Diff line change
@@ -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()
7 changes: 7 additions & 0 deletions lib/pear/README_MOODLE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:
Expand All @@ -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

1 change: 1 addition & 0 deletions lib/simpletestlib/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/smarty/readme_moodle.txt
Original file line number Diff line number Diff line change
@@ -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
skodak

0 comments on commit 9f24170

Please sign in to comment.