Skip to content

Commit

Permalink
修复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zyx0814 committed Feb 25, 2022
1 parent fdde3db commit 993185b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
22 changes: 13 additions & 9 deletions dzz/billfish/class/class_billfishexport.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public function initExport()
}

//查询待导入文件数
$sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 ";
// $sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 ";
$sql = "select count(id) as num from bf_file where 1";
$data = $this->fetch($sql);
$this->filenum = $data['num'];
}else{
Expand All @@ -118,11 +119,11 @@ public function initExport()
}

//查询待导入文件数
$sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 ";
//$sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 ";
$sql = "select count(id) as num from source where 1 ";
$data = $this->fetch($sql);
$this->filenum = $data['num'];
}

//如果没有数据,视为导入成功
if (!$this->filenum) {
C::t('pichome_vapp')->update($this->appid, array('state' => 4));
Expand Down Expand Up @@ -399,11 +400,13 @@ public function export($force = false){
}
//记录导入起始位置,以备中断后从此处,更改导入状态
C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state));

}
if($state == 2){
$lastid = $lastid+1;
C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid));
}
$time4= microtime(true);

$lastid = $lastid+1;
C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid));
return array('success' => true);
}
public function oldexport($force = false){
Expand Down Expand Up @@ -641,10 +644,10 @@ public function oldexport($force = false){
if ($state == 3) {
$lastid = 0;
}

//记录导入起始位置,以备中断后从此处,更改导入状态
C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state));
}
$time4= microtime(true);

$lastid = $lastid+1;
C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid));
Expand Down Expand Up @@ -727,11 +730,12 @@ public function check_file($total)
foreach ($data as $v) {
$rid = $v['rid'];
$iid = DB::result_first("select bid from %t where rid = %s and appid = %s",array('billfish_record',$rid,$this->appid));

if($this->version < 30){
$sql = "select count(*) as num from source where id = $iid";
$sql = "select count(s.id) as numsource s left join res_prop rp on s.id = rp.iid where rp.action =0 and s.id = $iid";
}else{
//查询billfish中是否有该数据
$sql = "select count(*) as num from bf_file where id = $iid";
$sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 and f.id = $iid";
}

$numdata = $this->fetch($sql);
Expand Down
2 changes: 1 addition & 1 deletion dzz/billfish/classes/getpichomethumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class getpichomethumb
public function run(&$data)
{
$thumbid = DB::result_first("select thumb from %t where appid = %s and rid = %s", array('billfish_record', $data['appid'], $data['rid']));
if(isset($data['version']) && $data['version'] > 16){
if(isset($data['version']) && $data['version'] >=30){
$bid = DB::result_first("select bid from %t where rid = %s",array('billfish_record',$data['rid']));
$thumbdir = dechex($bid);
$thumbdir = (string) $thumbdir;
Expand Down
13 changes: 4 additions & 9 deletions dzz/pichome/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
}

$sid = isset($_GET['sid']) ? dzzdecode($_GET['sid'],'',0):'';
$sharedata = C::t('pichome_share')->fetch_by_idandtype($sid);
$sharedata = C::t('pichome_share')->fetch_by_id($sid);
$resourcesdata = $sharedata['resourcesdata'];
$resourcesdata['share'] = 0;

$colors = array();
foreach($resourcesdata['colors'] as $cval){
$colors[] = $cval;
Expand All @@ -26,11 +26,6 @@
$foldernames[] = $fval;
}
$resourcesdata['foldernames'] = json_encode($foldernames);
$theme = GetThemeColor();
$ismobile = helper_browser::ismobile();

if (($ismobile)) {
include template('mobile/page/share');
} else {
include template('pc/page/share');
}
$theme = GetThemeColor();
include template('pc/page/share');

0 comments on commit 993185b

Please sign in to comment.