Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -138,10 +138,11 @@ class action extends control
|
||||
* Undelete an object.
|
||||
*
|
||||
* @param int $actionID
|
||||
* @param string $browseType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function undelete($actionID)
|
||||
public function undelete($actionID, $browseType = 'all')
|
||||
{
|
||||
$oldAction = $this->action->getById($actionID);
|
||||
$extra = $oldAction->extra == ACTIONMODEL::BE_HIDDEN ? 'hidden' : 'all';
|
||||
@@ -149,7 +150,7 @@ class action extends control
|
||||
$this->action->undelete($actionID);
|
||||
|
||||
$sameTypeObjects = $this->action->getTrashes($oldAction->objectType, $extra, 'id_desc', null);
|
||||
$browseType = $sameTypeObjects ? $oldAction->objectType : 'all';
|
||||
$browseType = ($sameTypeObjects and $browseType != 'all') ? $oldAction->objectType : 'all';
|
||||
|
||||
return print(js::locate($this->createLink('action', 'trash', "browseType=$browseType&type=$extra"), 'parent'));
|
||||
}
|
||||
@@ -158,17 +159,18 @@ class action extends control
|
||||
* Hide an deleted object.
|
||||
*
|
||||
* @param int $actionID
|
||||
* @param string $browseType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function hideOne($actionID)
|
||||
public function hideOne($actionID, $browseType = 'all')
|
||||
{
|
||||
$oldAction = $this->action->getById($actionID);
|
||||
|
||||
$this->action->hideOne($actionID);
|
||||
|
||||
$sameTypeObjects = $this->action->getTrashes($oldAction->objectType, 'all', 'id_desc', null);
|
||||
$browseType = $sameTypeObjects ? $oldAction->objectType : 'all';
|
||||
$browseType = ($sameTypeObjects and $browseType != 'all') ? $oldAction->objectType : 'all';
|
||||
|
||||
return print(js::locate($this->createLink('action', 'trash', "browseType=$browseType"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
<td><?php echo $action->date;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printLink('action', 'undelete', "actionid=$action->id", $lang->action->undelete, 'hiddenwin');
|
||||
if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id", $lang->action->hideOne, 'hiddenwin');
|
||||
common::printLink('action', 'undelete', "actionid=$action->id&browseType=$currentObjectType", $lang->action->undelete, 'hiddenwin');
|
||||
if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id&browseType=$currentObjectType", $lang->action->hideOne, 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
<div class="modal fade modal-team" id="modalTeam" data-scroll-inside='false'>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close hidden" data-dismiss="modal">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<i class="icon icon-close"></i>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $lang->task->team?></h4>
|
||||
|
||||
@@ -969,7 +969,7 @@ class user extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == $this->config->webRoot or empty($this->referer));
|
||||
$loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == $this->config->webRoot or empty($this->referer) or preg_match("/\/www\/$/", strtolower($this->referer), $output));
|
||||
|
||||
$this->loadModel('misc');
|
||||
$this->loadModel('extension');
|
||||
|
||||
Reference in New Issue
Block a user