Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zyx0814/dzzoffice
Browse files Browse the repository at this point in the history
  • Loading branch information
zyx0814 committed Oct 24, 2024
2 parents 5404f19 + dbb1289 commit 949374c
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion core/class/perm/perm_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function groupPerm($fid,$action,$gid){ //判断容器有没有指定的权限
//$arr=array('uid','gid','desktop');其中这几项必须
function checkperm($action,$arr,$bz=''){ //检查某个图标是否有权限;
global $_G;
if ($arr['preview']) {
if ($arr['preview'] && ($action=='read') || $action=='copy' || $action=='download') {
return true;
}
if($_G['uid']<1){ //游客没有权限
Expand Down
2 changes: 2 additions & 0 deletions core/class/table/table_resources.php
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,8 @@ public function get_property_by_rid($rids, $contains = true)
if ($currentfolder = C::t('folder')->fetch($fileinfo['oid'])) {
$fileinfo['isgroup'] = ($currentfolder['flag'] == 'organization') ? true : false;
}
} elseif ($fileinfo['type'] == 'link') {
$fileinfo['type'] = lang('type_link');
} elseif ($fileinfo['ext']) {
$fileinfo['type'] = getFileTypeName($fileinfo['type'], $fileinfo['ext']);
} else {
Expand Down
29 changes: 13 additions & 16 deletions core/function/function_core.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0, $ckey_
}

if ($operation == 'DECODE') {
if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $keyb), 0, 16)) {
if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) === substr(md5(substr($result, 26) . $keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
Expand Down Expand Up @@ -1621,22 +1621,19 @@ function getexpiration()
return mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) + 86400;
}

function return_bytes($val)
{
$val = trim($val);
$last = strtolower($val{strlen($val) - 1});
switch ($last) {
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
function return_bytes($val) {
$last = strtolower($val[strlen($val)-1]);
if (!is_numeric($val)) {
$val = substr(trim($val), 0, -1);
}
switch($last) {
case 'g': $val *= 1024;
case 'm': $val *= 1024;
case 'k': $val *= 1024;
}
return $val;
}


function getimgthumbname($fileStr, $extend = '.thumb.jpg', $holdOldExt = true)
{
if (empty($fileStr)) {
Expand Down Expand Up @@ -1673,7 +1670,7 @@ function strhash($string, $operation = 'DECODE', $key = '')
{
$key = md5($key != '' ? $key : getglobal('authkey'));
if ($operation == 'DECODE') {
$hashcode = gzuncompress(base64_decode(($string)));
$hashcode = gzuncompress(base64_decode($string));
$string = substr($hashcode, 0, -16);
$hash = substr($hashcode, -16);
unset($hashcode);
Expand Down
2 changes: 0 additions & 2 deletions core/function/function_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ function dshowmessage($message, $url_forward = '', $values = array(), $extrapara
if(!empty($_G['inajax'])) {
$handlekey = $_GET['handlekey'] = !empty($_GET['handlekey']) ? dhtmlspecialchars($_GET['handlekey']) : '';
$param['handle'] = true;
}
if(!empty($_G['inajax'])) {
$param['msgtype'] = empty($_GET['ajaxmenu']) && (empty($_POST) || !empty($_GET['nopost'])) ? 2 : 3;
}
if($url_forward) {
Expand Down
2 changes: 1 addition & 1 deletion core/template/default/common/header_common.htm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if !empty($_G[setting][sitename])}--> $_G[setting][sitename] - <!--{/if}--></title>
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename]</title>
<meta name="keywords" content="{if !empty($_G[setting][metakeywords])}{echo htmlspecialchars($_G[setting][metakeywords])}{/if}" />
<meta name="description" content="{if !empty($_G[setting][metadescription])}{echo htmlspecialchars($_G[setting][metadescription])} {/if}" />
<meta name="generator" content="DzzOffice" />
Expand Down
2 changes: 1 addition & 1 deletion core/template/default/common/header_simple_start.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename] </title>
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename]</title>
<meta name="keywords" content="{if !empty($_G[setting][metakeywords])}{echo htmlspecialchars($_G[setting][metakeywords])}{/if}" />
<meta name="description" content="{if !empty($_G[setting][metadescription])}{echo htmlspecialchars($_G[setting][metadescription])} {/if}" />
<meta name="generator" content="DzzOffice" />
Expand Down
4 changes: 4 additions & 0 deletions share.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
}
$icoarr['icoid'] = $_GET['s'];
}
if ($icoarr['type'] == 'link') {
@header('Location: '.$icoarr['url']);
exit();
}
$imageexts=array('jpg','jpeg','png','gif'); //图片使用;
$filename=$icoarr['name'];//rtrim($_GET['n'],'.dzz');
$ext=$icoarr['ext'];//strtolower(substr(strrchr($filename, '.'), 1, 10));
Expand Down
4 changes: 3 additions & 1 deletion static/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,9 @@ function showMenu(v) {
if(_all.length) {
for(j = 0; j < _all.length; j++) {
if((!_all[j]['type'] || _all[j]['type'] != 'hidden') && hasshow(_all[j])) {
_all[j].className += ' hidefocus';
if(_all[j].className.indexOf('hidefocus') == -1) {
_all[j].className += ' hidefocus';
}
_all[j].focus();
focused = true;
var cobj = _all[j];
Expand Down
4 changes: 2 additions & 2 deletions user/space/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
exit('Access Denied');
}
$about=array();
$identify=$_GET['modname'];
$identify = filter_var($_GET['modname'], FILTER_SANITIZE_STRING);
$ismobile=helper_browser::ismobile();
$appConfig=DZZ_ROOT.'./dzz/'.$identify.'/config/config.php';
if($identify && file_exists($appConfig)){
Expand Down Expand Up @@ -41,4 +41,4 @@
} else {
include template('about');
}
exit();
exit();

0 comments on commit 949374c

Please sign in to comment.