From 4d493cc57925157f754cfed7a5eea9a104e19c0f Mon Sep 17 00:00:00 2001 From: aterekhov Date: Sun, 25 Oct 2009 21:39:16 +0000 Subject: [PATCH] No newline at end of file #0 git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@106 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/Action.class.php | 2 +- classes/Cache.class.php | 2 +- classes/DBConnector.class.php | 2 +- classes/Decorator.class.php | 10 +++++----- classes/DynamicPageException.class.php | 10 +++++----- classes/Env.class.php | 2 +- classes/Format.class.php | 6 +++--- classes/Load.class.php | 12 ++++++------ classes/MJException.class.php | 2 +- classes/Mailer.class.php | 26 +++++++++++++------------- classes/Model.class.php | 2 +- classes/PageController.class.php | 8 ++++---- classes/Pager.class.php | 26 +++++++++++++------------- classes/Router.class.php | 2 +- classes/StaticPageException.class.php | 10 +++++----- classes/Sublimer.class.php | 2 +- classes/pg_DBConnector.class.php | 2 +- init/init.inc.php | 2 +- init/sys.inc.php | 2 +- 19 files changed, 65 insertions(+), 65 deletions(-) diff --git a/classes/Action.class.php b/classes/Action.class.php index 1252748..55da923 100644 --- a/classes/Action.class.php +++ b/classes/Action.class.php @@ -106,4 +106,4 @@ abstract class Action } } } -?> +?> \ No newline at end of file diff --git a/classes/Cache.class.php b/classes/Cache.class.php index 9f4588b..5f93cde 100644 --- a/classes/Cache.class.php +++ b/classes/Cache.class.php @@ -133,4 +133,4 @@ final class Cache } } -?> +?> \ No newline at end of file diff --git a/classes/DBConnector.class.php b/classes/DBConnector.class.php index c46da2b..b670c24 100644 --- a/classes/DBConnector.class.php +++ b/classes/DBConnector.class.php @@ -156,4 +156,4 @@ class DBConnector return mysqli_rollback($handler); } } -?> +?> \ No newline at end of file diff --git a/classes/Decorator.class.php b/classes/Decorator.class.php index 1fb7605..0f0707c 100644 --- a/classes/Decorator.class.php +++ b/classes/Decorator.class.php @@ -1,12 +1,12 @@ - * @link + * @copyright NetMonsters + * @link * @package Majestic * @subpackage Decorator - * @since + * @since * @version SVN: $Id$ * @filesource $URL$ */ @@ -59,4 +59,4 @@ abstract class Decorator */ abstract function exec(); } -?> +?> \ No newline at end of file diff --git a/classes/DynamicPageException.class.php b/classes/DynamicPageException.class.php index a9e0485..f551267 100644 --- a/classes/DynamicPageException.class.php +++ b/classes/DynamicPageException.class.php @@ -1,16 +1,16 @@ - * @link + * @copyright NetMonsters + * @link * @package Majestic * @subpackage Core - * @since + * @since * @version SVN: $Id$ * @filesource $URL$ */ class DynamicPageException extends Exception {} -?> +?> \ No newline at end of file diff --git a/classes/Env.class.php b/classes/Env.class.php index ea68c6b..aa3b9cb 100644 --- a/classes/Env.class.php +++ b/classes/Env.class.php @@ -88,4 +88,4 @@ final class Env return $param ? $res[$param] : $res; } } -?> +?> \ No newline at end of file diff --git a/classes/Format.class.php b/classes/Format.class.php index d69a175..cc505fd 100644 --- a/classes/Format.class.php +++ b/classes/Format.class.php @@ -191,7 +191,7 @@ class Format } return ''; } - + /** * Байты в мегабайты * @param int $bytes @@ -202,7 +202,7 @@ class Format $mb = number_format((int) $bytes / 1024 / 1024, 2, '.', ''); return preg_replace("/(\.?)0+$/", "", $mb) . 'МБ'; } - + /** * Байты в килобайты * @param int $bytes @@ -219,4 +219,4 @@ class Format * Оффсет с учетом летнего/зимнего времени */ Format::setTimezoneOffset(date('Z') - ((date('I') ? 60*60 : 0 ))); -?> +?> \ No newline at end of file diff --git a/classes/Load.class.php b/classes/Load.class.php index 2a54ad4..d05e1e5 100644 --- a/classes/Load.class.php +++ b/classes/Load.class.php @@ -1,12 +1,12 @@ - * @link + * + * @copyright NetMonsters + * @link * @package Majestic * @subpackage Load - * @since + * @since * @version SVN: $Id$ * @filesource $URL$ */ @@ -21,7 +21,7 @@ class Load if (isset(self::$models[$model_name])) { return self::$models[$model_name]; } - + $class_name = $model_name.MODEL_POSTFIX; return self::$models[$model_name] = new $class_name; } @@ -42,4 +42,4 @@ class Load return self::$router ? self::$router : self::$router = new Router; } } -?> +?> \ No newline at end of file diff --git a/classes/MJException.class.php b/classes/MJException.class.php index 6c63cf9..6fb9ed4 100644 --- a/classes/MJException.class.php +++ b/classes/MJException.class.php @@ -63,4 +63,4 @@ class MJException extends Exception return $return . ''; } } -?> +?> \ No newline at end of file diff --git a/classes/Mailer.class.php b/classes/Mailer.class.php index be5c4ca..aaf88a5 100644 --- a/classes/Mailer.class.php +++ b/classes/Mailer.class.php @@ -1,12 +1,12 @@ + * + * @copyright NetMonsters * @link http://netmonsters.ru * @package Core * @subpackage mail - * @since + * @since * @version SVN: $Id$ * @filesource $URL$ */ @@ -18,16 +18,16 @@ class Mailer public $templater; public $headers; protected $host; - - function __construct($host, $template = null) + + function __construct($host, $template = null) { if ($template !== null) { $this->templater = Load::templater(ACTION_TPL_PATH . '/' . $this->template_dir); $this->template = $template; } - + $this->host = $host; - + $this->headers .= 'From: robot@' . $this->host . "\r\n"; $this->headers .= 'Date: '. date('r') ."\r\n"; $this->headers .= "Return-Path: robot@". $this->host ."\r\n"; @@ -43,7 +43,7 @@ class Mailer /** * Отправляет письма - * + * * @param mixed $mail * @param mixed $subject * @param mixed $data @@ -51,19 +51,19 @@ class Mailer function send ($mail, $subject, $data) { $this->headers .= "To: ".$mail."\r\n"; - + foreach ($data as $key => $val) { $this->templater->assign($key, $val); } - + $message = $this->templater->fetch($this->template.'.tpl'); $encoded_subject = '=?UTF-8?B?' . base64_encode($subject) . "?=\r\n"; return mail($mail, $subject, $message, $this->headers); } - + /** * Отправка письма с непосредственным указанием контента - * + * * @param string $email * @param string $subject * @param string $content @@ -75,4 +75,4 @@ class Mailer return mail($email, $encoded_subject, $content, $this->headers); } } -?> +?> \ No newline at end of file diff --git a/classes/Model.class.php b/classes/Model.class.php index 26b1fb8..b849142 100644 --- a/classes/Model.class.php +++ b/classes/Model.class.php @@ -250,4 +250,4 @@ class ModelInsertResult extends ModelChangeResult return $this->id; } } -?> +?> \ No newline at end of file diff --git a/classes/PageController.class.php b/classes/PageController.class.php index dc9208c..1e2d752 100644 --- a/classes/PageController.class.php +++ b/classes/PageController.class.php @@ -12,16 +12,16 @@ */ class PageController { - + /** * Действия на инициализацию. - * + * */ protected function init() {} /** * Действия после разбора роута. - * + * */ protected function onDispatch() {} @@ -57,4 +57,4 @@ class PageController } } } -?> +?> \ No newline at end of file diff --git a/classes/Pager.class.php b/classes/Pager.class.php index 617a0bd..d6f227b 100644 --- a/classes/Pager.class.php +++ b/classes/Pager.class.php @@ -13,55 +13,55 @@ class Pager extends Action -{ +{ public $template_dir = '.'; - + protected $current_page = 1; protected $max_page_num; protected $num_rows; protected $limit; protected $start_offset = 0; protected $count = 0; - + public function __construct($count, $current_page = 1, $records_limit = 20) { parent::__construct(); - + $this->count = $count; $this->limit = $records_limit; - + $this->max_page_num = ceil($this->count/$this->limit); $this->current_page = ((int)$current_page <= $this->max_page_num && (int)$current_page > 0) ? (int)$current_page : 1; - + $this->start_offset = $this->limit * ($this->current_page - 1); $this->num_rows = ($this->limit + $this->start_offset) <= $this->count ? ($this->limit + $this->start_offset) : $this->count; } - + /** * Возвращает текущую страницу - * + * * @return int */ public function getPage() { return $this->current_page; } - + public function startOffset() { return $this->start_offset; } - + public function limit() { return $this->limit; } - + public function setNumRows($num_rows) { $this->num_rows = $num_rows; } - + function init() { $this->template = "Pager"; @@ -75,4 +75,4 @@ class Pager extends Action $this->templater->assign('count', $this->count); } } -?> +?> \ No newline at end of file diff --git a/classes/Router.class.php b/classes/Router.class.php index 0683548..fba9096 100644 --- a/classes/Router.class.php +++ b/classes/Router.class.php @@ -128,4 +128,4 @@ final class Route return true; } } -?> +?> \ No newline at end of file diff --git a/classes/StaticPageException.class.php b/classes/StaticPageException.class.php index e58b9ed..23b3427 100644 --- a/classes/StaticPageException.class.php +++ b/classes/StaticPageException.class.php @@ -1,13 +1,13 @@ - * @link + * @copyright NetMonsters + * @link * @package Majestic * @subpackage Core - * @since + * @since * @version SVN: $Id$ * @filesource $URL$ */ @@ -15,4 +15,4 @@ class StaticPageException extends Exception { } -?> +?> \ No newline at end of file diff --git a/classes/Sublimer.class.php b/classes/Sublimer.class.php index 6afa23c..02a933d 100644 --- a/classes/Sublimer.class.php +++ b/classes/Sublimer.class.php @@ -172,4 +172,4 @@ final class Sublimer } -?> +?> \ No newline at end of file diff --git a/classes/pg_DBConnector.class.php b/classes/pg_DBConnector.class.php index c8f1601..7de1963 100644 --- a/classes/pg_DBConnector.class.php +++ b/classes/pg_DBConnector.class.php @@ -107,4 +107,4 @@ class DBConnector throw new MJException('Rollback disabled for postgreSQL Connector' ,1); } } -?> +?> \ No newline at end of file diff --git a/init/init.inc.php b/init/init.inc.php index ac44d0e..f1a50a5 100644 --- a/init/init.inc.php +++ b/init/init.inc.php @@ -25,4 +25,4 @@ require(CONFIG_PATH.'/routers.inc.php'); define('E_404', 404); define('E_403', 403); -?> +?> \ No newline at end of file diff --git a/init/sys.inc.php b/init/sys.inc.php index 6648c3f..88cb8c7 100644 --- a/init/sys.inc.php +++ b/init/sys.inc.php @@ -97,4 +97,4 @@ function __autoload($name) require(LIB_PATH.'/'.$name.'.lib.php'); } } -?> +?> \ No newline at end of file