diff --git a/core/connection/data.txt b/core/connection/data.txt deleted file mode 100644 index 26c7161..0000000 --- a/core/connection/data.txt +++ /dev/null @@ -1,10 +0,0 @@ -HTTP/1.1 200 OK -Date: Mon, 31 Mar 2008 12:38:37 GMT -Server: Apache/2.0.61 (Win32) SVN/1.4.3 mod_python/3.3.1 Python/2.4.3 PHP/5.2.5 DAV/2 -X-Powered-By: PHP/5.2.5 -Expires: Thu, 19 Nov 1981 08:52:00 GMT -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache -Content-Length: 6232 -Connection: close -Content-Type: text/html; charset=windows-1251 \ No newline at end of file diff --git a/core/httprequest.php b/core/httprequest.php index f82d625..44571ec 100644 --- a/core/httprequest.php +++ b/core/httprequest.php @@ -1,7 +1,6 @@ utf-8 */ - static function unicode_encode($var) - { - return @iconv(self::$DEFAULT_ENCODING, self::$INTERNAL_ENCODING, $var); - } - - /* utf-8 -> windows-1251 */ - static function unicode_decode($var) - { - return @iconv(self::$INTERNAL_ENCODING, self::$DEFAULT_ENCODING, $var); - } - - static function prepare($var, $encode) - { - if (is_array($var)) { - $new = array(); - foreach ($var as $k => $v) { - $new[self::prepare($k, $encode)] = self::prepare($v, $encode); - } - $var = $new; - } elseif (is_object($var)) { - // Было преобразование типа для отображения !! - $vars = get_object_vars($var); - foreach ($vars as $m => $v) { - $var->$m = self::prepare($var->$m, $encode); - } - } elseif (is_string($var)) { - $var = call_user_func($encode, $var); - } - return $var; - } -} - -function php2js($a = false) { - if (is_null($a)) return 'null'; - if ($a === false) return 'false'; - if ($a === true) return 'true'; - if (is_scalar($a)) { - if (is_float($a)) { - // Always use "." for floats. - $a = str_replace(",", ".", strval($a)); - } else if (is_int($a)) { - return $a; - } - // All scalars are converted to strings to avoid indeterminism. - // PHP's "1" and 1 are equal for all PHP operators, but - // JS's "1" and 1 are not. So if we pass "1" or 1 from the PHP backend, - // we should get the same result in the JS frontend (string). - // Character replacements for JSON. - static $jsonReplaces = array( - array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), - array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); - return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"'; - } - $isList = true; - for ($i = 0, reset($a);$i < count($a);$i++, next($a)) { - if (key($a) !== $i) { - $isList = false; - break; - } - } - $result = array(); - if ($isList) { - foreach($a as $v) $result[] = php2js($v); - return '[' . join(',', $result) . ']'; - } else { - foreach($a as $k => $v) $result[] = php2js($k) . ':' . php2js($v); - return '{' . join(',', $result) . '}'; - } -} diff --git a/core/path.php b/core/path.php index 0b74eb0..1830e9b 100644 --- a/core/path.php +++ b/core/path.php @@ -315,5 +315,3 @@ class Path return implode(self::SEPARATOR, $args); } } - -?> \ No newline at end of file diff --git a/core/registry.php b/core/registry.php index 9668b9f..661dad5 100644 --- a/core/registry.php +++ b/core/registry.php @@ -21,5 +21,3 @@ class Registry extends Settings return self::$instance; } } - -?> \ No newline at end of file diff --git a/core/safecollection.php b/core/safecollection.php index b3ca3a3..df5529d 100644 --- a/core/safecollection.php +++ b/core/safecollection.php @@ -33,4 +33,3 @@ class SafeCollection extends Collection } } } - diff --git a/core/shortcut.php b/core/shortcut.php index 99c06d6..a80e5f5 100644 --- a/core/shortcut.php +++ b/core/shortcut.php @@ -55,4 +55,3 @@ class Shortcut } } -?> \ No newline at end of file diff --git a/core/tales.php b/core/tales.php index a4f28d0..e474ad6 100644 --- a/core/tales.php +++ b/core/tales.php @@ -32,5 +32,3 @@ function phptal_time ($e) { return date ("H:i", $e); } - -?> \ No newline at end of file