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
|