* add for xuanxuan priv.

This commit is contained in:
wangyidong
2019-05-08 13:26:25 +08:00
parent 821cfb2b4b
commit 5bebd42783
5 changed files with 75 additions and 12 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
/**
* The control file of setting of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package setting
* @version $Id$
* @link http://www.zentao.net
*/
class setting extends control
{
}
+37 -7
View File
@@ -386,14 +386,8 @@ class upgradeModel extends model
$this->execSQL($xuanxuanSql);
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.5.0.sql';
$this->execSQL($xuanxuanSql);
$hasHttps = $this->loadModel('setting')->getItem("owner=system&module=common&section=xuanxuan&key=https");
if(empty($hasHttps))
{
$this->dao->update(TABLE_CONFIG)->set('`key`')->eq('https')->where('owner')->eq('system')->andWhere('module')->eq('common')->andWhere('section')->eq('xuanxuan')->andWhere('`key`')->eq('isHttps')->exec();
$this->saveLogs($this->dao->get());
}
}
$this->updateXX_11_5();
}
}
@@ -3089,6 +3083,42 @@ class upgradeModel extends model
return !dao::isError();
}
/**
* Update xuanxuan for 11_5.
*
* @access public
* @return bool
*/
public function updateXX_11_5()
{
$this->saveLogs('Run Method ' . __FUNCTION__);
$hasHttps = $this->loadModel('setting')->getItem("owner=system&module=common&section=xuanxuan&key=https");
if(empty($hasHttps))
{
$this->dao->update(TABLE_CONFIG)->set('`key`')->eq('https')->where('owner')->eq('system')->andWhere('module')->eq('common')->andWhere('section')->eq('xuanxuan')->andWhere('`key`')->eq('isHttps')->exec();
$this->saveLogs($this->dao->get());
}
$groups = $this->dao->select('`group`')->from(TABLE_GROUPPRIV)->where('module')->eq('admin')->andWhere('method')->eq('xuanxuan')->fetchPairs('group', 'group');
foreach($groups as $groupID)
{
$groupPriv = new stdclass();
$groupPriv->group = $groupID;
$groupPriv->module = 'setting';
$groupPriv->method = 'xuanxuan';
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
$this->saveLogs($this->dao->get());
}
try
{
$this->dao->update(TABLE_GROUPPRIV)->set('module')->eq('setting')->where('module')->eq('admin')->andWhere('method')->eq('downloadxxd')->exec();
$this->saveLogs($this->dao->get());
}
catch(PDOException $e){}
return true;
}
/**
* Save Logs.
*
@@ -25,7 +25,7 @@ $lang->chat->turnonList[0] = '否';
$lang->chat->info = "禅道客户端由易软天创旗下另外一款免费、开源、安全的IM产品<a href='https://xuan.im/' target='_blank'>喧喧</a>驱动,支持私有部署,跨平台操作,内置大量插件,功能丰富,在喧喧里,您甚至还可以为自己编写个性化的插件,<a href='https://xuan.im/' target='_blank'>点击查看</a>。";
$lang->chat->xxClientConfirm = '与禅道深度集成,支持成员沟通,小组讨论,文件传输,任务指派,更加方便的项目管理,更加流畅的团队协作!点击界面右下角下载禅道客户端。';
$lang->chat->xxServerConfirm = '与禅道深度集成,支持成员沟通,小组讨论,文件传输,任务指派,更加方便的项目管理,更加流畅的团队协作!进入后台-客户端集成进行下载配置。';
$lang->chat->xxServerConfirm = '与禅道深度集成,支持成员沟通,小组讨论,文件传输,任务指派,更加方便的项目管理,更加流畅的团队协作!进入后台-客户端进行下载配置。';
$lang->chat->xxdServerTip = '禅道服务器地址为完整的协议+地址+端口,示例:http://192.168.1.35 或 http://pms.zentao.com ,不能使用127.0.0.1。';
$lang->chat->xxdServerEmpty = '禅道服务器地址为空。';
+15 -4
View File
@@ -1,11 +1,22 @@
<?php
$lang->resource->admin->xuanxuan = 'xuanxuan';
$lang->resource->admin->downloadxxd = 'downloadXXD';
$lang->resource->admin->xuanxuan = 'xuanxuan';
$lang->admin->methodOrder[26] = 'xuanxuan';
$lang->admin->methodOrder[25] = 'xuanxuan';
$lang->admin->methodOrder[30] = 'downloadxxd';
if(!isset($lang->resource->setting)) $lang->resource->setting = new stdclass();
$lang->resource->setting->xuanxuan = 'xuanxuan';
$lang->resource->setting->downloadxxd = 'downloadXXD';
$lang->setting->methodOrder[26] = 'xuanxuan';
$lang->setting->methodOrder[31] = 'downloadxxd';
$lang->resource->chat = new stdclass();
$lang->resource->chat->getChatUsers = 'getChatUsers';
$lang->resource->chat->getChatGroups = 'getChatGroups';
$lang->resource->chat->notifyMSG = 'notifyMSG';
$lang->resource->client = new stdclass();
$lang->resource->client->browse = 'browse';
$lang->resource->client->create = 'create';
$lang->resource->client->edit = 'edit';
$lang->resource->client->delete = 'delete';
$lang->resource->client->checkUpgrade = 'checkUpgrade';
@@ -13,3 +13,10 @@ $lang->resource->chat = new stdclass();
$lang->resource->chat->getChatUsers = 'getChatUsers';
$lang->resource->chat->getChatGroups = 'getChatGroups';
$lang->resource->chat->notifyMSG = 'notifyMSG';
$lang->resource->client = new stdclass();
$lang->resource->client->browse = 'browse';
$lang->resource->client->create = 'create';
$lang->resource->client->edit = 'edit';
$lang->resource->client->delete = 'delete';
$lang->resource->client->checkUpgrade = 'checkUpgrade';