quickfw-git Mailing List for QuickFramework (Page 7)
Brought to you by:
ivan1986,
seriousdron
You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
(9) |
Apr
(25) |
May
(22) |
Jun
(22) |
Jul
(15) |
Aug
(16) |
Sep
(4) |
Oct
(9) |
Nov
(9) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(5) |
Feb
(3) |
Mar
(2) |
Apr
(11) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: Ivan1986 <iva...@us...> - 2010-04-20 09:07:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The tag, 1.4 has been created at 292f23a2bb4a0725ce65d5e72d7ab40d609e6d9e (commit) - Log ----------------------------------------------------------------- commit 292f23a2bb4a0725ce65d5e72d7ab40d609e6d9e Author: Ivan1986 <iva...@li...> Date: Tue Apr 13 17:54:03 2010 +0400 Поправил esc - с учетом кодировки ----------------------------------------------------------------------- hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-13 13:54:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 292f23a2bb4a0725ce65d5e72d7ab40d609e6d9e (commit) from d18b2cd7821f9e7536ca404ff210844de120866d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 292f23a2bb4a0725ce65d5e72d7ab40d609e6d9e Author: Ivan1986 <iva...@li...> Date: Tue Apr 13 17:54:03 2010 +0400 Поправил esc - с учетом кодировки diff --git a/QFW/QuickFW/Plugs.php b/QFW/QuickFW/Plugs.php index f125fd4..6ee9603 100644 --- a/QFW/QuickFW/Plugs.php +++ b/QFW/QuickFW/Plugs.php @@ -179,11 +179,15 @@ class QuickFW_Plugs } /** - * Функции ескейпинга с учетом utf8 + * Функции ескейпинга в нужной кодировке + * + * @param string $s Исходная строка + * @return string htmlspecialchars($s, ENT_QUOTES, $encoding) */ public function esc($s) { - return htmlspecialchars($s,ENT_QUOTES,'UTF-8'); + return htmlspecialchars($s, ENT_QUOTES, + QFW::$config['host']['encoding']); } } diff --git a/QFW/Templater/Templater.php b/QFW/Templater/Templater.php index 92919ec..f69de23 100644 --- a/QFW/Templater/Templater.php +++ b/QFW/Templater/Templater.php @@ -1,5 +1,8 @@ <?php +/** + * Общий предок шаблонов + */ abstract class Templater { /** @var array переменные, установленные в шаблоне */ @@ -103,6 +106,12 @@ abstract class Templater return true; } + /** + * Вызывает выполнение блока и возвращает результат + * + * @param string $block имя блока (MCA) + * @return string результат работы блока + */ public function block($block) { //TODO: убрать ненужную переменную после перехода на php 5.3 @@ -110,6 +119,9 @@ abstract class Templater return call_user_func_array(array(&QFW::$router, 'blockRoute'), $args); } + /** + * Синоним fetch + */ public function render($tmpl) { return $this->fetch($tmpl); @@ -117,6 +129,13 @@ abstract class Templater abstract public function fetch($tmpl); + /** + * Генерирует полный вывод, обрабатывает фильтрами + * + * @param <type> $content основной контент страницы + * @return string вся страница с главным шаблоном + * @internal + */ public function displayMain($content) { if (isset($this->mainTemplate) && $this->mainTemplate!="") @@ -132,12 +151,16 @@ abstract class Templater } /** - * Функции ескейпинга с учетом utf8 + * Функции ескейпинга в нужной кодировке * * @param string $s Исходная строка - * @return string htmlspecialchars($s, ENT_QUOTES, 'UTF-8') + * @return string htmlspecialchars($s, ENT_QUOTES, $encoding) */ - public function esc($s) { return htmlspecialchars($s, ENT_QUOTES, 'UTF-8');} + public function esc($s) + { + return htmlspecialchars($s, ENT_QUOTES, + QFW::$config['host']['encoding']); + } } ----------------------------------------------------------------------- Summary of changes: QFW/QuickFW/Plugs.php | 8 ++++++-- QFW/Templater/Templater.php | 29 ++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-13 11:39:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 9067b3831d39f9e27514172e82ebef095a5679bd (commit) from 9405be9712192701be2ec7649867568480587d08 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9067b3831d39f9e27514172e82ebef095a5679bd Author: Ivan1986 <iva...@li...> Date: Tue Apr 13 15:39:08 2010 +0400 Обновлен скрипт сборки архива diff --git a/release.sh b/release.sh index 6ad9a53..86286b5 100755 --- a/release.sh +++ b/release.sh @@ -8,17 +8,17 @@ olddir=`pwd` cd .. rm -rf $1 -svn export $olddir/ ./$1 -cd $1 +mkdir $1 +cd $olddir +git archive --format=tar master | ( cd "../$1" ; tar xf - ) +cd ../$1 -find ./ -name '.svn' | xargs rm -rf $1 find ./doc/* -type d | grep -v asciidoc | xargs rm -rf $1 find ./tmp/* -type f | xargs rm -rf $1 rm -rf addons -rm -rf lib/datagrid -rm -rf www/datagrid ./perm.sh 777 rm -f release.sh +rm -f .gitignore cd .. rm -f $1.tar.gz ----------------------------------------------------------------------- Summary of changes: release.sh | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-12 13:22:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 9405be9712192701be2ec7649867568480587d08 (commit) via e06d7939a955565ef7b24fb20b4c38886b80cf15 (commit) from fe12734cda0119707eb89e609e4f9c7fc51e3dcc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9405be9712192701be2ec7649867568480587d08 Author: Ivan1986 <iva...@li...> Date: Mon Apr 12 17:21:22 2010 +0400 Добавлен PhpDOC в Curl diff --git a/lib/Curl.php b/lib/Curl.php index de6a0fb..4a36bee 100644 --- a/lib/Curl.php +++ b/lib/Curl.php @@ -6,14 +6,23 @@ */ class Curl { + /** @var array Массив кук */ public $cookies = array(); + /** @var string файл, в котором хранятся куки */ public $cookie_file = ''; + /** @var boolean сохранять файл с куками постоянно */ public $persist_cookie_file = false; + /** @var array массив заголовков запроса */ public $headers = array(); + /** @var array массив дополнительных опций Curl */ public $options = array(); + /** @var string заголовок referer */ public $referer = ''; + /** @var string заголовок USER_AGENT */ public $user_agent = ''; + /** @var string адрес прокси */ public $proxy = ''; + /** @var integer таймаут в секундах */ public $timeout = 0; protected $error = ''; commit e06d7939a955565ef7b24fb20b4c38886b80cf15 Author: Ivan1986 <iva...@li...> Date: Mon Apr 12 17:17:37 2010 +0400 Поддержка https и таймаута в Curl diff --git a/lib/Curl.php b/lib/Curl.php index 5a3d493..de6a0fb 100644 --- a/lib/Curl.php +++ b/lib/Curl.php @@ -14,6 +14,7 @@ class Curl public $referer = ''; public $user_agent = ''; public $proxy = ''; + public $timeout = 0; protected $error = ''; protected $clear; @@ -115,6 +116,12 @@ class Curl CURLOPT_RETURNTRANSFER => true, CURLOPT_PROXY => $this->proxy, + CURLOPT_CONNECTTIMEOUT => $this->timeout, + CURLOPT_TIMEOUT => $this->timeout, + + CURLOPT_SSL_VERIFYPEER => 0, + CURLOPT_SSL_VERIFYHOST => 0, + CURLOPT_USERAGENT => $this->user_agent, CURLOPT_REFERER => $this->referer, ----------------------------------------------------------------------- Summary of changes: lib/Curl.php | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-12 09:04:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via fe12734cda0119707eb89e609e4f9c7fc51e3dcc (commit) from 43cbd319ff3323a47030803cb70bb0255f7e9752 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fe12734cda0119707eb89e609e4f9c7fc51e3dcc Author: Ivan1986 <iva...@li...> Date: Mon Apr 12 13:03:11 2010 +0400 Обработка форм в Curl - textarea и select diff --git a/lib/Curl.php b/lib/Curl.php index 45c219a..5a3d493 100644 --- a/lib/Curl.php +++ b/lib/Curl.php @@ -253,7 +253,7 @@ class CurlResponse continue; $forms[$k] = $this->parceTagParams($f[1]); $fields = array(); - preg_match_all('|<input.*?>|si',$f[0],$m); + preg_match_all('#<(input|textarea|select).*?>#si',$f[0],$m); foreach ($m[0] as $field) { $r = $this->parceTagParams($field); ----------------------------------------------------------------------- Summary of changes: lib/Curl.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-09 12:19:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 43cbd319ff3323a47030803cb70bb0255f7e9752 (commit) from fc99017693171d54f28990a9e34e57c0f1e30e0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 43cbd319ff3323a47030803cb70bb0255f7e9752 Author: Ivan1986 <iva...@li...> Date: Fri Apr 9 16:18:55 2010 +0400 Мелкая правка в кешене diff --git a/QFW/QuickFW/Cache.php b/QFW/QuickFW/Cache.php index db8ac61..3b38942 100644 --- a/QFW/QuickFW/Cache.php +++ b/QFW/QuickFW/Cache.php @@ -140,9 +140,10 @@ class Cache } // если у нас не пустое пространство имен - юзаем проксирующий класс - if ($n = (isset($data['namespace']) ? $data['namespace'] : '').$ns) + $n = (isset($data['namespace']) ? $data['namespace'] : '').$ns; + if ($n) $c=self::ns($c,$n); - if (isset($data['tags']) && $data['tags']) + if (!empty($data['tags'])) { require_once(QFWPATH.'/QuickFW/Cacher/TagEmu.php'); $c=new Dklab_Cache_Backend_TagEmuWrapper($c); ----------------------------------------------------------------------- Summary of changes: QFW/QuickFW/Cache.php | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-09 08:57:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via fc99017693171d54f28990a9e34e57c0f1e30e0e (commit) from 30bfa601db7e5336cebe06697ea09088627a0955 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fc99017693171d54f28990a9e34e57c0f1e30e0e Author: Ivan1986 <iva...@li...> Date: Fri Apr 9 12:56:13 2010 +0400 Из JsHttp удалена обработка фатальных ошибок, так как они сами корректно обрабатываются без этих извращений diff --git a/lib/JsHttpRequest.php b/lib/JsHttpRequest.php index 063cb8c..bbbd22a 100644 --- a/lib/JsHttpRequest.php +++ b/lib/JsHttpRequest.php @@ -25,12 +25,6 @@ class JsHttpRequest var $ID = null; var $RESULT = null; - // Internal; uniq value. - private $_uniqHash; - // Magic number for display_error checking. - private $_magic = 14623; - // Previous display_errors value. - private $_prevDisplayErrors = null; // Internal: response content-type depending on loader type. private $_contentTypes = array( "script" => "text/javascript", @@ -86,14 +80,6 @@ class JsHttpRequest // to free some memory. This memory may be used on memory_limit error. $this->_emergBuffer = str_repeat('a', 1024 * 200); - // Intercept fatal errors via display_errors (seems it is the only way). - $this->_uniqHash = md5('JsHttpRequest' . microtime() . getmypid()); - $this->_prevDisplayErrors = ini_get('display_errors'); - ini_set('display_errors', $this->_magic); // - ini_set('error_prepend_string', $this->_uniqHash . ini_get('error_prepend_string')); - ini_set('error_append_string', ini_get('error_append_string') . $this->_uniqHash); - if (function_exists('xdebug_disable')) xdebug_disable(); // else Fatal errors are not catched - // Start OB handling early. ob_start(array(&$this, "_obHandler")); $JsHttpRequest_Active = true; @@ -246,42 +232,8 @@ class JsHttpRequest unset($this->_emergBuffer); // free a piece of memory for memory_limit error unset($GLOBALS['JsHttpRequest_Active']); - // Check for error & fetch a resulting data. - $wasFatalError = false; - if (preg_match_all("/{$this->_uniqHash}(.*?){$this->_uniqHash}/sx", $text, $m)) { - // Display_errors: - // 1. disabled manually after the library initialization, or - // 2. was initially disabled and is not changed - $needRemoveErrorMessages = !ini_get('display_errors') || (!$this->_prevDisplayErrors && ini_get('display_errors') == $this->_magic); - foreach ($m[0] as $error) { - if (preg_match('/\bFatal error(<.*?>)?:/i', $error)) { - $wasFatalError = true; - } - if ($needRemoveErrorMessages) { - $text = str_replace($error, '', $text); // strip the whole error message - } else { - $text = str_replace($this->_uniqHash, '', $text); - } - } - } - if ($wasFatalError) { - // On fatal errors - force "null" result. This is needed, because $_RESULT - // may not be fully completed at the moment of the error. - $this->RESULT = null; - } else { - // Read the result from globals if not set directly. - if (!isset($this->RESULT)) { - global $_RESULT; - $this->RESULT = $_RESULT; - } - // Avoid manual NULLs in the result (very important!). - if ($this->RESULT === null) { - $this->RESULT = false; - } - } - // Note that 500 error is generated when a PHP error occurred. - $status = $this->RESULT === null? 500 : 200; + $status = 200; $result = array( 'id' => $this->ID, 'js' => $this->RESULT, // null always means a fatal error... ----------------------------------------------------------------------- Summary of changes: lib/JsHttpRequest.php | 50 +------------------------------------------------ 1 files changed, 1 insertions(+), 49 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-06 12:04:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 30bfa601db7e5336cebe06697ea09088627a0955 (commit) via 83f1678697ceae67d90661631f520caa7c8345cf (commit) via 84ae3263766a973db0822cf8999b796048502ce2 (commit) via 8226d71b29036f46afaa7c5ac40126b66d7c1175 (commit) from e7fcdf652063fa53fa4407e9acaf9b65c4ccb8d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 30bfa601db7e5336cebe06697ea09088627a0955 Author: Ivan1986 <iva...@li...> Date: Tue Apr 6 15:33:37 2010 +0400 Расстановка private diff --git a/lib/JsHttpRequest.php b/lib/JsHttpRequest.php index 3c0f263..063cb8c 100644 --- a/lib/JsHttpRequest.php +++ b/lib/JsHttpRequest.php @@ -26,26 +26,26 @@ class JsHttpRequest var $RESULT = null; // Internal; uniq value. - var $_uniqHash; + private $_uniqHash; // Magic number for display_error checking. - var $_magic = 14623; + private $_magic = 14623; // Previous display_errors value. - var $_prevDisplayErrors = null; + private $_prevDisplayErrors = null; // Internal: response content-type depending on loader type. - var $_contentTypes = array( + private $_contentTypes = array( "script" => "text/javascript", "xml" => "text/plain", // In XMLHttpRequest mode we must return text/plain - stupid Opera 8.0. :( "form" => "text/html", "" => "text/plain", // for unknown loader ); // Internal: conversion to UTF-8 JSON cancelled because of non-ascii key. - var $_toUtfFailed = false; + private $_toUtfFailed = false; // Internal: list of characters 128...255 (for strpbrk() ASCII check). - var $_nonAsciiChars = ''; + private $_nonAsciiChars = ''; // Which Unicode conversion function is available? - var $_unicodeConvMethod = null; + private $_unicodeConvMethod = null; // Emergency memory buffer to be freed on memory_limit error. - var $_emergBuffer = null; + private $_emergBuffer = null; /** @@ -128,7 +128,7 @@ class JsHttpRequest * * @return boolean True if the library is active, false otherwise. */ - function isActive() + static function isActive() { return !empty($GLOBALS['JsHttpRequest_Active']); } @@ -144,7 +144,7 @@ class JsHttpRequest */ function setEncoding($enc) { - $this->SCRIPT_ENCODING = strtolower($enc); + $this->SCRIPT_ENCODING = strtolower($enc); $this->_correctSuperglobals(); } @@ -157,7 +157,7 @@ class JsHttpRequest * @param mixed $a Any structure to convert to JS. * @return string JavaScript equivalent structure. */ - function php2js($a=false) + private function php2js($a=false) { if (is_null($a)) return 'null'; if ($a === false) return 'false'; @@ -207,7 +207,7 @@ class JsHttpRequest /** * Parse & decode QUERY_STRING. */ - function _correctSuperglobals() + private function _correctSuperglobals() { // In case of FORM loader we may go to nirvana, everything is already parsed by PHP. if ($this->LOADER == 'form') return; @@ -364,7 +364,7 @@ class JsHttpRequest * Decode all %uXXXX entities in string or array (recurrent). * String must not contain %XX entities - they are ignored! */ - function _ucs2EntitiesDecode($data) + private function _ucs2EntitiesDecode($data) { if (is_array($data)) { $d = array(); @@ -388,7 +388,7 @@ class JsHttpRequest * * @see iconv() */ - function _unicodeConv($fromEnc, $toEnc, $v) + private function _unicodeConv($fromEnc, $toEnc, $v) { if ($this->_unicodeConvMethod == 'iconv') return iconv($fromEnc, $toEnc, $v); commit 83f1678697ceae67d90661631f520caa7c8345cf Author: Ivan1986 <iva...@li...> Date: Tue Apr 6 15:27:56 2010 +0400 Более быстрая раскодировка из JS - используется json_decode diff --git a/lib/JsHttpRequest.php b/lib/JsHttpRequest.php index 690292a..3c0f263 100644 --- a/lib/JsHttpRequest.php +++ b/lib/JsHttpRequest.php @@ -21,7 +21,6 @@ class JsHttpRequest { var $SCRIPT_ENCODING = "utf-8"; - var $SCRIPT_DECODE_MODE = ''; var $LOADER = null; var $ID = null; var $RESULT = null; @@ -142,17 +141,10 @@ class JsHttpRequest * Examples: * "windows-1251" - set plain encoding (non-windows characters, * e.g. hieroglyphs, are totally ignored) - * "windows-1251 entities" - set windows encoding, BUT additionally replace: - * "&" -> "&" - * hieroglyph -> &#XXXX; entity */ function setEncoding($enc) { - // Parse an encoding. - preg_match('/^(\S*)(?:\s+(\S*))$/', $enc, $p); - $this->SCRIPT_ENCODING = strtolower(!empty($p[1])? $p[1] : $enc); - $this->SCRIPT_DECODE_MODE = !empty($p[2])? $p[2] : ''; - // Manually parse QUERY_STRING because of damned Unicode's %uXXXX. + $this->SCRIPT_ENCODING = strtolower($enc); $this->_correctSuperglobals(); } @@ -382,7 +374,8 @@ class JsHttpRequest return $d; } else { if (strpos($data, '%u') !== false) { // improve speed - $data = preg_replace_callback('/%u([0-9A-F]{1,4})/si', array(&$this, '_ucs2EntitiesDecodeCallback'), $data); + $data = json_decode(str_replace('%', '\\', sprintf('"%s"',addslashes($data)))); + $data = $this->_unicodeConv('UTF-8', $this->SCRIPT_ENCODING, $data); } return $data; } @@ -390,30 +383,6 @@ class JsHttpRequest /** - * Decode one %uXXXX entity (RE callback). - */ - function _ucs2EntitiesDecodeCallback($p) - { - $hex = $p[1]; - $dec = hexdec($hex); - if ($dec === "38" && $this->SCRIPT_DECODE_MODE == 'entities') { - // Process "&" separately in "entities" decode mode. - $c = "&"; - } else { - $c = @$this->_unicodeConv('UCS-2BE', $this->SCRIPT_ENCODING, pack('n', $dec)); - if (!strlen($c)) { - if ($this->SCRIPT_DECODE_MODE == 'entities') { - $c = '&#' . $dec . ';'; - } else { - $c = '?'; - } - } - } - return $c; - } - - - /** * Wrapper for iconv() or mb_convert_encoding() functions. * This function will generate fatal error if none of these functons available! * commit 84ae3263766a973db0822cf8999b796048502ce2 Author: Ivan1986 <iva...@li...> Date: Tue Apr 6 13:14:13 2010 +0400 Удалены две никак не используемые функции diff --git a/lib/JsHttpRequest.php b/lib/JsHttpRequest.php index 72fc837..690292a 100644 --- a/lib/JsHttpRequest.php +++ b/lib/JsHttpRequest.php @@ -136,17 +136,6 @@ class JsHttpRequest /** - * string getJsCode() - * - * Return JavaScript part of the library. - */ - function getJsCode() - { - return file_get_contents(dirname(__FILE__) . '/JsHttpRequest.js'); - } - - - /** * void setEncoding(string $encoding) * * Set an active script encoding & correct QUERY_STRING according to it. @@ -169,26 +158,6 @@ class JsHttpRequest /** - * string quoteInput(string $input) - * - * Quote a string according to the input decoding mode. - * If entities are used (see setEncoding()), no '&' character is quoted, - * only '"', '>' and '<' (we presume that '&' is already quoted by - * an input reader function). - * - * Use this function INSTEAD of htmlspecialchars() for $_GET data - * in your scripts. - */ - function quoteInput($s) - { - if ($this->SCRIPT_DECODE_MODE == 'entities') - return str_replace(array('"', '<', '>'), array('"', '<', '>'), $s); - else - return htmlspecialchars($s); - } - - - /** * Convert a PHP scalar, array or hash to JS scalar/array/hash. This function is * an analog of json_encode(), but it can work with a non-UTF8 input and does not * analyze the passed data. Output format must be fully JSON compatible. commit 8226d71b29036f46afaa7c5ac40126b66d7c1175 Author: Ivan1986 <iva...@li...> Date: Mon Apr 5 19:34:18 2010 +0400 Удалил перекодировку без mb_sting или iconv diff --git a/lib/JsHttpRequest.php b/lib/JsHttpRequest.php index debaf18..72fc837 100644 --- a/lib/JsHttpRequest.php +++ b/lib/JsHttpRequest.php @@ -80,7 +80,8 @@ class JsHttpRequest $_REQUEST['JsHttpRequest'] ); // Detect Unicode conversion method. - $this->_unicodeConvMethod = function_exists('mb_convert_encoding')? 'mb' : (function_exists('iconv')? 'iconv' : null); + $this->_unicodeConvMethod = function_exists('mb_convert_encoding')? 'mb' : (function_exists('iconv')? 'iconv' : + trigger_error('Install mb_string or iconv', E_USER_ERROR)); // Fill an emergency buffer. We erase it at the first line of OB processor // to free some memory. This memory may be used on memory_limit error. @@ -329,7 +330,7 @@ class JsHttpRequest $text = null; // to be on a safe side // Try to use very fast json_encode: 3-4 times faster than a manual encoding. - if (function_exists('array_walk_recursive') && function_exists('json_encode') && $this->_unicodeConvMethod) { + if (function_exists('array_walk_recursive') && function_exists('json_encode')) { $this->_nonAsciiChars = join("", array_map('chr', range(128, 255))); $this->_toUtfFailed = false; $resultUtf8 = $result; @@ -430,11 +431,7 @@ class JsHttpRequest // Process "&" separately in "entities" decode mode. $c = "&"; } else { - if ($this->_unicodeConvMethod) { - $c = @$this->_unicodeConv('UCS-2BE', $this->SCRIPT_ENCODING, pack('n', $dec)); - } else { - $c = $this->_decUcs2Decode($dec, $this->SCRIPT_ENCODING); - } + $c = @$this->_unicodeConv('UCS-2BE', $this->SCRIPT_ENCODING, pack('n', $dec)); if (!strlen($c)) { if ($this->SCRIPT_DECODE_MODE == 'entities') { $c = '&#' . $dec . ';'; @@ -455,92 +452,11 @@ class JsHttpRequest */ function _unicodeConv($fromEnc, $toEnc, $v) { - if ($this->_unicodeConvMethod == 'iconv') { + if ($this->_unicodeConvMethod == 'iconv') return iconv($fromEnc, $toEnc, $v); - } return mb_convert_encoding($v, $toEnc, $fromEnc); } - - /** - * If there is no ICONV, try to decode 1-byte characters and UTF-8 manually - * (for most popular charsets only). - */ - - /** - * @todo Проверить функцию - * Необходимость этой функции под большим вопросом, - * Похоже вызывается из мертвой ветки, так как фреймворк - * подразумевает использование mb_convert_encoding - * - * Convert from UCS-2BE decimal to $toEnc. - */ - function _decUcs2Decode($code, $toEnc) - { - // Little speedup by using array_flip($this->_encTables) and later hash access. - static $flippedTable = null; - if ($code < 128) return chr($code); - - if (isset($this->_encTables[$toEnc])) { - if (!$flippedTable) $flippedTable = array_flip($this->_encTables[$toEnc]); - if (isset($flippedTable[$code])) return chr(128 + $flippedTable[$code]); - } else if ($toEnc == 'utf-8' || $toEnc == 'utf8') { - // UTF-8 conversion rules: http://www.cl.cam.ac.uk/~mgk25/unicode.html - if ($code < 0x800) { - return chr(0xC0 + ($code >> 6)) . - chr(0x80 + ($code & 0x3F)); - } else { // if ($code <= 0xFFFF) -- it is almost always so for UCS2-BE - return chr(0xE0 + ($code >> 12)) . - chr(0x80 + (0x3F & ($code >> 6))) . - chr(0x80 + ($code & 0x3F)); - } - } - - return ""; - } - - - /** - * UCS-2BE -> 1-byte encodings (from #128). - */ - var $_encTables = array( - 'windows-1251' => array( - 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, - 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, - 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, - 0x0098, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, - 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, - 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, - 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, - 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, - ), - 'koi8-r' => array( - 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, - 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, - 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255d, 0x255E, - 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, - 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043d, 0x043E, - 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044C, 0x044B, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044A, - 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041d, 0x041E, - 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042C, 0x042B, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042A - ), - ); } ?> ----------------------------------------------------------------------- Summary of changes: lib/JsHttpRequest.php | 186 +++++------------------------------------------- 1 files changed, 20 insertions(+), 166 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-04-05 14:24:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via e7fcdf652063fa53fa4407e9acaf9b65c4ccb8d7 (commit) from 051454035ba7290215e818d1c6ca33b83f008fd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e7fcdf652063fa53fa4407e9acaf9b65c4ccb8d7 Author: Ivan1986 <iva...@li...> Date: Mon Apr 5 18:14:25 2010 +0400 В JsHttp не передвалась кодировка diff --git a/QFW/Init.php b/QFW/Init.php index c1ad31f..d5c9502 100644 --- a/QFW/Init.php +++ b/QFW/Init.php @@ -79,7 +79,8 @@ class QFW { require_once LIBPATH.'/JsHttpRequest.php'; //QFW::$libs['JsHttpRequest'] для совместимости со старым вариантом - self::$ajax = QFW::$libs['JsHttpRequest'] = new JsHttpRequest('utf-8'); + self::$ajax = QFW::$libs['JsHttpRequest'] = new + JsHttpRequest(self::$config['host']['encoding']); self::$view->mainTemplate = ''; } ----------------------------------------------------------------------- Summary of changes: QFW/Init.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-31 11:35:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 051454035ba7290215e818d1c6ca33b83f008fd9 (commit) from 7fca8066db3977af062c22a09b07835bd87ef229 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 051454035ba7290215e818d1c6ca33b83f008fd9 Author: Ivan1986 <iva...@li...> Date: Wed Mar 31 15:31:00 2010 +0400 Поддержка выбора классами в DbSimple diff --git a/lib/DbSimple/Generic.php b/lib/DbSimple/Generic.php index c4293c8..8fbbcb8 100644 --- a/lib/DbSimple/Generic.php +++ b/lib/DbSimple/Generic.php @@ -273,6 +273,22 @@ abstract class DbSimple_Generic_Database extends DbSimple_Generic_LastError } /** + * Задает имя класса строки + * + * <br>для следующего запроса каждая строка будет + * заменена классом, конструктору которого передается + * массив поле=>значение для этой строки + * + * @param string $name имя класса + * @return DbSimple_Generic_Database указатель на себя + */ + public function setClassName($name) + { + $this->_className = $name; + return $this; + } + + /** * array getStatistics() * Returns various statistical information. */ @@ -507,6 +523,13 @@ abstract class DbSimple_Generic_Database extends DbSimple_Generic_LastError $total = call_user_func_array(array(&$this, 'selectCell'), $query); } + if ($this->_className) + { + foreach($result as $k=>$v) + $result[$k] = new $this->_className($v); + $this->_className = ''; + } + return $result; } @@ -1093,6 +1116,7 @@ abstract class DbSimple_Generic_Database extends DbSimple_Generic_LastError ); private $_cachePrefix = ''; + private $_className = ''; private $_logger = null; private $_cacher = null; ----------------------------------------------------------------------- Summary of changes: lib/DbSimple/Generic.php | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-31 09:08:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 7fca8066db3977af062c22a09b07835bd87ef229 (commit) via 7d80c3dd8b2e3538d0f28edd70a98d028c95c593 (commit) from 53922c5a78859feef3b94595404d00af323c506c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7fca8066db3977af062c22a09b07835bd87ef229 Author: Ivan1986 <iva...@li...> Date: Wed Mar 31 13:04:33 2010 +0400 PhpDOC и форматирование Curl diff --git a/lib/Curl.php b/lib/Curl.php index 7aa57f0..45c219a 100644 --- a/lib/Curl.php +++ b/lib/Curl.php @@ -35,13 +35,19 @@ class Curl unlink($this->cookie_file); } + /** + * Добавляет новую куку + * + * @param string $name имя + * @param string $value значение + */ public function addCookie($name,$value) { $this->cookies[$name] = $name.'='.$value.'; path=/'; } /** - * POST запрос по адресу + * Очистка печенек */ public function clearCookeis() { @@ -49,6 +55,11 @@ class Curl $this->cookies = array(); } + /** + * Возвращает последнюю ошибку + * + * @return string строка ошибки + */ public function error() { return $this->error; @@ -108,7 +119,6 @@ class Curl CURLOPT_REFERER => $this->referer, CURLOPT_URL => $url, - )); curl_setopt($handle, CURLOPT_COOKIEFILE, $this->cookie_file); curl_setopt($handle, CURLOPT_COOKIEJAR, $this->cookie_file); @@ -140,9 +150,8 @@ class Curl //Set any custom CURL options foreach ( $this->options as $option => $value ) - { - curl_setopt($handle, constant('CURLOPT_' . str_replace('CURLOPT_', '', strtoupper($option))), $value); - } + curl_setopt($handle, constant('CURLOPT_' . + str_replace('CURLOPT_', '', strtoupper($option))), $value); $response = curl_exec($handle); $header_size = curl_getinfo($handle,CURLINFO_HEADER_SIZE); @@ -170,19 +179,13 @@ class Curl */ class CurlResponse { - /** - * тело ответа - * - * @var string - */ + /** @var string тело ответа */ public $body = ''; - /** - * заголовки ответа - * - * @var array - */ + /** @var array заголовки ответа */ public $headers = array (); + + /** @var boolean Флаг для перекодировки */ private $win=false; public function __construct($response) @@ -209,7 +212,7 @@ class CurlResponse /** * Преобразовывает запрос из Win1251 в UTF-8 * - * Очень часто требуется, так как виндузятников развелось немеряно + * <br>Очень часто требуется, так как виндузятников развелось немеряно * * @return string преобразованная строка */ @@ -224,7 +227,7 @@ class CurlResponse /** * Просто тело запроса * - * @return string + * @return string результат запроса */ public function __toString() { @@ -265,12 +268,18 @@ class CurlResponse return $num===false ? $forms : $forms[$num]; } + /** + * Извлекает параметры из тега + * + * @param string $str тег + * @return array массив параметров + */ protected function parceTagParams($str) { $t = $x = array(); - preg_match_all('|([a-z]+)=([\'"]?)(.*?)\2|si',$str,$t); - for($i=0;$i<count($t[1]);$i++) - $x[$t[1][$i]] = $t[3][$i]; + preg_match_all('|([a-z]+)=([\'"]?)(.*?)\2|si', $str, $t); + for($i=0; $i<count($t[1]); $i++) + $x[$t[1][$i]] = $t[3][$i]; return $x; } commit 7d80c3dd8b2e3538d0f28edd70a98d028c95c593 Author: Ivan1986 <iva...@li...> Date: Wed Mar 31 12:58:06 2010 +0400 Исправлена ошибка с блокировкой двойного вызова diff --git a/lib/Lock.php b/lib/Lock.php index cf210f2..a50b7cb 100644 --- a/lib/Lock.php +++ b/lib/Lock.php @@ -15,10 +15,10 @@ class Lock static public function doubleRun($name, $message='') { static $lockfiles; - if (!isset($lockfiles['name'])) - $lockfiles['name'] = fopen(TMPPATH.'/'.$name.'.run', 'w'); - if (!$lockfiles['name'] || - !flock($lockfiles['name'], LOCK_EX | LOCK_NB) + if (!isset($lockfiles[$name])) + $lockfiles[$name] = fopen(TMPPATH.'/'.$name.'.run', 'w'); + if (!$lockfiles[$name] || + !flock($lockfiles[$name], LOCK_EX | LOCK_NB) ) die($message); } ----------------------------------------------------------------------- Summary of changes: lib/Curl.php | 49 +++++++++++++++++++++++++++++-------------------- lib/Lock.php | 8 ++++---- 2 files changed, 33 insertions(+), 24 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-31 08:48:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 53922c5a78859feef3b94595404d00af323c506c (commit) from 546866fd02d24540ff67ed6ab1a2236ebf71df42 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 53922c5a78859feef3b94595404d00af323c506c Author: Ivan1986 <iva...@li...> Date: Wed Mar 31 12:47:48 2010 +0400 Настройка скрипта расширений - папки создавать не нужно diff --git a/perm.sh b/perm.sh index 29700b3..a4174e4 100755 --- a/perm.sh +++ b/perm.sh @@ -5,11 +5,5 @@ cd `dirname $0` test -z "$1" && echo "usage prem.sh <rights>" && exit 1 -# нужно если используется git - он не создает папки -mkdir -p tmp/cache -mkdir -p log - chmod $1 -R tmp chmod $1 log -chmod $1 tests/Smarty/cache -chmod $1 tests/Smarty/templates_c ----------------------------------------------------------------------- Summary of changes: perm.sh | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-30 13:21:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 546866fd02d24540ff67ed6ab1a2236ebf71df42 (commit) via 5bb4948e715a9e456246433c3e1ea5ab06519e12 (commit) from c6714502a469a3834a755a661c08f289e0989919 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 546866fd02d24540ff67ed6ab1a2236ebf71df42 Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 17:14:32 2010 +0400 Отступы в Error.php diff --git a/QFW/QuickFW/Error.php b/QFW/QuickFW/Error.php index 932d4ef..7004293 100644 --- a/QFW/QuickFW/Error.php +++ b/QFW/QuickFW/Error.php @@ -1,71 +1,71 @@ <?php - /** - * Функция - обработчик ошибок - * На продакшене записывает в лог - * На тестовом вылетает как эксепшн - */ - function exception_error_handler($errno, $errstr, $errfile, $errline ) +/** + * Функция - обработчик ошибок + * На продакшене записывает в лог + * На тестовом вылетает как эксепшн + */ +function exception_error_handler($errno, $errstr, $errfile, $errline ) +{ + if (QFW::$config['QFW']['release']) { - if (QFW::$config['QFW']['release']) - { - require_once LIBPATH.'/Log.php'; - Log::log($errstr.' in '.$errfile.' on line '.$errline,'debug'); - return false; - } - throw new ErrorException($errstr, 0, $errno, $errfile, $errline); + require_once LIBPATH.'/Log.php'; + Log::log($errstr.' in '.$errfile.' on line '.$errline,'debug'); + return false; } - set_error_handler("exception_error_handler"); + throw new ErrorException($errstr, 0, $errno, $errfile, $errline); +} +set_error_handler("exception_error_handler"); - /** - * Обработка исключений - * Обрабатывает исключение неавторизованности как нормальное - показом контента - * Исключение 404 - показывает ошибку 404 - * Остальные - на продакшене 404 и в лог - * в дебаге - на страницу - */ - function exception_handler(Exception $exception) +/** + * Обработка исключений + * Обрабатывает исключение неавторизованности как нормальное - показом контента + * Исключение 404 - показывает ошибку 404 + * Остальные - на продакшене 404 и в лог + * в дебаге - на страницу + */ +function exception_handler(Exception $exception) +{ + $GLOBALS['DONE'] = 1; + if ($exception instanceof AuthException) + echo $exception->getMessage(); + elseif ($exception instanceof S404Exception) + QFW::$router->show404(); + elseif (QFW::$config['QFW']['release']) { - $GLOBALS['DONE'] = 1; - if ($exception instanceof AuthException) - echo $exception->getMessage(); - elseif ($exception instanceof S404Exception) - QFW::$router->show404(); - elseif (QFW::$config['QFW']['release']) - { - require_once LIBPATH.'/Log.php'; - Log::log("Uncaught exception: " . $exception->getMessage(),'debug'); - QFW::$router->show404(); - } - else - echo "Uncaught exception: " , $exception->getMessage(), "\n"; + require_once LIBPATH.'/Log.php'; + Log::log("Uncaught exception: " . $exception->getMessage(),'debug'); + QFW::$router->show404(); } - set_exception_handler('exception_handler'); + else + echo "Uncaught exception: " , $exception->getMessage(), "\n"; +} +set_exception_handler('exception_handler'); - /** - * Классы исключений - * - */ - class AuthException extends Exception {} - class S404Exception extends Exception {} +/** + * Классы исключений + * + */ +class AuthException extends Exception {} +class S404Exception extends Exception {} - /** - * Перехватчик фатальных ошибок - * В случае фатальной ошибки может что-то сделать - * TODO: Дописать коммент - */ - function FatalErrorHandler($text) - { - //тут определим что жопа не случилась - if ($GLOBALS['DONE']) - return false; - // Случилась жопа, начинаем обработку ошибок - QFW::Init(); - require_once LIBPATH.'/Log.php'; - Log::log("Fatal Error" ,'critical'); - //TODO: Выдирать лог ошибок и отправлять последние куда-то - return $text; - } - ob_start('FatalErrorHandler'); +/** + * Перехватчик фатальных ошибок + * В случае фатальной ошибки может что-то сделать + * TODO: Дописать коммент + */ +function FatalErrorHandler($text) +{ + //тут определим что жопа не случилась + if ($GLOBALS['DONE']) + return false; + // Случилась жопа, начинаем обработку ошибок + QFW::Init(); + require_once LIBPATH.'/Log.php'; + Log::log("Fatal Error" ,'critical'); + //TODO: Выдирать лог ошибок и отправлять последние куда-то + return $text; +} +ob_start('FatalErrorHandler'); ?> \ No newline at end of file commit 5bb4948e715a9e456246433c3e1ea5ab06519e12 Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 17:14:02 2010 +0400 Исправлены отступы в Cache.php diff --git a/QFW/QuickFW/Cache.php b/QFW/QuickFW/Cache.php index b9245fb..db8ac61 100644 --- a/QFW/QuickFW/Cache.php +++ b/QFW/QuickFW/Cache.php @@ -1,266 +1,266 @@ <?php +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to li...@ze... so we can send you a copy immediately. + * + * @category Zend + * @package Zend_Cache + * @subpackage Zend_Cache_Backend + * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +define('CACHE_CLR_ALL','all'); +define('CACHE_CLR_OLD','old'); +define('CACHE_CLR_TAG','tag'); +define('CACHE_CLR_NOT_TAG','notTag'); + +/** + * @package Zend_Cache + * @subpackage Zend_Cache_Backend + * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +interface Zend_Cache_Backend_Interface +{ /** - * Zend Framework + * Set the frontend directives * - * LICENSE + * @param array $directives assoc of directives + */ + public function setDirectives($directives); + + /** + * Test if a cache is available for the given id and (if yes) return it (false else) * - * This source file is subject to the new BSD license that is bundled - * with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://framework.zend.com/license/new-bsd - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to li...@ze... so we can send you a copy immediately. + * Note : return value is always "string" (unserialization is done by the core not by the backend) * - * @category Zend - * @package Zend_Cache - * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License + * @param string|array $id Cache id + * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested + * @return string|false cached datas */ - - define('CACHE_CLR_ALL','all'); - define('CACHE_CLR_OLD','old'); - define('CACHE_CLR_TAG','tag'); - define('CACHE_CLR_NOT_TAG','notTag'); - + public function load($id, $doNotTest = false); + /** - * @package Zend_Cache - * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License + * Test if a cache is available or not (for the given id) + * + * @param string|array $id cache id + * @return mixed|false (a cache is not available) or "last modified" timestamp (int) of the available cache record */ - interface Zend_Cache_Backend_Interface - { - /** - * Set the frontend directives - * - * @param array $directives assoc of directives - */ - public function setDirectives($directives); - - /** - * Test if a cache is available for the given id and (if yes) return it (false else) - * - * Note : return value is always "string" (unserialization is done by the core not by the backend) - * - * @param string|array $id Cache id - * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested - * @return string|false cached datas - */ - public function load($id, $doNotTest = false); - - /** - * Test if a cache is available or not (for the given id) - * - * @param string|array $id cache id - * @return mixed|false (a cache is not available) or "last modified" timestamp (int) of the available cache record - */ - public function test($id); - - /** - * Save some string datas into a cache record - * - * Note : $data is always "string" (serialization is done by the - * core not by the backend) - * - * @param string $data Datas to cache - * @param string $id Cache id - * @param array $tags Array of strings, the cache record will be tagged by each string entry - * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime) - * @return boolean true if no problem - */ - public function save($data, $id, $tags = array(), $specificLifetime = false); - - /** - * Remove a cache record - * - * @param string $id Cache id - * @return boolean True if no problem - */ - public function remove($id); - - /** - * Clean some cache records - * - * Available modes are : - * CACHE_CLR_ALL (default) => remove all cache entries ($tags is not used) - * CACHE_CLR_OLD => remove too old cache entries ($tags is not used) - * CACHE_CLR_TAG => remove cache entries matching all given tags - * ($tags can be an array of strings or a single string) - * CACHE_CLR_NOT_TAG => remove cache entries not {matching one of the given tags} - * ($tags can be an array of strings or a single string) - * - * @param string $mode Clean mode - * @param array $tags Array of tags - * @return boolean true if no problem - */ - public function clean($mode = CACHE_CLR_ALL, $tags = array()); - - } + public function test($id); /** - * Класс со статическими функциями - * фабрика объектов для работы с кешем + * Save some string datas into a cache record + * + * Note : $data is always "string" (serialization is done by the + * core not by the backend) + * + * @param string $data Datas to cache + * @param string $id Cache id + * @param array $tags Array of strings, the cache record will be tagged by each string entry + * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime) + * @return boolean true if no problem */ - class Cache - { - static $cachers=array(); + public function save($data, $id, $tags = array(), $specificLifetime = false); - private function __construct() {} + /** + * Remove a cache record + * + * @param string $id Cache id + * @return boolean True if no problem + */ + public function remove($id); - /** - * Фабрика кешеров - * - * @param string $name тип кешера - * @param string $namespace пространство имен - * @return Zend_Cache_Backend_Interface кешер - */ - public static function get($name='default', $ns='') - { - if (isset(self::$cachers[$name.'_'.$ns])) - return self::$cachers[$name.'_'.$ns]; - if (isset(self::$cachers['__'.$name])) - $c = self::$cachers['__'.$name]; - else - { - if (!isset(QFW::$config['cache'][$name])) - throw new Exception('Не найдены парамерты кеша '.$name); - $data = QFW::$config['cache'][$name]; - $backend=ucfirst($data['module']); - $cl='Cacher_'.$backend; - require_once(QFWPATH.'/Cacher/'.$backend.'.php'); - $c=new $cl; - $c->setDirectives( - (isset($data['options']) && is_array($data['options'])) - ? $data['options'] : array() - ); - self::$cachers['__'.$name] = $c; - } - - // если у нас не пустое пространство имен - юзаем проксирующий класс - if ($n = (isset($data['namespace']) ? $data['namespace'] : '').$ns) - $c=self::ns($c,$n); - if (isset($data['tags']) && $data['tags']) - { - require_once(QFWPATH.'/QuickFW/Cacher/TagEmu.php'); - $c=new Dklab_Cache_Backend_TagEmuWrapper($c); - } - return self::$cachers[$name.'_'.$ns]=$c; - } + /** + * Clean some cache records + * + * Available modes are : + * CACHE_CLR_ALL (default) => remove all cache entries ($tags is not used) + * CACHE_CLR_OLD => remove too old cache entries ($tags is not used) + * CACHE_CLR_TAG => remove cache entries matching all given tags + * ($tags can be an array of strings or a single string) + * CACHE_CLR_NOT_TAG => remove cache entries not {matching one of the given tags} + * ($tags can be an array of strings or a single string) + * + * @param string $mode Clean mode + * @param array $tags Array of tags + * @return boolean true if no problem + */ + public function clean($mode = CACHE_CLR_ALL, $tags = array()); - /** - * Фабрика пространств имен - * - * @param string $name имя пространства имен - * @return Dklab_Cache_Backend_NamespaceWrapper новое пространство имен - */ - public static function ns(Zend_Cache_Backend_Interface $cacher, $ns='') - { - require_once(QFWPATH.'/QuickFW/Cacher/Namespace.php'); - return new Dklab_Cache_Backend_NamespaceWrapper($cacher,$ns); - } +} + +/** + * Класс со статическими функциями + * фабрика объектов для работы с кешем + */ +class Cache +{ + static $cachers=array(); - /** - * Фабрика слотов - * - * @param string $name имя слота - * @return Dklab_Cache_Frontend_Slot новый слот - */ - public static function slot($name) + private function __construct() {} + + /** + * Фабрика кешеров + * + * @param string $name тип кешера + * @param string $namespace пространство имен + * @return Zend_Cache_Backend_Interface кешер + */ + public static function get($name='default', $ns='') + { + if (isset(self::$cachers[$name.'_'.$ns])) + return self::$cachers[$name.'_'.$ns]; + if (isset(self::$cachers['__'.$name])) + $c = self::$cachers['__'.$name]; + else { - require_once QFWPATH.'/QuickFW/Cacher/Slot.php'; - require_once APPPATH.'/_common/slots/'.$name.'.php'; - $args = func_get_args(); - array_shift($args); - $reflectionObj = new ReflectionClass('Slot_'.$name); - return $reflectionObj->newInstanceArgs($args); + if (!isset(QFW::$config['cache'][$name])) + throw new Exception('Не найдены парамерты кеша '.$name); + $data = QFW::$config['cache'][$name]; + $backend=ucfirst($data['module']); + $cl='Cacher_'.$backend; + require_once(QFWPATH.'/Cacher/'.$backend.'.php'); + $c=new $cl; + $c->setDirectives( + (isset($data['options']) && is_array($data['options'])) + ? $data['options'] : array() + ); + self::$cachers['__'.$name] = $c; } - /** - * Фабрика тегов - * - * @param string $name имя тега - * @return Dklab_Cache_Frontend_Tag новый тег - */ - public static function tag($name) + // если у нас не пустое пространство имен - юзаем проксирующий класс + if ($n = (isset($data['namespace']) ? $data['namespace'] : '').$ns) + $c=self::ns($c,$n); + if (isset($data['tags']) && $data['tags']) { - require_once QFWPATH.'/QuickFW/Cacher/Tag.php'; - require_once APPPATH.'/_common/tags/'.$name.'.php'; - $args = func_get_args(); - array_shift($args); - $reflectionObj = new ReflectionClass('Tag_'.$name); - return $reflectionObj->newInstanceArgs($args); + require_once(QFWPATH.'/QuickFW/Cacher/TagEmu.php'); + $c=new Dklab_Cache_Backend_TagEmuWrapper($c); } + return self::$cachers[$name.'_'.$ns]=$c; + } + /** + * Фабрика пространств имен + * + * @param string $name имя пространства имен + * @return Dklab_Cache_Backend_NamespaceWrapper новое пространство имен + */ + public static function ns(Zend_Cache_Backend_Interface $cacher, $ns='') + { + require_once(QFWPATH.'/QuickFW/Cacher/Namespace.php'); + return new Dklab_Cache_Backend_NamespaceWrapper($cacher,$ns); } /** - * нужна для того, что сессии используют кешер и они записывают данные - * после уничтожения всех обьектов, кешер пересоздается заново - * для записи сессий + * Фабрика слотов * - * @deprecated Используйте Cache::get() + * @param string $name имя слота + * @return Dklab_Cache_Frontend_Slot новый слот */ - function &getCache($backend='',$opt=array(),$tags=false,$namespace='') + public static function slot($name) { - global $config; - static $cachers=array(); - if ($backend=='') - $backend=ucfirst($config['cacher']['module']); - $key=crc32(serialize(func_get_args())); - if (isset($cachers[$key])) - return $cachers[$key]; + require_once QFWPATH.'/QuickFW/Cacher/Slot.php'; + require_once APPPATH.'/_common/slots/'.$name.'.php'; + $args = func_get_args(); + array_shift($args); + $reflectionObj = new ReflectionClass('Slot_'.$name); + return $reflectionObj->newInstanceArgs($args); + } - $cl='Cacher_'.$backend; - require_once(QFWPATH.'/Cacher/'.$backend.'.php'); - $c=new $cl; + /** + * Фабрика тегов + * + * @param string $name имя тега + * @return Dklab_Cache_Frontend_Tag новый тег + */ + public static function tag($name) + { + require_once QFWPATH.'/QuickFW/Cacher/Tag.php'; + require_once APPPATH.'/_common/tags/'.$name.'.php'; + $args = func_get_args(); + array_shift($args); + $reflectionObj = new ReflectionClass('Tag_'.$name); + return $reflectionObj->newInstanceArgs($args); + } - if (isset($config['cacher']['options'])) - $opt = array_merge($config['cacher']['options'],$opt); - $c->setDirectives($opt); +} - if ($namespace!='') - { - require_once(QFWPATH.'/QuickFW/Cacher/Namespace.php'); - $c=new Dklab_Cache_Backend_NamespaceWrapper($c,$namespace); - } - if ($tags) - { - require_once(QFWPATH.'/QuickFW/Cacher/TagEmu.php'); - $c=new Dklab_Cache_Backend_TagEmuWrapper($c); - } - $cachers[$key]=&$c; +/** + * нужна для того, что сессии используют кешер и они записывают данные + * после уничтожения всех обьектов, кешер пересоздается заново + * для записи сессий + * + * @deprecated Используйте Cache::get() + */ +function &getCache($backend='',$opt=array(),$tags=false,$namespace='') +{ + global $config; + static $cachers=array(); + if ($backend=='') + $backend=ucfirst($config['cacher']['module']); + $key=crc32(serialize(func_get_args())); + if (isset($cachers[$key])) return $cachers[$key]; - } - class Cache_Thru + $cl='Cacher_'.$backend; + require_once(QFWPATH.'/Cacher/'.$backend.'.php'); + $c=new $cl; + + if (isset($config['cacher']['options'])) + $opt = array_merge($config['cacher']['options'],$opt); + $c->setDirectives($opt); + + if ($namespace!='') + { + require_once(QFWPATH.'/QuickFW/Cacher/Namespace.php'); + $c=new Dklab_Cache_Backend_NamespaceWrapper($c,$namespace); + } + if ($tags) { - private $_cacher, $_obj, $_id, $_tags, $_lt; + require_once(QFWPATH.'/QuickFW/Cacher/TagEmu.php'); + $c=new Dklab_Cache_Backend_TagEmuWrapper($c); + } + $cachers[$key]=&$c; + return $cachers[$key]; +} - public function __construct($Cacher, $obj, $id, $tags, $lifeTime) - { - $this->_cacher = $Cacher; - $this->_obj = $obj; - $this->_id = $id; - $this->_tags = $tags; - $this->_lt = $lifeTime; - } +class Cache_Thru +{ + private $_cacher, $_obj, $_id, $_tags, $_lt; - public function __call($method, $args) - { - if (false === ($result = $this->_cacher->load($this->_id))) { - $result = call_user_func_array($this->_obj?array($this->_obj, $method):$method, $args); - $this->_cacher->save($result, $this->_id, $this->_tags, $this->_lt); - } - return $result; - } + public function __construct($Cacher, $obj, $id, $tags, $lifeTime) + { + $this->_cacher = $Cacher; + $this->_obj = $obj; + $this->_id = $id; + $this->_tags = $tags; + $this->_lt = $lifeTime; } - function thru($Cacher, $obj, $id, $tags=array(), $lifeTime=null) + public function __call($method, $args) { - return new Cache_Thru($Cacher, $obj, $id, $tags, $lifeTime); + if (false === ($result = $this->_cacher->load($this->_id))) { + $result = call_user_func_array($this->_obj?array($this->_obj, $method):$method, $args); + $this->_cacher->save($result, $this->_id, $this->_tags, $this->_lt); + } + return $result; } +} + +function thru($Cacher, $obj, $id, $tags=array(), $lifeTime=null) +{ + return new Cache_Thru($Cacher, $obj, $id, $tags, $lifeTime); +} -?> \ No newline at end of file +?> ----------------------------------------------------------------------- Summary of changes: QFW/QuickFW/Cache.php | 450 ++++++++++++++++++++++++------------------------ QFW/QuickFW/Error.php | 120 +++++++------- 2 files changed, 285 insertions(+), 285 deletions(-) hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-30 13:11:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via c6714502a469a3834a755a661c08f289e0989919 (commit) from f86cff47e740c38da7c9cc242959f4e4c902299b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c6714502a469a3834a755a661c08f289e0989919 Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 17:10:35 2010 +0400 Переписан кешер Berkeley DB через наследование diff --git a/QFW/Cacher/Bdb.php b/QFW/Cacher/Bdb.php index ad44598..a798617 100644 --- a/QFW/Cacher/Bdb.php +++ b/QFW/Cacher/Bdb.php @@ -26,29 +26,18 @@ class Cacher_Bdb implements Zend_Cache_Backend_Interface public function save($data, $id, $tags = array(), $specificLifetime = 3600) { if (!$this->file) $this->conn(); - return dba_replace($id,serialize(array(time()+$specificLifetime,$data)),$this->file); + return dba_replace($id,serialize($data),$this->file); } public function load($id, $doNotTest = false) { if (!$this->file) $this->conn(); - if (is_array($id)) - { - $x = array(); - foreach($id as $v) - $x[$v] = $this->load($v); - return $x; - } - $data=dba_fetch($id,$this->file); - if (!$data) - return false; - $data=unserialize($data); - if ($data[0]<time()) - { - dba_delete($id,$this->file); - return false; - } - return $data[1]; + if (!is_array($id)) + return unserialize(dba_fetch($id,$this->file)); + $x = array(); + foreach($id as $v) + $x[$v] = $this->load($v); + return $x; } public function test($id) diff --git a/QFW/Cacher/BdbSt.php b/QFW/Cacher/BdbSt.php deleted file mode 100644 index 2dc9932..0000000 --- a/QFW/Cacher/BdbSt.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -class Cacher_BdbSt implements Zend_Cache_Backend_Interface -{ - protected $file = NULL; - protected $opt = array(); - - public function __construct() - { - } - - public function setDirectives($directives) - { - $this->opt = array( - 'file' => isset($directives['file']) ? $directives['file'] : 'cache', - 'dba' => isset($directives['dba']) ? $directives['dba'] : 'db4', - 'type' => isset($directives['type']) ? $directives['type'] : 'cd', - ); - } - - private function conn() - { - $this->file=dba_open(TMPPATH.'/'.$this->opt['file'].'.'.$this->opt['dba'], $this->opt['type'], $this->opt['dba']); - } - - public function save($data, $id, $tags = array(), $specificLifetime = 3600) - { - if (!$this->file) $this->conn(); - return dba_replace($id,serialize($data),$this->file); - } - - public function load($id, $doNotTest = false) - { - if (!$this->file) $this->conn(); - if (!is_array($id)) - return unserialize(dba_fetch($id,$this->file)); - $x = array(); - foreach($id as $v) - $x[$v] = $this->load($v); - return $x; - } - - public function test($id) - { - return ($this->load($id)!==false); - } - - public function remove($id) - { - if (!$this->file) $this->conn(); - return dba_delete($id,$this->file); - } - - public function clean($mode = CACHE_CLR_ALL, $tags = array()) - { - if (!$this->file) $this->conn(); - $key=dba_firstkey($this->file); - if (!$key) - return; - do { - if ($mode == CACHE_CLR_ALL) - dba_delete($key,$this->file); - elseif($mode == CACHE_CLR_OLD) - { - $data=dba_fetch($key,$this->file); - $data=unserialize($data); - if ($data[0]<time()) - dba_delete($key,$this->file); - } - } while($key=dba_nextkey($this->file)); - dba_optimize($this->file); - dba_sync($this->file); - } - -} -?> \ No newline at end of file diff --git a/QFW/Cacher/BdbTime.php b/QFW/Cacher/BdbTime.php new file mode 100644 index 0000000..818d1f1 --- /dev/null +++ b/QFW/Cacher/BdbTime.php @@ -0,0 +1,36 @@ +<?php + +require_once dirname(__FILE__).'/Bdb.php'; + +/** + * Хранение в Berkeley DB ограниченное время + */ +class Cacher_BdbTime extends Cacher_Bdb implements Zend_Cache_Backend_Interface +{ + + public function save($data, $id, $tags = array(), $specificLifetime = 3600) + { + $data = serialize(array(time()+$specificLifetime,$data)); + return parent::save($data, $id, $tags, $specificLifetime); + } + + public function load($id, $doNotTest = false) + { + if (!$this->file) $this->conn(); + if (is_array($id)) + return parent::load($id, $doNotTest); + $data = parent::load($id, $doNotTest); + if (!$data) + return false; + $data=unserialize($data); + if ($data[0]<time()) + { + dba_delete($id,$this->file); + return false; + } + return $data[1]; + } + +} + +?> ----------------------------------------------------------------------- Summary of changes: QFW/Cacher/Bdb.php | 25 ++++----------- QFW/Cacher/BdbSt.php | 76 ------------------------------------------------ QFW/Cacher/BdbTime.php | 36 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 94 deletions(-) delete mode 100644 QFW/Cacher/BdbSt.php create mode 100644 QFW/Cacher/BdbTime.php hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-30 12:00:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via f86cff47e740c38da7c9cc242959f4e4c902299b (commit) from 1549de48418af2bdcc06bc335e20149cb907c5ea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f86cff47e740c38da7c9cc242959f4e4c902299b Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 15:59:18 2010 +0400 Удалил blankApp - если он и нужен, то не в таком виде diff --git a/blankApp/default.php b/blankApp/default.php deleted file mode 100644 index 906d906..0000000 --- a/blankApp/default.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -mb_internal_encoding("UTF-8"); - -/* настройки хоста - установка Content-Type: text/html; charset=encoding */ -$config['host']=array( - 'encoding' => 'utf-8', - 'lang' => 'ru_RU', - 'logpath' => ROOTPATH.'/log', -); - -/* Настройки дефолтового MCA */ -$config['default']=array( - 'module' => 'default', - 'controller' => 'index', - 'action' => 'index', -); - -/* Настройки коннекта к базе данных */ -$config['database']=array( - 'type' => 'mysql', - 'host' => 'localhost', - 'username' => 'root', - 'password' => '', - 'dbname' => '', - 'prefix' => '', - 'encoding' => 'utf8', -); -$config['database']='mypdo://root@localhost/base?enc=utf8&persist=1'; - -/* Настройки перенаправления */ -/* -$config['redirection']=array(); -$config['redirection']['baseUrl']='/'; -$config['redirection']['useIndex']=false; -$config['redirection']['defExt']=''; -$config['redirection']['useRewrite']=true; -$config['redirection']['useBlockRewrite']=false; -*/ - -/* Настройки кешера (класс бекенда и дополнительные параметры, если есть) */ -/*$config['cacher']=array( - 'module' => 'Memcache', -);*/ -$config['cacher']=array( - 'module' => 'File', -); - -/** - * Флаги, влияющие на поведение всяких вещей - */ -$config['QFW'] = array( - 'release' => false, /* статус проекта на данном хосте - отладка и всякие быстрые компиляции */ - 'catchFE' => false, /* перехват ошибок как исключений, исключений как логов и фатальных ошибок */ - 'ErrorStack' => false, /* вывод стека вызовов в сообщении об ошибке в БД */ -); - -/* Шаблонизатор - имя класса + дефолтовый шаблон */ -$config['templater']= array( - 'name' => 'PlainView', - 'def_tpl' => 'main.html', -); - -/* -$config['templater']= array( - 'name' => 'Smarty', - 'def_tpl' => 'main.tpl', -); - -$config['templater']= array( - 'name' => 'Proxy', - 'def_tpl' => 'main.html', - 'exts' => array( - 'tpl' => 'Smarty', - 'html' => 'PlainView', - ), -); -*/ - -/* деквотатор, включите если нужно на хостинге */ -/* -function strips(&$el) { - if (is_array($el)) - foreach($el as $k=>$v) - strips($el[$k]); - else $el = stripslashes($el); -} -if (get_magic_quotes_gpc()) { - strips($_GET); - strips($_POST); - strips($_COOKIE); - strips($_REQUEST); - if (isset($_SERVER['PHP_AUTH_USER'])) strips($_SERVER['PHP_AUTH_USER']); - if (isset($_SERVER['PHP_AUTH_PW'])) strips($_SERVER['PHP_AUTH_PW']); -} -set_magic_quotes_runtime(0); -/**/ - -?> \ No newline at end of file diff --git a/blankApp/default/controllers/IndexController.php b/blankApp/default/controllers/IndexController.php deleted file mode 100644 index eea551f..0000000 --- a/blankApp/default/controllers/IndexController.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -class IndexController -{ - public function indexAction() - { - return 'It\'s Work!!!'; - } - -} - -?> \ No newline at end of file diff --git a/blankApp/default/templates/404.html b/blankApp/default/templates/404.html deleted file mode 100644 index 0966730..0000000 --- a/blankApp/default/templates/404.html +++ /dev/null @@ -1,17 +0,0 @@ -<html> -<head><title>Страница не найдена</title></head> -<body> -<table height="100%" cellpadding="0" cellspacing="0" width="100%" border=0> -<tr valign="top"> - <td align="center" width=100%> - <META HTTP-EQUIV="REFRESH" CONTENT="30; URL=/"> -<center><table height=100%><td><tt><b><big><big> -<p>Мой юный друг, спросивший о странице! -<br>Неумолимо время. И былых -<br>Страниц теперь уж нет на тех местах, -<br>Где ранее цвели, подобно хмелю! -</big> -<p><i><div align=right>Еггог ЧОЧ "Сказание о Ноте Фаунде"</div></i> -</big></b></tt></td></table> -</body> -</html> \ No newline at end of file diff --git a/blankApp/default/templates/main.html b/blankApp/default/templates/main.html deleted file mode 100644 index 626564f..0000000 --- a/blankApp/default/templates/main.html +++ /dev/null @@ -1 +0,0 @@ -<?=$content; ?> diff --git a/blankApp/default/templates/main.tpl b/blankApp/default/templates/main.tpl deleted file mode 100644 index ce0fc1b..0000000 --- a/blankApp/default/templates/main.tpl +++ /dev/null @@ -1 +0,0 @@ -{$content} \ No newline at end of file diff --git a/blankApp/rewrite.php b/blankApp/rewrite.php deleted file mode 100644 index 5a8b367..0000000 --- a/blankApp/rewrite.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -$rewrite = array( -); -$backrewrite = array( -); - -?> \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: blankApp/default.php | 99 ---------------------- blankApp/default/controllers/IndexController.php | 12 --- blankApp/default/templates/404.html | 17 ---- blankApp/default/templates/main.html | 1 - blankApp/default/templates/main.tpl | 1 - blankApp/rewrite.php | 8 -- 6 files changed, 0 insertions(+), 138 deletions(-) delete mode 100644 blankApp/default.php delete mode 100644 blankApp/default/controllers/IndexController.php delete mode 100644 blankApp/default/templates/404.html delete mode 100644 blankApp/default/templates/main.html delete mode 100644 blankApp/default/templates/main.tpl delete mode 100644 blankApp/rewrite.php hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-30 11:30:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 1549de48418af2bdcc06bc335e20149cb907c5ea (commit) via 7536cca023849240d8e6362df445f39004734c6a (commit) from 86e1c657f85b3dfed5cbd488d89738193a50e817 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1549de48418af2bdcc06bc335e20149cb907c5ea Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 15:29:39 2010 +0400 Исправлено PhpDOC класса Templater diff --git a/QFW/Templater/Templater.php b/QFW/Templater/Templater.php index fa52621..92919ec 100644 --- a/QFW/Templater/Templater.php +++ b/QFW/Templater/Templater.php @@ -22,32 +22,29 @@ abstract class Templater } /** - * Assign variables to the template - * - * Allows setting a specific key to the specified value, OR passing an array - * of key => value pairs to set en masse. - * - * @param string|array $spec The assignment strategy to use (key or array of key - * => value pairs) - * @param mixed $value (Optional) If assigning a named variable, use this - * as the value. - * @return Templater_PlainView - */ - public function assign($spec, $value = null) + * Присваение значения переменной шаблона + * + * Allows setting a specific key to the specified value, OR passing an array + * of key => value pairs to set en masse. + * + * @param string|array $name Имя переменной или массив (ключ => значение) + * @param mixed $value Значение переменной, если первый параметр не массив + * @return Templater_PlainView Ссылка на себя + */ + public function assign($name, $value = null) { - if (is_array($spec)) - $this->_vars = array_merge($this->_vars, $spec); + if (is_array($name)) + $this->_vars = array_merge($this->_vars, $name); else - $this->_vars[$spec] = $value; + $this->_vars[$name] = $value; return $this; } /** - * Clear assigned variable - * - * @param string|array - * @return void - */ + * Удаляет указанную переменную из шаблона + * + * @param string|array имя переменной или массив имен + */ public function delete($spec) { if (is_array($spec)) @@ -58,10 +55,9 @@ abstract class Templater } /** - * Clear all assigned variables - * - * @return void - */ + * Очистка всех установленных переменных + * + */ public function clearVars() { $this->_vars=array(); commit 7536cca023849240d8e6362df445f39004734c6a Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 15:29:11 2010 +0400 Игнорирование генерируемой документации diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d81ed1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/tmp/doc \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + QFW/Templater/Templater.php | 44 +++++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 .gitignore hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-30 08:59:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 86e1c657f85b3dfed5cbd488d89738193a50e817 (commit) from 194a542c04f4ae328d236d5ef4521cab5bd85aae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 86e1c657f85b3dfed5cbd488d89738193a50e817 Author: Ivan1986 <iva...@li...> Date: Tue Mar 30 12:51:46 2010 +0400 Перевод на git - добавлены файлы для пустых папок diff --git a/application/_common/models/.emptydir b/application/_common/models/.emptydir new file mode 100644 index 0000000..625cb36 --- /dev/null +++ b/application/_common/models/.emptydir @@ -0,0 +1 @@ +models dir \ No newline at end of file diff --git a/application/_common/slots/.emptydir b/application/_common/slots/.emptydir new file mode 100644 index 0000000..e89abae --- /dev/null +++ b/application/_common/slots/.emptydir @@ -0,0 +1 @@ +slots dir \ No newline at end of file diff --git a/application/_common/slots/Test.php b/application/_common/slots/Test.php deleted file mode 100644 index e336c57..0000000 --- a/application/_common/slots/Test.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -class Slot_Test extends Dklab_Cache_Frontend_Slot -{ - public function __construct($id) - { - parent::__construct('test_'.$id,3600*24); - } - - protected function _getBackend() - { - return Cache::get(); - } -} - -?> \ No newline at end of file diff --git a/application/_common/tags/.emptydir b/application/_common/tags/.emptydir new file mode 100644 index 0000000..aef7fb2 --- /dev/null +++ b/application/_common/tags/.emptydir @@ -0,0 +1 @@ +tags dir \ No newline at end of file diff --git a/log/.emptydir b/log/.emptydir new file mode 100644 index 0000000..bd64b77 --- /dev/null +++ b/log/.emptydir @@ -0,0 +1 @@ +dir for log files \ No newline at end of file diff --git a/tmp/.emptydir b/tmp/.emptydir new file mode 100644 index 0000000..a459890 --- /dev/null +++ b/tmp/.emptydir @@ -0,0 +1 @@ +dir for temp files \ No newline at end of file diff --git a/tmp/cache/.emptydir b/tmp/cache/.emptydir new file mode 100644 index 0000000..c42fd2c --- /dev/null +++ b/tmp/cache/.emptydir @@ -0,0 +1 @@ +dir for file cache \ No newline at end of file diff --git a/www/css/.emptydir b/www/css/.emptydir new file mode 100644 index 0000000..2d80147 --- /dev/null +++ b/www/css/.emptydir @@ -0,0 +1 @@ +css dir \ No newline at end of file diff --git a/www/img/.emptydir b/www/img/.emptydir new file mode 100644 index 0000000..6a17a40 --- /dev/null +++ b/www/img/.emptydir @@ -0,0 +1 @@ +images dir \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: application/_common/models/.emptydir | 1 + application/_common/slots/.emptydir | 1 + application/_common/slots/Test.php | 16 ---------------- application/_common/tags/.emptydir | 1 + log/.emptydir | 1 + tmp/.emptydir | 1 + tmp/cache/.emptydir | 1 + www/css/.emptydir | 1 + www/img/.emptydir | 1 + 9 files changed, 8 insertions(+), 16 deletions(-) create mode 100644 application/_common/models/.emptydir create mode 100644 application/_common/slots/.emptydir delete mode 100644 application/_common/slots/Test.php create mode 100644 application/_common/tags/.emptydir create mode 100644 log/.emptydir create mode 100644 tmp/.emptydir create mode 100644 tmp/cache/.emptydir create mode 100644 www/css/.emptydir create mode 100644 www/img/.emptydir hooks/post-receive -- quickfw |
From: Ivan1986 <iva...@us...> - 2010-03-30 08:41:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "quickfw". The branch, master has been updated via 578895f241d1b5d2394e3fd62aac6f86383042fc (commit) from 194a542c04f4ae328d236d5ef4521cab5bd85aae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 578895f241d1b5d2394e3fd62aac6f86383042fc Author: Ivan Borzenkov <iva...@li...> Date: Tue Mar 30 12:39:56 2010 +0400 Перевод на git - добавлены файлы для пустых папок diff --git a/application/_common/models/.emptydir b/application/_common/models/.emptydir new file mode 100644 index 0000000..625cb36 --- /dev/null +++ b/application/_common/models/.emptydir @@ -0,0 +1 @@ +models dir \ No newline at end of file diff --git a/application/_common/slots/.emptydir b/application/_common/slots/.emptydir new file mode 100644 index 0000000..e89abae --- /dev/null +++ b/application/_common/slots/.emptydir @@ -0,0 +1 @@ +slots dir \ No newline at end of file diff --git a/application/_common/slots/Test.php b/application/_common/slots/Test.php deleted file mode 100644 index e336c57..0000000 --- a/application/_common/slots/Test.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -class Slot_Test extends Dklab_Cache_Frontend_Slot -{ - public function __construct($id) - { - parent::__construct('test_'.$id,3600*24); - } - - protected function _getBackend() - { - return Cache::get(); - } -} - -?> \ No newline at end of file diff --git a/application/_common/tags/.emptydir b/application/_common/tags/.emptydir new file mode 100644 index 0000000..aef7fb2 --- /dev/null +++ b/application/_common/tags/.emptydir @@ -0,0 +1 @@ +tags dir \ No newline at end of file diff --git a/log/.emptydir b/log/.emptydir new file mode 100644 index 0000000..bd64b77 --- /dev/null +++ b/log/.emptydir @@ -0,0 +1 @@ +dir for log files \ No newline at end of file diff --git a/tmp/.emptydir b/tmp/.emptydir new file mode 100644 index 0000000..a459890 --- /dev/null +++ b/tmp/.emptydir @@ -0,0 +1 @@ +dir for temp files \ No newline at end of file diff --git a/tmp/cache/.emptydir b/tmp/cache/.emptydir new file mode 100644 index 0000000..c42fd2c --- /dev/null +++ b/tmp/cache/.emptydir @@ -0,0 +1 @@ +dir for file cache \ No newline at end of file diff --git a/www/css/.emptydir b/www/css/.emptydir new file mode 100644 index 0000000..2d80147 --- /dev/null +++ b/www/css/.emptydir @@ -0,0 +1 @@ +css dir \ No newline at end of file diff --git a/www/img/.emptydir b/www/img/.emptydir new file mode 100644 index 0000000..6a17a40 --- /dev/null +++ b/www/img/.emptydir @@ -0,0 +1 @@ +images dir \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: application/_common/models/.emptydir | 1 + application/_common/slots/.emptydir | 1 + application/_common/slots/Test.php | 16 ---------------- application/_common/tags/.emptydir | 1 + log/.emptydir | 1 + tmp/.emptydir | 1 + tmp/cache/.emptydir | 1 + www/css/.emptydir | 1 + www/img/.emptydir | 1 + 9 files changed, 8 insertions(+), 16 deletions(-) create mode 100644 application/_common/models/.emptydir create mode 100644 application/_common/slots/.emptydir delete mode 100644 application/_common/slots/Test.php create mode 100644 application/_common/tags/.emptydir create mode 100644 log/.emptydir create mode 100644 tmp/.emptydir create mode 100644 tmp/cache/.emptydir create mode 100644 www/css/.emptydir create mode 100644 www/img/.emptydir hooks/post-receive -- quickfw |