Mercurial > hg > mgallery
annotate mgallery.inc.php @ 241:474d88b8188b rel-0_9_5
Bump version.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 28 Mar 2018 13:52:41 +0300 |
parents | 028291a78acb |
children | 3af3b3f50cb0 |
rev | line source |
---|---|
0 | 1 <?php |
2 // | |
3 // Yet Another Image Gallery | |
69
7777887bc515
Update header/copyright blurbs.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
4 // -- Common functions and data include |
7777887bc515
Update header/copyright blurbs.
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
5 // Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> |
161 | 6 // (C) Copyright 2015-2018 Tecnic Software productions (TNSP) |
0 | 7 // |
8 | |
241 | 9 $mgProgVersion = "v0.9.5"; |
0 | 10 $mgProgInfo = "Programmed by Matti 'ccr' Hamalainen"; |
11 $mgProgEmail = "<ccr@tnsp.org>"; | |
161 | 12 $mgProgCopyright = "2015-2018 Tecnic Software productions (TNSP)"; |
0 | 13 |
14 | |
15 // | |
106
a3b8cd4183e6
Change {album,image}_navigation setting to *_flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
16 // Navigation control defines |
a3b8cd4183e6
Change {album,image}_navigation setting to *_flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
17 // |
136 | 18 define("MGF_JAVASCRIPT" , 0x01); |
19 define("MGF_BREADCRUMBS" , 0x10); | |
20 define("MGF_CAPTIONS" , 0x20); | |
106
a3b8cd4183e6
Change {album,image}_navigation setting to *_flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
21 |
a3b8cd4183e6
Change {album,image}_navigation setting to *_flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
22 // |
0 | 23 // Constants for different value types |
24 // | |
136 | 25 define("MG_STR" , 1); |
26 define("MG_INT" , 2); | |
27 define("MG_DVA" , 3); | |
28 define("MG_BOOL" , 4); | |
29 define("MG_FLAGS" , 5); | |
30 define("MG_DATE" , 6); | |
0 | 31 |
32 | |
136 | 33 define("yes" , 1); |
34 define("no" , 0); | |
0 | 35 |
36 | |
114
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
37 $mgGFlags = [ |
136 | 38 "javascript" => MGF_JAVASCRIPT, |
39 "breadcrumbs" => MGF_BREADCRUMBS, | |
40 "captions" => MGF_CAPTIONS, | |
114
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
41 ]; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
42 |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
43 |
0 | 44 function mgPathName($path) |
45 { | |
46 $tmp = mgCleanPathArray(TRUE, 0, func_num_args(), func_get_args()); | |
47 if (count($tmp) > 0) | |
48 return implode("/", array_splice($tmp, 0, -1))."/"; | |
49 else | |
50 return $path; | |
51 } | |
52 | |
53 // | |
54 // Configuration settings and their default values | |
55 // | |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
56 $mgDefaults = [ |
130
f825d644cf7a
Implement new config setting "timezone" for specifying the timezone used for date/timestamp interpretation.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
57 "timezone" => [MG_STR, NULL], |
0 | 58 |
141
18061527d1cd
Reorder some settings in configuration data.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
59 "clean_urls" => [MG_BOOL, FALSE], |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
60 "base_path" => [MG_STR, mgPathName(mgRealPath($_SERVER["SCRIPT_FILENAME"]))], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
61 "base_url" => [MG_STR, mgPathName($_SERVER["PHP_SELF"])], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
62 "image_url" => [MG_STR, mgPathName($_SERVER["PHP_SELF"])], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
63 "mgallery_php" => [MG_STR, "mgallery.php"], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
64 "format_exts" => [MG_STR, "\.jpg|\.png|\.gif|\.jpeg"], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
65 "captions_file" => [MG_STR, "captions.txt"], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
66 "header_file" => [MG_STR, "header.txt"], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
67 "info_file" => [MG_STR, "gallery.info"], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
68 "cache_file" => [MG_STR, ".mgallery.cache"], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
69 |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
70 "cover_images" => [MG_BOOL, TRUE], |
141
18061527d1cd
Reorder some settings in configuration data.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
71 "album_icon" => [MG_STR, "album_sm.png"], |
18061527d1cd
Reorder some settings in configuration data.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
72 |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
73 "title_prefix" => [MG_STR, ""], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
74 "title_sep" => [MG_STR, " - "], |
224 | 75 "page_info" => [MG_STR, "Powered by <b>MGallery ".$mgProgVersion."</b> © Copyright ".$mgProgCopyright], |
151
4e25150aa868
Change js_path configuration setting to js_file.
Matti Hamalainen <ccr@tnsp.org>
parents:
150
diff
changeset
|
76 |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
77 "css" => [MG_STR, NULL], |
151
4e25150aa868
Change js_path configuration setting to js_file.
Matti Hamalainen <ccr@tnsp.org>
parents:
150
diff
changeset
|
78 "js_file" => [MG_STR, NULL], |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
79 "urchin_file" => [MG_STR, FALSE], |
0 | 80 |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
81 "global_flags" => [MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS | MGF_CAPTIONS, &$mgGFlags], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
82 "image_flags" => [MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS, &$mgGFlags], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
83 "album_flags" => [MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS, &$mgGFlags], |
0 | 84 |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
85 "tn_path" => [MG_STR, "tn/"], |
185
cb7019690a73
Separate medium image and thumbnail directories / handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
171
diff
changeset
|
86 "med_path" => [MG_STR, "med/"], |
0 | 87 |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
88 "tn_width" => [MG_INT, 140], // In pixels, applies as bounding box for w/h |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
89 "tn_height" => [MG_INT, 100], |
162
3c2674dbd185
Increase the generated mid- and thumbnail images JPEG quality slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
161
diff
changeset
|
90 "tn_quality" => [MG_INT, 85], // JPEG quality percent |
0 | 91 |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
92 "med_width" => [MG_INT, 960], |
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
93 "med_height" => [MG_INT, 640], |
162
3c2674dbd185
Increase the generated mid- and thumbnail images JPEG quality slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
161
diff
changeset
|
94 "med_quality" => [MG_INT, 90], |
195 | 95 |
96 "debug" => [MG_BOOL, FALSE], | |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
97 ]; |
0 | 98 |
99 | |
100 function mgDebug($msg) | |
101 { | |
102 // echo "MGAL[debug]: ".$msg; | |
103 } | |
104 | |
105 | |
106 function mgFatal($msg) | |
107 { | |
108 die("MGAL[fatal]: ".$msg); | |
109 } | |
110 | |
111 | |
112 function mgError($msg) | |
113 { | |
114 echo "MGAL[error]: ".$msg; | |
115 return FALSE; | |
116 } | |
117 | |
118 | |
119 function mgCArg($index, $clip = FALSE) | |
120 { | |
121 global $argc, $argv; | |
122 if ($index < $argc) | |
123 { | |
124 $str = $argv[$index]; | |
125 return ($clip !== FALSE) ? substr($str, 0, $clip) : $str; | |
126 } | |
127 else | |
128 return FALSE; | |
129 } | |
130 | |
131 | |
132 function mgCArgLC($index, $clip = FALSE) | |
133 { | |
134 global $argc, $argv; | |
135 if ($index < $argc) | |
136 { | |
137 $str = strtolower($argv[$index]); | |
138 return ($clip !== FALSE) ? substr($str, 0, $clip) : $str; | |
139 } | |
140 else | |
141 return FALSE; | |
142 } | |
143 | |
144 | |
145 function mgGetSetting($key, $default = NULL) | |
146 { | |
147 global $mgSettings, $mgDefaults; | |
148 | |
149 if (!array_key_exists($key, $mgDefaults)) | |
150 mgFatal("Setting '".$key."' does not exist.\n"); | |
151 | |
152 if (array_key_exists($key, $mgSettings)) | |
153 $val = $mgSettings[$key]; | |
154 else | |
155 $val = $mgDefaults[$key][1]; | |
156 | |
157 if (!isset($val) || $val === NULL) | |
158 { | |
159 if ($default !== NULL) | |
160 $val = $default; | |
161 else | |
162 mgFatal("Setting '".$key."' is not set, but is required to be configured.\n"); | |
163 } | |
164 | |
114
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
165 switch ($mgDefaults[$key][0]) |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
166 { |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
167 case MG_FLAGS: |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
168 if (is_string($val)) |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
169 { |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
170 $flags = $mgDefaults[$key][2]; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
171 $cval = preg_split("/\s*[,|]\s*/", strtolower($val), -1, PREG_SPLIT_NO_EMPTY); |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
172 $nval = 0; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
173 foreach ($cval as $qval) |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
174 { |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
175 if (array_key_exists($qval, $flags)) |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
176 $nval |= $flags[$qval]; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
177 else |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
178 mgFatal("Invalid flag value for '".$key."': '".$qval."'."); |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
179 } |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
180 } |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
181 break; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
182 } |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
183 |
0 | 184 return $val; |
185 } | |
186 | |
187 | |
188 function mgGetPath($path, $key) | |
189 { | |
190 $val = mgGetSetting($key); | |
191 return ($val !== FALSE) ? $path."/".$val : FALSE; | |
192 } | |
193 | |
194 | |
195 function mgReadSettings($filename = "mgallery.cfg") | |
196 { | |
197 global $mgSettings, $mgDefaults; | |
198 | |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
199 $spaths = []; |
0 | 200 $spaths[] = getcwd()."/"; |
201 if (($tmp = getenv("HOME")) !== FALSE && strlen($tmp) > 0) | |
202 { | |
203 $spaths[] = $tmp."/.config/mgallery/"; | |
204 $spaths[] = $tmp."/."; | |
205 } | |
206 else | |
207 { | |
208 $data = posix_getpwuid(posix_getuid()); | |
209 if ($data !== FALSE && isset($data["dir"])) | |
210 { | |
211 $tmp = $data["dir"]; | |
212 $spaths[] = $tmp."/.config/mgallery/"; | |
213 $spaths[] = $tmp."/."; | |
214 } | |
215 } | |
216 $spaths[] = dirname(__FILE__)."/"; | |
217 | |
218 foreach (array_unique($spaths) as $path) | |
219 { | |
220 $file = $path.$filename; | |
221 mgDebug("Checking '".$file."' for configuration ..\n"); | |
222 if (file_exists($file) && | |
223 ($mgSettings = parse_ini_file($file, FALSE)) !== FALSE) | |
224 { | |
225 mgDebug("Found '".$file."' config.\n"); | |
226 | |
227 // Validate settings | |
228 $ok = TRUE; | |
229 foreach ($mgSettings as $setting => $val) | |
230 { | |
231 if (!array_key_exists($setting, $mgDefaults)) | |
232 { | |
233 mgError("Setting '".$setting."' does not exist.\n"); | |
234 $ok = FALSE; | |
235 } | |
236 } | |
237 return $ok; | |
238 } | |
239 } | |
240 | |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
241 $mgSettings = []; |
0 | 242 return FALSE; |
243 } | |
244 | |
245 | |
246 function mgRealPath($path) | |
247 { | |
248 return realpath($path); | |
249 } | |
250 | |
251 | |
252 function mgCleanPathArray($refs, $start, $argc, $argv) | |
253 { | |
127
3ee66c432081
Use modern PHP array syntax.
Matti Hamalainen <ccr@tnsp.org>
parents:
124
diff
changeset
|
254 $path = []; |
0 | 255 $first = TRUE; |
256 for ($n = $start; $n < $argc; $n++) | |
257 { | |
258 foreach (explode("/", $argv[$n]) as $piece) | |
259 { | |
260 switch ($piece) | |
261 { | |
262 case ".": | |
263 case "": | |
264 if ($first) | |
265 $path[] = $piece; | |
266 break; | |
267 | |
268 case "..": | |
269 if ($refs && count($path) > 0) | |
270 array_pop($path); | |
271 break; | |
272 | |
273 default: | |
274 $path[] = $piece; | |
275 break; | |
276 } | |
277 $first = FALSE; | |
278 } | |
279 } | |
280 return $path; | |
281 } | |
282 | |
283 | |
284 function mgCleanPath($refs) | |
285 { | |
286 return implode("/", mgCleanPathArray($refs, 1, func_num_args(), func_get_args())); | |
287 } | |
288 | |
289 | |
290 function mgGetArr($data, $skeys, $sfmt1 = "%1", $sfmt2 = "", $func = NULL) | |
291 { | |
47
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
292 global $pageLang; |
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
293 |
0 | 294 if (!is_array($skeys)) |
295 $skeys = array($skeys); | |
296 | |
297 foreach ($skeys as $skey) | |
298 if (!array_key_exists($skey, $data)) | |
299 return $sfmt2; | |
300 | |
301 $str = $sfmt1; | |
302 for ($i = 1; $i <= sizeof($skeys); $i++) | |
303 { | |
304 $val = $data[$skeys[$i - 1]]; | |
47
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
305 if (is_array($val)) |
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
306 $vtmp = array_key_exists($pageLang, $val) ? $val[$pageLang] : reset($val); |
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
307 else |
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
308 $vtmp = $val; |
0 | 309 |
310 if (is_callable($func)) | |
77
fcfd635d7abf
Oops, fix format string callback functions ..
Matti Hamalainen <ccr@tnsp.org>
parents:
70
diff
changeset
|
311 $vtmp = call_user_func($func, $vtmp); |
0 | 312 |
47
1e2b55775a84
Begin implementation of translated caption/title support.
Matti Hamalainen <ccr@tnsp.org>
parents:
36
diff
changeset
|
313 $str = str_replace("%".$i, $vtmp, $str); |
0 | 314 } |
315 | |
316 return $str; | |
317 } | |
318 | |
319 | |
114
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
320 function mgGetDValStr($mdef, $val) |
0 | 321 { |
114
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
322 switch ($mdef[0]) |
0 | 323 { |
324 case MG_STR : return "\"".$val."\""; | |
325 case MG_BOOL : return $val ? "yes" : "no"; | |
114
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
326 case MG_FLAGS: |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
327 { |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
328 $mstr = []; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
329 foreach ($mdef[2] as $vkey => $vval) |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
330 { |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
331 if ($val & $vval) |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
332 $mstr[] = $vkey; |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
333 } |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
334 return implode($mstr, " | "); |
c803235bd0f9
Implement flag config option type.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
335 } |
0 | 336 case MG_INT : |
337 default : return (string) $val; | |
338 } | |
339 } | |
340 | |
341 ?> |