Merge branch 'master' of git@github.com:easysoft/zentaopms
This commit is contained in:
+2
-2
@@ -134,7 +134,7 @@ define('TABLE_FILE', '`' . $config->db->prefix . 'file`');
|
||||
define('TABLE_HISTORY', '`' . $config->db->prefix . 'history`');
|
||||
define('TABLE_EXTENSION', '`' . $config->db->prefix . 'extension`');
|
||||
define('TABLE_WEBAPP', '`' . $config->db->prefix . 'webapp`');
|
||||
define('TABLE_CUSTOM', '`' . $config->db->prefix . 'custom`');
|
||||
define('TABLE_LANG', '`' . $config->db->prefix . 'lang`');
|
||||
|
||||
$config->objectTables['product'] = TABLE_PRODUCT;
|
||||
$config->objectTables['story'] = TABLE_STORY;
|
||||
@@ -151,7 +151,7 @@ $config->objectTables['user'] = TABLE_USER;
|
||||
$config->objectTables['doc'] = TABLE_DOC;
|
||||
$config->objectTables['doclib'] = TABLE_DOCLIB;
|
||||
$config->objectTables['todo'] = TABLE_TODO;
|
||||
$config->objectTables['custom'] = TABLE_CUSTOM;
|
||||
$config->objectTables['custom'] = TABLE_LANG;
|
||||
|
||||
/* Include extension config files. */
|
||||
$extConfigFiles = glob($configRoot . 'ext/*.php');
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS `zt_custom` (
|
||||
CREATE TABLE IF NOT EXISTS `zt_lang` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`lang` varchar(30) NOT NULL,
|
||||
`module` varchar(30) NOT NULL,
|
||||
|
||||
+2
-2
@@ -155,8 +155,8 @@ CREATE TABLE IF NOT EXISTS `zt_config` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `unique` (`owner`,`module`,`section`,`key`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_custom`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_custom` (
|
||||
-- DROP TABLE IF EXISTS `zt_lang`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_lang` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`lang` varchar(30) NOT NULL,
|
||||
`module` varchar(30) NOT NULL,
|
||||
|
||||
@@ -126,6 +126,7 @@ class commonModel extends model
|
||||
*/
|
||||
public function loadCustomFromDB()
|
||||
{
|
||||
if(defined('IN_UPGRADE')) return;
|
||||
if(!$this->config->db->name) return;
|
||||
$records = $this->loadModel('custom')->getAll();
|
||||
if(!$records) return;
|
||||
@@ -153,7 +154,7 @@ class commonModel extends model
|
||||
if(stripos($method, 'downnotify') !== false) return true;
|
||||
}
|
||||
|
||||
if(stripos($method, 'ajaxgetdropmenu') !== false) return true;
|
||||
if(stripos($method, 'ajaxgetdropmenu') !== false and $this->app->user->account == 'guest') return true;
|
||||
if($module == 'misc' and $method == 'qrcode') return true;
|
||||
if($module == 'misc' and $method == 'about') return true;
|
||||
if($module == 'misc' and $method == 'checkupdate') return true;
|
||||
|
||||
@@ -19,7 +19,7 @@ class customModel extends model
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$allCustomLang = $this->dao->select('*')->from(TABLE_CUSTOM)->orderBy('lang,id')->fetchAll('id');
|
||||
$allCustomLang = $this->dao->select('*')->from(TABLE_LANG)->orderBy('lang,id')->fetchAll('id');
|
||||
|
||||
$currentLang = $this->app->getClientLang();
|
||||
$processedLang = array();
|
||||
@@ -59,7 +59,7 @@ class customModel extends model
|
||||
$item->value = $value;
|
||||
$item->system = $system;
|
||||
|
||||
$this->dao->replace(TABLE_CUSTOM)->data($item)->exec();
|
||||
$this->dao->replace(TABLE_LANG)->data($item)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ class customModel extends model
|
||||
*/
|
||||
public function createDAO($params, $method = 'select')
|
||||
{
|
||||
return $this->dao->$method('*')->from(TABLE_CUSTOM)->where('1 = 1')
|
||||
return $this->dao->$method('*')->from(TABLE_LANG)->where('1 = 1')
|
||||
->beginIF($params['lang'])->andWhere('lang')->in($params['lang'])->fi()
|
||||
->beginIF($params['module'])->andWhere('module')->in($params['module'])->fi()
|
||||
->beginIF($params['section'])->andWhere('section')->in($params['section'])->fi()
|
||||
|
||||
@@ -487,9 +487,9 @@ class product extends control
|
||||
* Drop menu page.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $module
|
||||
* @param int $method
|
||||
* @param int $extra
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -552,7 +552,7 @@ class projectModel extends model
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.iscat')->eq(0)
|
||||
->beginIF($status == 'undone')->andWhere('t2.status')->ne('done')->fi()
|
||||
->beginIF($status == 'isdoing')->andWhere('t2.status')->ne('done')->andWhere('status')->ne('suspended')->fi()
|
||||
->beginIF($status == 'isdoing')->andWhere('t2.status')->ne('done')->andWhere('t2.status')->ne('suspended')->fi()
|
||||
->beginIF($status != 'all' and $status != 'isdoing' and $status != 'undone')->andWhere('status')->in($status)->fi()
|
||||
->orderBy('code')
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
@@ -562,7 +562,8 @@ class projectModel extends model
|
||||
{
|
||||
return $this->dao->select('*, IF(INSTR(" done", status) < 2, 0, 1) AS isDone')->from(TABLE_PROJECT)->where('iscat')->eq(0)
|
||||
->beginIF($status == 'undone')->andWhere('status')->ne('done')->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
|
||||
->beginIF($status == 'isdoing')->andWhere('status')->ne('done')->andWhere('status')->ne('suspended')->fi()
|
||||
->beginIF($status != 'all' and $status != 'isdoing' and $status != 'undone')->andWhere('status')->in($status)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('code')
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
<table class='table-1 fixed'>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
<?php
|
||||
foreach($story->tasks as $projectTasks)
|
||||
{
|
||||
foreach($projectTasks as $task)
|
||||
|
||||
@@ -303,7 +303,14 @@ class tree extends control
|
||||
*/
|
||||
public function ajaxGetOptionMenu($rootID, $viewType = 'story', $rootModuleID = 0, $returnType = 'html', $needManage = false)
|
||||
{
|
||||
$optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID);
|
||||
if($viewType = 'task')
|
||||
{
|
||||
$optionMenu = $this->tree->getTaskOptionMenu($rootID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$optionMenu = $this->tree->getOptionMenu($rootID, $viewType, $rootModuleID);
|
||||
}
|
||||
if($returnType == 'html')
|
||||
{
|
||||
$output = html::select("module", $optionMenu, '', "onchange=loadModuleRelated()");
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Judge my.php exists or not. */
|
||||
define('IN_UPGRADE', true);
|
||||
$myConfig = dirname(dirname(__FILE__)) . '/config/my.php';
|
||||
if(!file_exists($myConfig))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user