Ejemplo n.º 1
0
}
$cid1 = $auto_class['cid1'];
$cid2 = $auto_class['cid2'];
$cid3 = $auto_class['cid3'];
$cid4 = 0;
$tag_str = '';
$summary = '';
// 截取文件名
if (strlen($title) > 100) {
    $title = mb_substr($title, 0, 90);
}
// 判断是否是付费文档
if ($flag == 10) {
    $update_ret = $upload->update($title, $summary, $cid1, $cid2, $cid3, $cid4, $tag_str, $privacy, $flag, $price_rule['pay_price'], $price_rule['free_page'], $downloadable, $doc_id, $new_upload);
} else {
    $update_ret = $upload->updateFree($title, $summary, $cid1, $cid2, $cid3, $cid4, $tag_str, $privacy, $flag, $downloadable, $doc_id, $new_upload);
}
var_dump($update_ret);
Plat_Log::addNotice('update ret', json_encode($update_ret));
if (!$update_ret || $update_ret['errno'] != 0) {
    Plat_Log::fatal('update error:' . json_encode($update_ret) . ':' . $doc_id);
    exit(0);
}
exit(0);
function docInfoOk($doc_info_ret, $doc_id)
{
    if (empty($doc_id)) {
        return false;
    }
    if (empty($doc_info_ret['data'][$doc_id]['page'])) {
        return false;