Révision ea08a2a7
Ajouté par Jocelyn Delande il y a environ 11 ans
class/utils.class.php | ||
---|---|---|
48 | 48 |
*/ |
49 | 49 |
return preg_replace('/\.[^.]+$/', '', $filename); |
50 | 50 |
} |
51 |
|
|
52 |
public static function php2ini($v) { |
|
53 |
/** convert php var to a string representing it in an ini file. |
|
54 |
* @return a string, ready to be inserted into a ini file. |
|
55 |
*/ |
|
56 |
if (is_numeric($v)) { |
|
57 |
return $v; |
|
58 |
} |
|
59 |
$type = gettype($v); |
|
60 |
switch($type) { |
|
61 |
case 'boolean': return $v ? "true" : "false"; |
|
62 |
default: return '"'.$v.'"'; |
|
63 |
} |
|
64 |
return $v; |
|
65 |
} |
|
51 | 66 |
} |
52 | 67 |
|
53 | 68 |
?> |
Formats disponibles : Unified diff
adds a rm_reference.php webservice and fixed the typing from/to ini files