-
:'static/image/common/logo.png';})
+
diff --git a/core/class/io/io_dzz.php b/core/class/io/io_dzz.php
index 6e2b0fc..608ec3f 100644
--- a/core/class/io/io_dzz.php
+++ b/core/class/io/io_dzz.php
@@ -127,6 +127,9 @@ class io_dzz extends io_api
public function getStream($path, $fop = '')
{
global $_G;//123
+ if (strpos($path, 'preview_') === 0) {
+ $path = preg_replace('/^preview_/', '', $path);
+ }
if (strpos($path, 'attach::') === 0) {
$attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
Hook::listen('io_dzz_getstream_attach',$attach);//挂载点
@@ -187,6 +190,9 @@ class io_dzz extends io_api
public function getFileUri($path, $fop = '')
{
global $_G;
+ if (strpos($path, 'preview_') === 0) {
+ $path = preg_replace('/^preview_/', '', $path);
+ }
if (strpos($path, 'attach::') === 0) {
$attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
Hook::listen('io_dzz_getstream_attach',$attach);//挂载点
@@ -469,6 +475,10 @@ class io_dzz extends io_api
//获取icosdata
public function getMeta($icoid)
{
+ if (strpos($icoid, 'preview_') === 0) {
+ $icoid = preg_replace('/^preview_/', '', $icoid);
+ $preview = true;
+ }
if (strpos($icoid, 'dzz::') === 0) {
$attachment = preg_replace('/^dzz::/i', '', $icoid);
$name = array_pop(explode('/', $icoid));
@@ -532,9 +542,9 @@ class io_dzz extends io_api
if (!$rid = DB::result_first("select rid from %t where pfid = %d and name = %s", array('resources', $pfid, $filename))) {
return false;
}
- return C::t('resources')->fetch_by_rid($rid);
+ return C::t('resources')->fetch_by_rid($rid,'',$preview);
} elseif (preg_match('/\w{32}/i', $icoid)) {
- return C::t('resources')->fetch_by_rid($icoid);
+ return C::t('resources')->fetch_by_rid($icoid,'',$preview);
} else {
return false;//C::t('resources')->fetch_by_icoid($icoid);
}
@@ -650,6 +660,9 @@ class io_dzz extends io_api
}
@set_time_limit(0);
$attachexists = FALSE;
+ if (strpos($path, 'preview_') === 0) {
+ $path = preg_replace('/^preview_/', '', $path);
+ }
if (strpos($path, 'attach::') === 0) {
$attachment = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
$attachment['name'] = $filename ? $filename : $attachment['filename'];
@@ -765,6 +778,9 @@ class io_dzz extends io_api
{
global $_G;
+ if (strpos($path, 'preview_') === 0) {
+ $path = preg_replace('/^preview_/', '', $path);
+ }
if (strpos($path, 'dzz::') === 0) {
if (strpos($path, './') !== false) return false;
@unlink($_G['setting']['attachdir'] . preg_replace('/^dzz::/i', '', $path));
@@ -2816,7 +2832,9 @@ class io_dzz extends io_api
//判断大小
//判断空间大小
$filename = self::name_filter($filename);
-
+ if (strpos($path, 'preview_') === 0) {
+ $path = preg_replace('/^preview_/', '', $path);
+ }
if (strpos($path, 'dzz::') === false && strpos($path, 'TMP::') === false) {
$gid = DB::result_first("select gid from %t where fid=%d", array('folder', $path));
if (!SpaceSize($size, $gid)) {
diff --git a/core/class/perm/perm_check.php b/core/class/perm/perm_check.php
index 99384ba..f9b977f 100644
--- a/core/class/perm/perm_check.php
+++ b/core/class/perm/perm_check.php
@@ -172,6 +172,9 @@ class perm_check{
//$arr=array('uid','gid','desktop');其中这几项必须
function checkperm($action,$arr,$bz=''){ //检查某个图标是否有权限;
global $_G;
+ if ($arr['preview'] && $action === 'read') {
+ return true;
+ }
if($_G['uid']<1){ //游客没有权限
return false;
}
diff --git a/core/class/table/table_resources.php b/core/class/table/table_resources.php
index 5e45ee8..354d1fb 100644
--- a/core/class/table/table_resources.php
+++ b/core/class/table/table_resources.php
@@ -375,7 +375,7 @@ class table_resources extends dzz_table
return $resourcedata;
}
- public function fetch_by_rid($rid, $force_from_db = false)
+ public function fetch_by_rid($rid, $force_from_db = false,$preview = false)
{ //返回一条数据同时加载资源表数据
global $_G;
$cachekey = 'resourcesdata_' . $rid;
@@ -425,6 +425,7 @@ class table_resources extends dzz_table
$data['relpath'] = dirname(preg_replace('/dzz:(.+?):/', '', $data['relativepath'])) . '/';
$data['path'] = $data['rid'];
$data['bz'] = '';
+ $data['preview'] = $preview;
$data['collect'] = C::t('resources_collect')->fetch_by_rid($rid);
if ($data['remote'] > 1) $data['rbz'] = io_remote::getBzByRemoteid($data['remote']);
diff --git a/core/function/function_mail.php b/core/function/function_mail.php
index 274570d..ab13f60 100644
--- a/core/function/function_mail.php
+++ b/core/function/function_mail.php
@@ -25,7 +25,7 @@ function sendmail($toemail, $subject, $message, $from = '') {
$sitename=$_G['setting']['sitename'];
$sitecopyright=replacesitevar($_G['setting']['sitecopyright']);
if(!$_G['setting']['bbclosed']){
- $sitelogo=$_G['setting']['sitelogo']?$_G['siteurl'].'index.php?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$_G['setting']['sitelogo']):$_G['siteurl'].'static/image/common/logo.png';
+ $sitelogo=$_G['setting']['sitelogo']?$_G['siteurl'].'index.php?mod=io&op=thumbnail&size=small&original=1&path='.dzzencode('attach::'.$_G['setting']['sitelogo']):$_G['siteurl'].'static/image/common/logo.png';
}else{
$sitelogo=$_G['siteurl'].'static/image/common/logo.png';
}
diff --git a/core/template/default/common/adminlogin.htm b/core/template/default/common/adminlogin.htm
index a23501c..41928aa 100644
--- a/core/template/default/common/adminlogin.htm
+++ b/core/template/default/common/adminlogin.htm
@@ -121,7 +121,7 @@
diff --git a/core/template/default/common/footer_simple.htm b/core/template/default/common/footer_simple.htm
index 87494c1..0c38528 100644
--- a/core/template/default/common/footer_simple.htm
+++ b/core/template/default/common/footer_simple.htm
@@ -45,9 +45,9 @@ try{