timeline: if a section is set to hidden and the user is not capable of editing a...
[moodle-blog-course-format.git] / lib / excel / readme_moodle.txt
blob0d885f5c56c0534a4c7198e702ea06a3603a8960
1 18 Nov 2009
2 Description of WriteExcel modifications to remove functions deprecated as of php 5.3
4 Index: Parser.php
5 ===================================================================
6 RCS file: /cvsroot/moodle/moodle/lib/excel/Parser.php,v
7 retrieving revision 1.1
8 diff -u -r1.1 Parser.php
9 --- Parser.php  26 Sep 2003 04:18:02 -0000      1.1
10 +++ Parser.php  18 Nov 2009 03:58:49 -0000
11 @@ -466,7 +466,7 @@
12          {\r
13          return(pack("C", $this->ptg[$token]));\r
14          }\r
15 -    elseif(preg_match("/[A-Z0-9À-Ü\.]+/",$token))\r
16 +    elseif(preg_match("/[A-Z0-9ï¿œ-ï¿œ\.]+/",$token))\r
17          {\r
18          return($this->_convert_function($token,$this->_func_args));\r
19          }\r
20 @@ -723,21 +723,21 @@
21              break;\r
22          default:\r
23             // if it's a reference\r
24 -            if(eregi("^[A-I]?[A-Z][0-9]+$",$token) and \r
25 -              !ereg("[0-9]",$this->_lookahead) and \r
26 +            if(preg_match("/^[A-I]?[A-Z][0-9]+$/i",$token) and\r
27 +              !preg_match("/[0-9]/",$this->_lookahead) and\r
28                 ($this->_lookahead != ':') and ($this->_lookahead != '.'))\r
29                  {\r
30                  return($token);\r
31                  }\r
32              // if it's a range (A1:A2)\r
33 -            elseif(eregi("^[A-I]?[A-Z][0-9]+:[A-I]?[A-Z][0-9]+$",$token) and \r
34 -                  !ereg("[0-9]",$this->_lookahead))\r
35 +            elseif(preg_match("/^[A-I]?[A-Z][0-9]+:[A-I]?[A-Z][0-9]+$/i",$token) and\r
36 +                  !preg_match("/[0-9]/",$this->_lookahead))\r
37                 {\r
38                 return($token);\r
39                 }\r
40              // if it's a range (A1..A2)\r
41 -            elseif(eregi("^[A-I]?[A-Z][0-9]+\.\.[A-I]?[A-Z][0-9]+$",$token) and \r
42 -                  !ereg("[0-9]",$this->_lookahead))\r
43 +            elseif(preg_match("/^[A-I]?[A-Z][0-9]+\.\.[A-I]?[A-Z][0-9]+$/i",$token) and\r
44 +                  !preg_match("/[0-9]/",$this->_lookahead))\r
45                 {\r
46                 return($token);\r
47                 }\r
48 @@ -746,7 +746,7 @@
49                  return($token);\r
50                  }\r
51              // if it's a function call\r
52 -            elseif(eregi("^[A-Z0-9À-Ü\.]+$",$token) and ($this->_lookahead == "("))\r
53 +            elseif(preg_match("/^[A-Z0-9ï¿œ-ï¿œ\.]+$/i",$token) and ($this->_lookahead == "("))\r
54  \r
55                 {\r
56                 return($token);\r
57 @@ -857,15 +857,15 @@
58          return($result);\r
59          }\r
60      // if it's a reference\r
61 -    if (eregi("^[A-I]?[A-Z][0-9]+$",$this->_current_token))\r
62 +    if (preg_match("/^[A-I]?[A-Z][0-9]+$/i",$this->_current_token))\r
63          {\r
64          $result = $this->_create_tree($this->_current_token, '', '');\r
65          $this->_advance();\r
66          return($result);\r
67          }\r
68      // if it's a range\r
69 -    elseif (eregi("^[A-I]?[A-Z][0-9]+:[A-I]?[A-Z][0-9]+$",$this->_current_token) or \r
70 -            eregi("^[A-I]?[A-Z][0-9]+\.\.[A-I]?[A-Z][0-9]+$",$this->_current_token)) \r
71 +    elseif (preg_match("/^[A-I]?[A-Z][0-9]+:[A-I]?[A-Z][0-9]+$/i",$this->_current_token) or\r
72 +            preg_match("/^[A-I]?[A-Z][0-9]+\.\.[A-I]?[A-Z][0-9]+$/i",$this->_current_token))\r
73          {\r
74          $result = $this->_current_token;\r
75          $this->_advance();\r
76 @@ -878,7 +878,7 @@
77          return($result);\r
78          }\r
79      // if it's a function call\r
80 -    elseif (eregi("^[A-Z0-9À-Ü\.]+$",$this->_current_token))\r
81 +    elseif (preg_match("/^[A-Z0-9ï¿œ-ï¿œ\.]+$/i",$this->_current_token))\r
82          {\r
83          $result = $this->_func();\r
84          return($result);\r
85 Index: Worksheet.php
86 ===================================================================
87 RCS file: /cvsroot/moodle/moodle/lib/excel/Worksheet.php,v
88 retrieving revision 1.1
89 diff -u -r1.1 Worksheet.php
90 --- Worksheet.php       26 Sep 2003 04:18:02 -0000      1.1
91 +++ Worksheet.php       18 Nov 2009 03:58:50 -0000
92 @@ -1264,10 +1264,10 @@
93          }\r
94      \r
95          // Strip the '=' or '@' sign at the beginning of the formula string\r
96 -        if (ereg("^=",$formula)) {\r
97 +        if (preg_match("/^=/",$formula)) {\r
98              $formula = preg_replace("/(^=)/","",$formula);\r
99          }\r
100 -        elseif(ereg("^@",$formula)) {\r
101 +        elseif(preg_match("/^@/",$formula)) {\r
102              $formula = preg_replace("/(^@)/","",$formula);\r
103          }\r
104          else {\r