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 05d5cc1d8028fa113adc899eb739308dee395b43 (commit)
via 27777b75651a10394a1729a229c7b28cd51304d8 (commit)
from ccd4b3c9746fbe737107664270f7e0475f3ba3e1 (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 05d5cc1d8028fa113adc899eb739308dee395b43
Author: Ivan Borzenkov <iva...@li...>
Date: Thu Apr 14 23:48:19 2011 +0400
Константы определяются перед автолоадом
diff --git a/QFW/Init.php b/QFW/Init.php
index fd55071..3ea7dfc 100644
--- a/QFW/Init.php
+++ b/QFW/Init.php
@@ -1,19 +1,18 @@
<?php
-//регаем автолоад
-require_once QFWPATH.'/QuickFW/Autoload.php';
-Autoload::Init();
-
//определяем пути относительно известных
if (!defined('TMPPATH'))
define('TMPPATH', VARPATH.'/tmp');
if (!defined('LOGPATH'))
define('LOGPATH', VARPATH.'/log');
if (!defined('COMPATH'))
- define ('COMPATH', APPPATH . '/_common');
+ define ('COMPATH', APPPATH.'/_common');
if (!defined('MODPATH'))
- define ('MODPATH', COMPATH . '/models');
+ define ('MODPATH', COMPATH.'/models');
+//регаем автолоад
+require_once QFWPATH.'/QuickFW/Autoload.php';
+Autoload::Init();
class QFW
{
diff --git a/cron/cruise.php b/cron/cruise.php
index ae8f4e0..c7cc548 100644
--- a/cron/cruise.php
+++ b/cron/cruise.php
@@ -7,9 +7,10 @@
define ('LIBPATH', ROOTPATH . '/lib');
//Настройки по умолчанию, если нужно - измените
-// define ('TMPPATH', VARPATH . '/tmp');
-// define ('LOGPATH', VARPATH . '/log');
-// define ('MODPATH', APPPATH . '/_common/models');
+// define ('TMPPATH', VARPATH . '/tmp');
+// define ('LOGPATH', VARPATH . '/log');
+// define ('COMPATH', APPPATH . '/_common');
+// define ('MODPATH', COMPATH . '/models');
if (empty($_SERVER['HTTP_HOST']))
$_SERVER['HTTP_HOST'] = gethostname();
diff --git a/cron/start.php b/cron/start.php
index 30ea766..48ac725 100644
--- a/cron/start.php
+++ b/cron/start.php
@@ -7,9 +7,10 @@
define ('LIBPATH', ROOTPATH . '/lib');
//Настройки по умолчанию, если нужно - измените
-// define ('TMPPATH', VARPATH . '/tmp');
-// define ('LOGPATH', VARPATH . '/log');
-// define ('MODPATH', APPPATH . '/_common/models');
+// define ('TMPPATH', VARPATH . '/tmp');
+// define ('LOGPATH', VARPATH . '/log');
+// define ('COMPATH', APPPATH . '/_common');
+// define ('MODPATH', COMPATH . '/models');
if (empty($_SERVER['HTTP_HOST']))
$_SERVER['HTTP_HOST'] = gethostname();
diff --git a/www/index.php b/www/index.php
index 17b6317..9562d55 100644
--- a/www/index.php
+++ b/www/index.php
@@ -7,11 +7,11 @@
define ('LIBPATH', ROOTPATH . '/lib');
//Настройки по умолчанию, если нужно - измените
-// define ('TMPPATH', VARPATH . '/tmp');
-// define ('LOGPATH', VARPATH . '/log');
-// define ('COMPATH', APPPATH . '/_common');
-// define ('MODPATH', COMPATH . '/models');
-
+// define ('TMPPATH', VARPATH . '/tmp');
+// define ('LOGPATH', VARPATH . '/log');
+// define ('COMPATH', APPPATH . '/_common');
+// define ('MODPATH', COMPATH . '/models');
+
require (QFWPATH.'/Init.php');
QFW::$router->route();
commit 27777b75651a10394a1729a229c7b28cd51304d8
Author: Ivan Borzenkov <iva...@li...>
Date: Thu Apr 14 23:46:51 2011 +0400
Константа COMPATH
diff --git a/QFW/Init.php b/QFW/Init.php
index 3520217..fd55071 100644
--- a/QFW/Init.php
+++ b/QFW/Init.php
@@ -9,8 +9,10 @@ if (!defined('TMPPATH'))
define('TMPPATH', VARPATH.'/tmp');
if (!defined('LOGPATH'))
define('LOGPATH', VARPATH.'/log');
+if (!defined('COMPATH'))
+ define ('COMPATH', APPPATH . '/_common');
if (!defined('MODPATH'))
- define ('MODPATH', APPPATH . '/_common/models');
+ define ('MODPATH', COMPATH . '/models');
class QFW
diff --git a/QFW/QuickFW/Autoload.php b/QFW/QuickFW/Autoload.php
index 5e00e05..165ab67 100644
--- a/QFW/QuickFW/Autoload.php
+++ b/QFW/QuickFW/Autoload.php
@@ -109,12 +109,12 @@ class Autoload
{
if (strpos($class, 'Slot_') === 0)
{
- require APPPATH.'/_common/slots/'.substr($class, 5).'.php';
+ require COMPATH.'/slots/'.substr($class, 5).'.php';
return true;
}
if (strpos($class, 'Tag_') === 0)
{
- require APPPATH.'/_common/tags/'.substr($class, 4).'.php';
+ require COMPATH.'/tags/'.substr($class, 4).'.php';
return true;
}
return false;
diff --git a/QFW/QuickFW/Cache.php b/QFW/QuickFW/Cache.php
index 3f66fd0..b68c372 100644
--- a/QFW/QuickFW/Cache.php
+++ b/QFW/QuickFW/Cache.php
@@ -175,7 +175,7 @@ class Cache
public static function slot($name)
{
require_once QFWPATH.'/QuickFW/Cacher/Slot.php';
- require_once APPPATH.'/_common/slots/'.$name.'.php';
+ require_once COMPATH.'/slots/'.$name.'.php';
$args = func_get_args();
array_shift($args);
$reflectionObj = new ReflectionClass('Slot_'.$name);
@@ -191,7 +191,7 @@ class Cache
public static function tag($name)
{
require_once QFWPATH.'/QuickFW/Cacher/Tag.php';
- require_once APPPATH.'/_common/tags/'.$name.'.php';
+ require_once COMPATH.'/tags/'.$name.'.php';
$args = func_get_args();
array_shift($args);
$reflectionObj = new ReflectionClass('Tag_'.$name);
diff --git a/application/default/controllers/CssController.php b/application/default/controllers/CssController.php
index d5f0651..1770ec7 100644
--- a/application/default/controllers/CssController.php
+++ b/application/default/controllers/CssController.php
@@ -17,7 +17,7 @@ class CssController
public function __construct()
{
//$this->path = DOC_ROOT.'/css';
- $this->path = APPPATH.'/_common/css';
+ $this->path = COMPATH.'/css';
}
/**
diff --git a/application/default/controllers/JsController.php b/application/default/controllers/JsController.php
index fd772dc..c381f18 100644
--- a/application/default/controllers/JsController.php
+++ b/application/default/controllers/JsController.php
@@ -12,7 +12,7 @@ class JsController
public function __construct()
{
//$this->path = DOC_ROOT.'/js';
- $this->path = APPPATH.'/_common/js';
+ $this->path = COMPATH.'/js';
}
/**
diff --git a/doc/asciidoc/directory.txt b/doc/asciidoc/directory.txt
index fba5414..80a103d 100644
--- a/doc/asciidoc/directory.txt
+++ b/doc/asciidoc/directory.txt
@@ -9,7 +9,7 @@
<HTTP_HOST>.php;;
Здесь находятся настройки, специфичные для конкретного хоста, например подключение к тестовой/локальной базе данных или proxy для корректной работы Curl
_common/;;
- папка для общих моделей, слотов, тегов, и прочих ресурсов всего сайта
+ константа +COMPATH+ - папка для общих моделей, слотов, тегов, и прочих ресурсов всего сайта
*default/*;;
Здесь находится основной модуль на который передается управление
controllers/:::
diff --git a/tests/QFWTests.php b/tests/QFWTests.php
index 12e4ac4..285af45 100644
--- a/tests/QFWTests.php
+++ b/tests/QFWTests.php
@@ -5,7 +5,8 @@
define ('VARPATH', ROOTPATH . '/vap');
define ('QFWPATH', ROOTPATH . '/QFW');
define ('LIBPATH', ROOTPATH . '/lib');
- define ('MODPATH', APPPATH . '/_common/models');
+ define ('COMPATH', APPPATH . '/_common');
+ define ('MODPATH', COMPATH . '/models');
$_SERVER['HTTP_HOST'] = 'test';
diff --git a/www/index.php b/www/index.php
index 797f30d..17b6317 100644
--- a/www/index.php
+++ b/www/index.php
@@ -9,7 +9,8 @@
//Настройки по умолчанию, если нужно - измените
// define ('TMPPATH', VARPATH . '/tmp');
// define ('LOGPATH', VARPATH . '/log');
-// define ('MODPATH', APPPATH . '/_common/models');
+// define ('COMPATH', APPPATH . '/_common');
+// define ('MODPATH', COMPATH . '/models');
require (QFWPATH.'/Init.php');
-----------------------------------------------------------------------
Summary of changes:
QFW/Init.php | 11 ++++++-----
QFW/QuickFW/Autoload.php | 4 ++--
QFW/QuickFW/Cache.php | 4 ++--
application/default/controllers/CssController.php | 2 +-
application/default/controllers/JsController.php | 2 +-
cron/cruise.php | 7 ++++---
cron/start.php | 7 ++++---
doc/asciidoc/directory.txt | 2 +-
tests/QFWTests.php | 3 ++-
www/index.php | 9 +++++----
10 files changed, 28 insertions(+), 23 deletions(-)
hooks/post-receive
--
quickfw
|