|
|
@@ -158,22 +158,22 @@ define('CHAR_LESS', '<'); # <
|
|
|
define('CHAR_GREATER', '>'); # >
|
|
|
define('CHAR_QUOTE', '"'); # "
|
|
|
define('CHAR_APOSTROPHE', '''); # '
|
|
|
-define('CHAR_ARROWS', '»'); # »
|
|
|
-define('CHAR_ARROWS_R', '»'); # »
|
|
|
-define('CHAR_ARROWS_L', '«'); # «
|
|
|
-define('CHAR_AVERAGE', 'Ø'); # Ø
|
|
|
+define('CHAR_ARROWS', '»'); # »
|
|
|
+define('CHAR_ARROWS_R', '»'); # »
|
|
|
+define('CHAR_ARROWS_L', '«'); # «
|
|
|
+define('CHAR_AVERAGE', 'Ø'); # Ø
|
|
|
define('CHAR_INFIN', '∞'); # 8
|
|
|
-define('CHAR_MILL', '‰'); # ‰ (per mille) / or ‰
|
|
|
+define('CHAR_MILL', '‰'); # ‰ (per mille) / or ‰
|
|
|
define('CHAR_PLUSMN', '±'); # 8
|
|
|
-define('CHAR_HELLIP', '…'); # … (horizontal ellipsis = three dot leader)
|
|
|
-define('CHAR_CIRCA', '≈'); # ˜ (almost equal to)
|
|
|
+define('CHAR_HELLIP', '…'); # … (horizontal ellipsis = three dot leader)
|
|
|
+define('CHAR_CIRCA', '≈'); # Ëœ (almost equal to)
|
|
|
define('CHAR_CHECKBOX_EMPTY', '☐]'); #
|
|
|
define('CHAR_CHECKBOX_MAKRED', '☑'); #
|
|
|
define('CHAR_CHECKMARK', '✓');
|
|
|
define('CHAR_CHECKMARK_BOLD', '✔');
|
|
|
define('CHAR_BALLOT', '✗');
|
|
|
define('CHAR_BALLOT_BOLD', '✘');
|
|
|
-define('CHAR_ABOUT', '≈'); # … (horizontal ellipsis = three dot leader)
|
|
|
+define('CHAR_ABOUT', '≈'); # … (horizontal ellipsis = three dot leader)
|
|
|
|
|
|
/* not very often used */
|
|
|
define('CHAR_RPIME', '′'); # ' (minutes)
|
|
|
@@ -189,31 +189,33 @@ define('CHAR_DOUBLE_RPIME', '″'); # ? (seconds)
|
|
|
* @return string
|
|
|
* @deprecated Use a lib class method instead
|
|
|
*/
|
|
|
-function slug($string, $separator = null, $low = true) {
|
|
|
- $additionalSlugElements = array(
|
|
|
- '/º|°/' => 0,
|
|
|
- '/¹/' => 1,
|
|
|
- '/²/' => 2,
|
|
|
- '/³/' => 3,
|
|
|
- // new utf8 char "capitel ß" still missing here! '/.../' => 'SS', (TODO in 2009)
|
|
|
- '/@/' => 'at',
|
|
|
- '/æ/' => 'ae',
|
|
|
- '/©/' => 'C',
|
|
|
- '/ç|¢/' => 'c',
|
|
|
- '/Ð/' => 'D',
|
|
|
- '/€/' => 'EUR',
|
|
|
- '/™/' => 'TM',
|
|
|
- // more missing?
|
|
|
- );
|
|
|
-
|
|
|
- if ($separator === null) {
|
|
|
- $separator = defined('SEO_SEPARATOR') ? SEO_SEPARATOR : '-';
|
|
|
- }
|
|
|
- $res = Inflector::slug($string, $separator, $additionalSlugElements);
|
|
|
- if ($low) {
|
|
|
- $res = strtolower($res);
|
|
|
+if (!function_exists('slug')) {
|
|
|
+ function slug($string, $separator = null, $low = true) {
|
|
|
+ $additionalSlugElements = array(
|
|
|
+ '/º|°/' => 0,
|
|
|
+ '/¹/' => 1,
|
|
|
+ '/²/' => 2,
|
|
|
+ '/³/' => 3,
|
|
|
+ // new utf8 char "capitel ß" still missing here! '/.../' => 'SS', (TODO in 2009)
|
|
|
+ '/@/' => 'at',
|
|
|
+ '/æ/' => 'ae',
|
|
|
+ '/©/' => 'C',
|
|
|
+ '/ç|¢/' => 'c',
|
|
|
+ '/�/' => 'D',
|
|
|
+ '/€/' => 'EUR',
|
|
|
+ '/â„¢/' => 'TM',
|
|
|
+ // more missing?
|
|
|
+ );
|
|
|
+
|
|
|
+ if ($separator === null) {
|
|
|
+ $separator = defined('SEO_SEPARATOR') ? SEO_SEPARATOR : '-';
|
|
|
+ }
|
|
|
+ $res = Inflector::slug($string, $separator, $additionalSlugElements);
|
|
|
+ if ($low) {
|
|
|
+ $res = strtolower($res);
|
|
|
+ }
|
|
|
+ return $res;
|
|
|
}
|
|
|
- return $res;
|
|
|
}
|
|
|
|
|
|
/**
|