Merge branch 'fix_api_scheme' into 'master'
* Fix baseUrl scheme error for api createDemoData. See merge request easycorp/zentaopms!6407
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<?php $code = $group . ucfirst($feature);?>
|
||||
<?php if(strpos(",$disabledFeatures,", ",$code,") !== false) continue;?>
|
||||
<?php $hasData = true;?>
|
||||
<?php endForeach;?>
|
||||
<?php endforeach;?>
|
||||
|
||||
<?php if($hasData):?>
|
||||
<tr>
|
||||
@@ -52,11 +52,11 @@
|
||||
<?php echo html::checkbox("module[{$code}]", array('1' => $lang->admin->setModule->{$feature}), $value, "data-code='{$code}'", 'inline');?>
|
||||
<?php echo html::hidden("module[{$code}][]", $value, $value ? 'disabled' : '');?>
|
||||
</div>
|
||||
<?php endForeach;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php endForeach;?>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td class='text-middle text-right thWidth'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
|
||||
|
||||
@@ -266,7 +266,10 @@ class install extends control
|
||||
$this->setting->setItem('system.common.safe.changeWeak', '1');
|
||||
$this->setting->setItem('system.common.global.cron', 1);
|
||||
|
||||
if(strpos($this->app->getClientLang(), 'zh') === 0) $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0');
|
||||
$httpType = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') $httpType = 'https';
|
||||
if(isset($_SERVER['REQUEST_SCHEME']) and strtolower($_SERVER['REQUEST_SCHEME']) == 'https') $httpType = 'https';
|
||||
if(strpos($this->app->getClientLang(), 'zh') === 0) $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, "{$httpType}://{$_SERVER['HTTP_HOST']}" . $this->app->config->webRoot . 'api.php/v1', '16.0');
|
||||
return print(js::locate(inlink('step6'), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ class upgradeModel extends model
|
||||
$this->updateProjectLinkedBranch();
|
||||
break;
|
||||
case '16_0_beta1':
|
||||
$this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0');
|
||||
$this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, commonModel::getSysURL() . $this->app->config->webRoot . 'api.php/v1', '16.0');
|
||||
break;
|
||||
case '16_1':
|
||||
$this->moveKanbanData();
|
||||
@@ -4287,7 +4287,7 @@ class upgradeModel extends model
|
||||
$moduleRoot = $this->app->getModuleRoot();
|
||||
|
||||
$editorDir = $moduleRoot . 'editor';
|
||||
if(is_dir($editor)) $zfile->removeDir($editorDir);
|
||||
if(is_dir($editorDir)) $zfile->removeDir($editorDir);
|
||||
|
||||
$translateDir = $moduleRoot . 'translate';
|
||||
if(is_dir($translateDir)) $zfile->removeDir($translateDir);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<?php endif;?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endForeach;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user