|
|
@@ -11,7 +11,7 @@
|
|
|
*/
|
|
|
App::uses('Utility', 'Tools.Utility');
|
|
|
|
|
|
-# You can also use FULL_BASE_URL (cake) instead of HTTP_BASE
|
|
|
+// You can also use FULL_BASE_URL instead of HTTP_BASE
|
|
|
if (!empty($_SERVER['HTTP_HOST'])) {
|
|
|
define('HTTP_HOST', $_SERVER['HTTP_HOST']);
|
|
|
define('HTTP_BASE', 'http://' . HTTP_HOST); //FULL_BASE_URL
|
|
|
@@ -57,11 +57,12 @@ define('FORMAT_DB_DATETIME', 'Y-m-d H:i:s'); // date(...)
|
|
|
define('FORMAT_DB_DATE', 'Y-m-d');
|
|
|
define('FORMAT_DB_TIME', 'H:i:s');
|
|
|
|
|
|
+// @deprecated Use NULL instead for nullish date(time)s
|
|
|
define('DEFAULT_DATETIME', '0000-00-00 00:00:00');
|
|
|
define('DEFAULT_DATE', '0000-00-00');
|
|
|
define('DEFAULT_TIME', '00:00:00');
|
|
|
|
|
|
-# workpaths
|
|
|
+// Workpaths
|
|
|
define('FILES', APP . 'files' . DS);
|
|
|
define('LOCALE', APP . 'locale' . DS);
|
|
|
|
|
|
@@ -186,6 +187,7 @@ define('CHAR_DOUBLE_RPIME', '″'); # ? (seconds)
|
|
|
* //TODO move to TextLib?
|
|
|
*
|
|
|
* @return string
|
|
|
+ * @deprecated Use a lib class method instead
|
|
|
*/
|
|
|
function slug($string, $separator = null, $low = true) {
|
|
|
$additionalSlugElements = array(
|
|
|
@@ -222,6 +224,7 @@ function slug($string, $separator = null, $low = true) {
|
|
|
*
|
|
|
* @param string $str
|
|
|
* @return string
|
|
|
+ * @deprecated Use a lib class method instead
|
|
|
*/
|
|
|
function br2nl($str) {
|
|
|
$str = preg_replace("/(\r\n|\r|\n)/", "", $str);
|
|
|
@@ -235,6 +238,7 @@ function br2nl($str) {
|
|
|
*
|
|
|
* @param string $text Any text
|
|
|
* @return string Safe string without new lines
|
|
|
+ * @deprecated Use a lib class method instead
|
|
|
*/
|
|
|
function safenl($str) {
|
|
|
//$str = str_replace(chr(13).chr(10), " ", $str); # \r\n
|