Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
3645a14a
Commit
3645a14a
authored
Feb 18, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.task-on.com:ktask/task-on.com
parents
861cb092
6e2149a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
common/components/BaseController.php
common/components/BaseController.php
+4
-1
common/modules/triggers/models/TriggerTrigger.php
common/modules/triggers/models/TriggerTrigger.php
+5
-2
No files found.
common/components/BaseController.php
View file @
3645a14a
<?php
<?php
namespace
common\components
;
namespace
common\components
;
use
common\modules\triggers\components\conditions\conditions\CheckPresenceTime
;
use
Yii
;
use
Yii
;
use
yii\filters\AccessControl
;
use
yii\filters\AccessControl
;
use
yii\web\Controller
;
use
yii\web\Controller
;
...
@@ -61,6 +62,8 @@ abstract class BaseController extends Controller
...
@@ -61,6 +62,8 @@ abstract class BaseController extends Controller
public
function
beforeAction
(
$action
)
public
function
beforeAction
(
$action
)
{
{
CheckPresenceTime
::
init
()
->
initScript
();
/*if(substr($currentUrl, -1) == '/' && $currentUrl!="/") {
/*if(substr($currentUrl, -1) == '/' && $currentUrl!="/") {
$urlWithoutSlash = substr($currentUrl, 0, -1);
$urlWithoutSlash = substr($currentUrl, 0, -1);
return $this->redirect($urlWithoutSlash,true,301);
return $this->redirect($urlWithoutSlash,true,301);
...
...
common/modules/triggers/models/TriggerTrigger.php
View file @
3645a14a
...
@@ -193,10 +193,13 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
...
@@ -193,10 +193,13 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
/**
/**
* Метод возвращает массив актуальных на данный момент триггеров
* Метод возвращает массив актуальных на данный момент триггеров
* @param $id
* @return array|\yii\db\ActiveRecord[]
* @return array|\yii\db\ActiveRecord[]
*/
*/
public
static
function
getActualTriggers
()
{
public
static
function
getActualTriggers
(
$id
=
null
)
{
return
TriggerTrigger
::
find
()
->
indexBy
(
'id'
)
->
all
();
return
(
$id
===
null
)
?
TriggerTrigger
::
find
()
->
indexBy
(
'id'
)
->
all
()
:
TriggerTrigger
::
find
()
->
joinWith
(
'triggerConditions'
)
->
where
([
'trigger_condition.condition_id'
=>
$id
])
->
all
();
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment