Merge branch 'master' of http://gitlab.edu.yar.ru/composer/PHP_Library
This commit is contained in:
commit
e6686e3bd3
7 changed files with 18 additions and 12 deletions
|
|
@ -211,7 +211,8 @@ class Controller_Action
|
||||||
public function nUrl($name, array $param = array())
|
public function nUrl($name, array $param = array())
|
||||||
{
|
{
|
||||||
/*.Filter_ActionAccess.*/$access = $this->access;
|
/*.Filter_ActionAccess.*/$access = $this->access;
|
||||||
if ($access != null || $access->checkAction($name)) {
|
|
||||||
|
if ($access == null || $access->checkAction($name)) {
|
||||||
return lcurry(array($this, 'postUrl'), $name, $param);
|
return lcurry(array($this, 'postUrl'), $name, $param);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ class Controller_Installer
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
$setup = $this->getSetupFile($name);
|
$setup = $this->getSetupFile($name);
|
||||||
|
|
||||||
if (file_exists($setup) && ($this->isChanged($name) || $force)) {
|
if (file_exists($setup) && ($this->isChanged($name) || $force)) {
|
||||||
$registry = $this->_registry;
|
$registry = $this->_registry;
|
||||||
$settings = new Settings($setup);
|
$settings = new Settings($setup);
|
||||||
|
|
@ -93,14 +94,15 @@ class Controller_Installer
|
||||||
$result[]=$res;
|
$result[]=$res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Обновление версии меню
|
// Обновление версии меню
|
||||||
$registry->removeKey($name);
|
$registry->removeKey($name);
|
||||||
$registry->writeKey(array($name), $settings->get('settings'));
|
$registry->writeKey(array($name), $settings->get('settings'));
|
||||||
$registry->writeKey(array($name),
|
$registry->writeKey(array($name),
|
||||||
array('version' => $version_new,
|
array('version' => $version_new,
|
||||||
'time' => filemtime($setup)));
|
'time' => filemtime($setup)));
|
||||||
|
}
|
||||||
|
|
||||||
$registry->write();
|
$registry->write();
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ class Database_JsonInstall {
|
||||||
if (is_string($dbinit_file)) {
|
if (is_string($dbinit_file)) {
|
||||||
$initActions = json_decode($dbinit_file, true);
|
$initActions = json_decode($dbinit_file, true);
|
||||||
if (!$initActions) {
|
if (!$initActions) {
|
||||||
echo "Invalid dbinit.json ".$dbinit_file;
|
echo "Invalid ".$dbinit_path;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "No dbinit.json";
|
echo "No ".$dbinit_path;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,9 @@ class Excel_Document {
|
||||||
function save($filename)
|
function save($filename)
|
||||||
{
|
{
|
||||||
$doc = new XMLWriter();
|
$doc = new XMLWriter();
|
||||||
$doc->openURI($filename);
|
if (!$doc->openURI($filename)) {
|
||||||
|
throw new Exception("unknown file " . $filename);
|
||||||
|
}
|
||||||
$doc->setIndent(false);
|
$doc->setIndent(false);
|
||||||
$doc->startDocument('1.0','utf-8');
|
$doc->startDocument('1.0','utf-8');
|
||||||
$doc->startElement('Workbook');
|
$doc->startElement('Workbook');
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
|
|
||||||
class MailAlt
|
class MailAlt
|
||||||
{
|
{
|
||||||
protected $mailer;
|
public $mailer;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->mailer = new PHPMailer();
|
$this->mailer = new PHPMailer();
|
||||||
|
$this->mailer->CharSet = 'UTF-8';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* Проверка формата электронной почты
|
* Проверка формата электронной почты
|
||||||
*/
|
*/
|
||||||
class Validator_Rule_Code extends Rule_Abstract
|
class Validator_Rule_Code extends Validator_Rule_Abstract
|
||||||
{
|
{
|
||||||
public function getErrorMsg()
|
public function getErrorMsg()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* Проверка формата даты
|
* Проверка формата даты
|
||||||
*/
|
*/
|
||||||
class Validator_Rule_Count extends Rule_Abstract
|
class Validator_Rule_Count extends Validator_Rule_Abstract
|
||||||
{
|
{
|
||||||
public $size = 1;
|
public $size = 1;
|
||||||
public $max = false;
|
public $max = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue