* adjust the logic of mobile access.
This commit is contained in:
@@ -129,10 +129,15 @@ class misc extends control
|
||||
public function qrCode()
|
||||
{
|
||||
$loginAPI = common::getSysURL() . $this->config->webRoot;
|
||||
$withSessionLoginAPI = $this->loadModel('user')->isLogon() ? $loginAPI . "?sid=" . session_ID() : $loginAPI;
|
||||
$session = $this->loadModel('user')->isLogon() ? '?sid=' . session_id() : '';
|
||||
|
||||
if(!extension_loaded('gd')) die(printf($this->lang->misc->noGDLib, $loginAPI));
|
||||
$ciqrcode = $this->app->loadClass('qrcode');
|
||||
QRcode::png($withSessionLoginAPI, false, 4, 9);
|
||||
if(!extension_loaded('gd'))
|
||||
{
|
||||
$this->view->noGDLib = sprintf($this->lang->misc->noGDLib, $loginAPI);
|
||||
die($this->display());
|
||||
}
|
||||
|
||||
$this->app->loadClass('qrcode');
|
||||
QRcode::png($loginAPI . $session, false, 4, 9);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,5 +46,6 @@ $lang->misc->zentao->service['install'] = 'Install service';
|
||||
$lang->misc->zentao->service['fixissue'] = 'Issue support';
|
||||
$lang->misc->zentao->service['servicemore']= 'More...';
|
||||
|
||||
$lang->misc->noGDLib = "PHP don't has GD extensions. The entrance of mobile browser: %s.";
|
||||
$lang->misc->mobile = "Mobile access";
|
||||
$lang->misc->noGDLib = "Please visit:<strong>%s</strong>.";
|
||||
$lang->misc->copyright = "Copyright ©2009-2013 <a href='http://www.cnezsoft.com' target='_blank'>Nature EasySoft Network Tecnology Co.ltd, QingDao, China</a>";
|
||||
|
||||
@@ -46,5 +46,6 @@ $lang->misc->zentao->service['install'] = '禅道安装服务';
|
||||
$lang->misc->zentao->service['fixissue'] = '禅道问题解决';
|
||||
$lang->misc->zentao->service['servicemore']= '更多服务...';
|
||||
|
||||
$lang->misc->noGDLib = "您的PHP没有安装GD库扩展,请用手机浏览器直接访问:%s";
|
||||
$lang->misc->mobile = "手机访问";
|
||||
$lang->misc->noGDLib = "请用手机浏览器访问:<strong>%s</strong>";
|
||||
$lang->misc->copyright = "版权所有 ©2009-2013 <a href='http://www.cnezsoft.com' target='_blank'>青岛易软天创网络科技有限公司</a>";
|
||||
|
||||
Reference in New Issue
Block a user