From 0999aab3c4ace8ff58505d6404b7a78eb745be29 Mon Sep 17 00:00:00 2001 From: Comsenz <10433182@qq.com> Date: Mon, 10 Jul 2017 14:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E4=BA=91=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/api/manyou/channel.htm | 12 - upload/api/manyou/cloud_channel.htm | 9 - upload/api/manyou/getmaillist.htm | 9 - upload/api/manyou/index.htm | 1 - upload/api/manyou/my.php | 37 --- upload/data/backup/index.htm | 0 upload/install/data/install_data.sql | 1 - upload/source/admincp/admincp_cloud.php | 259 ------------------ upload/source/admincp/admincp_counter.php | 4 +- upload/source/admincp/admincp_forums.php | 10 +- upload/source/admincp/admincp_members.php | 109 +++----- upload/source/admincp/admincp_prune.php | 7 - upload/source/admincp/admincp_recyclebin.php | 8 +- .../source/admincp/admincp_recyclebinpost.php | 8 +- upload/source/admincp/admincp_threads.php | 31 +-- .../admincp/moderate/moderate_reply.php | 2 - .../admincp/moderate/moderate_thread.php | 10 +- .../source/module/forum/forum_attachment.php | 4 +- .../source/plugin/qqconnect/lib/Connect.php | 9 +- upload/source/plugin/qqconnect/qqshow.inc.php | 3 +- upload/source/plugin/wechat/connect.inc.php | 10 +- 21 files changed, 68 insertions(+), 475 deletions(-) delete mode 100644 upload/api/manyou/channel.htm delete mode 100644 upload/api/manyou/cloud_channel.htm delete mode 100644 upload/api/manyou/getmaillist.htm delete mode 100644 upload/api/manyou/index.htm delete mode 100644 upload/api/manyou/my.php delete mode 100644 upload/data/backup/index.htm delete mode 100644 upload/source/admincp/admincp_cloud.php diff --git a/upload/api/manyou/channel.htm b/upload/api/manyou/channel.htm deleted file mode 100644 index c1db64d..0000000 --- a/upload/api/manyou/channel.htm +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - diff --git a/upload/api/manyou/cloud_channel.htm b/upload/api/manyou/cloud_channel.htm deleted file mode 100644 index 873929d..0000000 --- a/upload/api/manyou/cloud_channel.htm +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/upload/api/manyou/getmaillist.htm b/upload/api/manyou/getmaillist.htm deleted file mode 100644 index 4271f8e..0000000 --- a/upload/api/manyou/getmaillist.htm +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/upload/api/manyou/index.htm b/upload/api/manyou/index.htm deleted file mode 100644 index 0519ecb..0000000 --- a/upload/api/manyou/index.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/upload/api/manyou/my.php b/upload/api/manyou/my.php deleted file mode 100644 index 1b2fc82..0000000 --- a/upload/api/manyou/my.php +++ /dev/null @@ -1,37 +0,0 @@ -cachelist = $cachelist; -$discuz->init_cron = false; -$discuz->init_setting = true; -$discuz->init_user = false; -$discuz->init_session = false; - -$discuz->init(); - -$siteId = $_G['setting']['my_siteid']; -$siteKey = $_G['setting']['my_sitekey']; -$timezone = $_G['setting']['timeoffset']; -$language = $_SC['language'] ? $_SC['language'] : 'zh_CN'; -$version = $_G['setting']['version']; -$myAppStatus = $_G['setting']['my_app_status']; -$mySearchStatus = $_G['setting']['my_search_status']; - -$my = Cloud::loadClass('Service_Server_My', array($siteId, $siteKey, $timezone, $version, CHARSET, $language, $myAppStatus, $mySearchStatus)); -$my->run(); \ No newline at end of file diff --git a/upload/data/backup/index.htm b/upload/data/backup/index.htm deleted file mode 100644 index e69de29..0000000 diff --git a/upload/install/data/install_data.sql b/upload/install/data/install_data.sql index 68a80c6..9c5a82b 100644 --- a/upload/install/data/install_data.sql +++ b/upload/install/data/install_data.sql @@ -52,7 +52,6 @@ INSERT INTO pre_common_cron VALUES ('10','1','system','每日验证问答更新' INSERT INTO pre_common_cron VALUES ('11','1','system','每日标签更新','cron_tag_daily.php','1269746633','1269792000','-1','-1','0','0'); INSERT INTO pre_common_cron VALUES ('12','1','system','每日勋章更新','cron_medal_daily.php','1269746634','1269792000','-1','-1','0','0'); INSERT INTO pre_common_cron VALUES ('13','1','system','清理过期动态','cron_cleanfeed.php','1269746634','1269792000','-1','-1','0','0'); -INSERT INTO pre_common_cron VALUES ('14','1','system','每日获取安全补丁','cron_checkpatch_daily.php','1269746639','1269792000','-1','-1','2','22'); INSERT INTO pre_common_cron VALUES ('15','1','system','定时发布主题','cron_publish_halfhourly.php','1269746639','1269792000','-1','-1','-1','0 30'); INSERT INTO pre_common_cron VALUES ('16','1','system','每周广播归档','cron_follow_daily.php','1269746639','1269792000','-1','-1','02','0'); INSERT INTO pre_common_cron VALUES ('17','1','system','更新每日查看数','cron_todayviews_daily.php','1321500558','1321556400','-1','-1','3','0 5 10 15 20 25 30 35 40 45 50 55'); diff --git a/upload/source/admincp/admincp_cloud.php b/upload/source/admincp/admincp_cloud.php deleted file mode 100644 index cfc2689..0000000 --- a/upload/source/admincp/admincp_cloud.php +++ /dev/null @@ -1,259 +0,0 @@ -checkCloudStatus(); -} catch (Cloud_Service_AppException $e) { - if($operation == 'doctor' || $operation == 'siteinfo') { - } else { - cpmsg_error('cloud_status_error'); - } -} - -$forceOpen = !empty($_GET['force_open']) ? true : false; - -if(!$operation || $operation == 'open') { - - if($cloudstatus == 'cloud' && !$forceOpen) { - cpmsg('cloud_turnto_applist', '', 'succeed', array(), '

'.cplang('message_redirect').'

'); - } else { - if ($_GET['getConfirmInfo']) { - ajaxshowheader(); - ajaxshowfooter(); - } - - $step = max(1, intval($_GET['step'])); - $type = $cloudstatus == 'upgrade' ? 'upgrade' : 'open'; - - if($step == 1) { - - $utilService->generateUniqueId(); - - if($cloudstatus == 'upgrade' || ($cloudstatus == 'cloud' && $forceOpen)) { - shownav('navcloud', 'menu_cloud_upgrade'); - $itemtitle = cplang('menu_cloud_upgrade'); - } else { - shownav('navcloud', 'menu_cloud_open'); - $itemtitle = cplang('menu_cloud_open'); - } - - echo ' -
-

'.$itemtitle.'

- - - -
- -
-
- loading... '.$lang['cloud_page_loading'].' -
-
- '; - - showformheader('', 'onsubmit="return submitForm();"'); - - if($cloudstatus == 'upgrade' || ($cloudstatus == 'cloud' && $forceOpen)) { - echo '
'; - } - - showtableheader('', '', 'id="mainArea" style="display:none;"'); - - echo ' -
-
- ' . cplang('read_protocal') . ' - - '; - - showsubmit('submit', 'cloud_will_open', '', ' '.cplang('cloud_waiting').''); - showtablefooter(); - showformfooter(); - - echo ' - "; - - echo << - - -EOT; - $introUrl = $cloudDomain.'/cloud/introduction'; - if($cloudstatus == 'upgrade') { - $params = array('type' => 'upgrade'); - - if ($_G['setting']['my_app_status']) { - $params['apps']['manyou'] = array('status' => true); - } - - if (isset($_G['setting']['my_search_status'])) { - - $params['apps']['search'] = array('status' => !empty($_G['setting']['my_search_status']) ? true : false); - - $oldSiteId = empty($_G['setting']['my_siteid_old'])?'':$_G['setting']['my_siteid_old']; - $oldSitekeySign = empty($_G['setting']['my_sitekey_sign_old'])?'':$_G['setting']['my_sitekey_sign_old']; - - if($oldSiteId && $oldSiteId != $_G['setting']['my_siteid'] && $oldSitekeySign) { - $params['apps']['search']['oldSiteId'] = $oldSiteId; - $params['apps']['search']['searchSig'] = $oldSitekeySign; - } - - } - - if (isset($_G['setting']['connect'])) { - $params['apps']['connect'] = array('status' => !empty($_G['setting']['connect']['allow']) ? true : false); - - $oldSiteId = empty($_G['setting']['connectsiteid'])?'':$_G['setting']['connectsiteid']; - $oldSitekey = empty($_G['setting']['connectsitekey'])?'':$_G['setting']['connectsitekey']; - - if($oldSiteId && $oldSiteId != $_G['setting']['my_siteid'] && $oldSitekey) { - $params['apps']['connect']['oldSiteId'] = $oldSiteId; - $params['apps']['connect']['connectSig'] = substr(md5(substr(md5($oldSiteId.'|'.$oldSitekey), 0, 16)), 16, 16); - } - } - - $params['ADTAG'] = 'CP.DISCUZ.INTRODUCTION'; - - $signUrl = $utilService->generateSiteSignUrl($params); - $introUrl .= '?'.$signUrl; - } - - echo ''; - $doctorService = Cloud::loadClass('Service_Doctor'); - $doctorService->showCloudDoctorJS('open'); - - } elseif($step == 2) { - - $statsUrl = $cloudDomain . '/cloud/stats/registerclick'; - echo ''; - - try { - if($_G['setting']['my_siteid'] && $_G['setting']['my_sitekey']) { - - if($_G['setting']['my_app_status']) { - $manyouClient = Cloud::loadClass('Service_Client_Manyou'); - $manyouClient->sync(); - } - - $cloudClient->upgradeManyou(trim($_GET['cloud_api_ip'])); - - } else { - $cloudClient->registerCloud(trim($_GET['cloud_api_ip'])); - } - } catch (Cloud_Service_Client_RestfulException $exception) { - switch ($exception->getCode()) { - case 1: - cpmsg('cloud_unknown_dns', '', 'error'); - case 2: - $msgValues = array( - 'errorMessage' => $exception->getMessage(), - 'errorCode' => $exception->getCode() - ); - cpmsg('cloud_network_busy', '', 'error', $msgValues); - default: - $msgValues = array(); - $errorMessage = $exception->getMessage(); - $checkUrl = preg_match('/.+?<\/a>/i', $errorMessage, $results); - if($checkUrl) { - foreach($results as $key => $result) { - $errorMessage = str_replace($result, '{replace_' . $key . '}', $errorMessage); - $msgValues = array('replace_' . $key => $result); - } - } - cpmsg($errorMessage, '', 'error', $msgValues); - } - } - - $params['ADTAG'] = 'CP.CLOUD.BIND.INDEX'; - $bindUrl = $cloudDomain . '/bind/index?' . $utilService->generateSiteSignUrl($params); - echo ''; - } - } - -} elseif($operation == 'applist') { - - if($cloudstatus != 'cloud') { - cpmsg('cloud_open_first', '', 'succeed', array(), '

'.cplang('message_redirect').'

'); - } - - $signParams = array('refer' => $_G['siteurl'], 'ADTAG' => 'CP.DISCUZ.APPLIST'); - $signUrl = $utilService->generateSiteSignUrl($signParams); - $utilService->redirect($cloudDomain . '/cloud/appList/?' . $signUrl); - -} elseif(in_array($operation, array('siteinfo', 'doctor'))) { - - require libfile("cloud/$operation", 'admincp'); - -} elseif(in_array($operation, array('manyou', 'connect', 'security', 'stats', 'search', 'smilies', 'qqgroup', 'union', 'storage'))) { -/* if($cloudstatus != 'cloud') { - cpmsg('cloud_open_first', '', 'succeed', array(), '

'.cplang('message_redirect').'

'); - } - - if($operation != 'security') { - $apps = $appService->getCloudApps(); - if(empty($apps) || empty($apps[$operation]) || $apps[$operation]['status'] == 'close') { - cpmsg('cloud_application_close', 'action=plugins', 'error'); - } - if($apps[$operation]['status'] == 'disable') { - cpmsg('cloud_application_disable', 'action=plugins', 'error'); - } - } -*/ - require libfile("cloud/$operation", 'admincp'); - -} else { - exit('Access Denied'); -} \ No newline at end of file diff --git a/upload/source/admincp/admincp_counter.php b/upload/source/admincp/admincp_counter.php index 78e98e6..2db2070 100644 --- a/upload/source/admincp/admincp_counter.php +++ b/upload/source/admincp/admincp_counter.php @@ -177,9 +177,7 @@ if(submitcheck('forumsubmit', 1)) { if($thread['isgroup'] && $thread['status'] == 3) { $updateclosed[] = $thread['tid']; } elseif($thread['threadexists']) { - $tids[] = $thread['tid']; - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - $log_handler->myThreadLog('delete', array('tid' => $thread['tid'])); + $tids[] = $thread['tid']; } } diff --git a/upload/source/admincp/admincp_forums.php b/upload/source/admincp/admincp_forums.php index deb30b6..a4db7eb 100644 --- a/upload/source/admincp/admincp_forums.php +++ b/upload/source/admincp/admincp_forums.php @@ -466,10 +466,7 @@ var rowtypedata = [ C::t('forum_forum')->delete_by_fid($source); C::t('home_favorite')->delete_by_id_idtype($source, 'fid'); C::t('forum_moderator')->delete_by_fid($source); - C::t('common_member_forum_buylog')->delete_by_fid($target); - - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - $log_handler->myThreadLog('mergeforum', array('fid' => $source, 'otherid' => $target)); + C::t('common_member_forum_buylog')->delete_by_fid($target); $query = C::t('forum_access')->fetch_all_by_fid_uid($source); foreach($query as $access) { @@ -1872,10 +1869,7 @@ EOT; deletethread($tids); deletedomain($fid, 'forum'); deletedomain($fid, 'subarea'); - if($currow + $pp > $total) { - - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - $log_handler->myThreadLog('delforum', array('fid' => $fid)); + if($currow + $pp > $total) { C::t('forum_forum')->delete_by_fid($fid); C::t('common_nav')->delete_by_type_identifier(5, $fid); C::t('home_favorite')->delete_by_id_idtype($fid, 'fid'); diff --git a/upload/source/admincp/admincp_members.php b/upload/source/admincp/admincp_members.php index 2467330..6361f57 100644 --- a/upload/source/admincp/admincp_members.php +++ b/upload/source/admincp/admincp_members.php @@ -1177,9 +1177,7 @@ EOF; } if($_GET['groupidnew'] != $member['groupid'] && (in_array($_GET['groupidnew'], array(4, 5)) || in_array($member['groupid'], array(4, 5)))) { - $my_opt = in_array($_GET['groupidnew'], array(4, 5)) ? 'banuser' : 'unbanuser'; - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - $log_handler->myThreadLog($my_opt, array('uid' => $member['uid'])); + $my_opt = in_array($_GET['groupidnew'], array(4, 5)) ? 'banuser' : 'unbanuser'; banlog($member['username'], $member['groupid'], $_GET['groupidnew'], $groupexpirynew, $_GET['reason']); } @@ -1549,11 +1547,6 @@ EOF; uc_user_deleteavatar($member['uid']); } } - if(!empty($my_data) && !empty($mylogtype)) { - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - $log_handler->myThreadLog($mylogtype, $my_data); - } - $setarr['adminid'] = $adminidnew; $setarr['groupid'] = $groupidnew; @@ -3185,7 +3178,7 @@ function notifymembers($operation, $variable) { if(!function_exists('sendmail')) { include libfile('function/mail'); } - if($_GET['notifymember'] && in_array($_GET['notifymembers'], array('pm', 'notice', 'email', 'mobile'))) { + if($_GET['notifymember'] && in_array($_GET['notifymembers'], array('pm', 'notice', 'email'))) { $uids = searchmembers($search_condition, $pertask, $current); require_once libfile('function/discuzcode'); @@ -3207,64 +3200,50 @@ function notifymembers($operation, $variable) { $urladd .= '&gpmid='.$gpmid; } $members = C::t('common_member')->fetch_all($uids); - if($_GET['notifymembers'] == 'mobile') { - $toUids = array_keys($members); - if($_G['setting']['cloud_status'] && !empty($toUids)) { - try { - $noticeService = Cloud::loadClass('Service_Client_Notification'); - $fromType = $_GET['system'] ? 1 : 2; - $noticeService->addSiteMasterUserNotify($toUids, $subject, $message, $_G['uid'], $_G['username'], $fromType, TIMESTAMP); - } catch (Cloud_Service_Client_RestfulException $e) { - cpmsg('['.$e->getCode().']'.$e->getMessage(), '', 'error'); + foreach($members as $member) { + if($_GET['notifymembers'] == 'pm') { + C::t('common_member_grouppm')->insert(array( + 'uid' => $member['uid'], + 'gpmid' => $gpmid, + 'status' => 0 + ), false, true); + $newpm = setstatus(2, 1, $member['newpm']); + C::t('common_member')->update($member['uid'], array('newpm'=>$newpm)); + } elseif($_GET['notifymembers'] == 'notice') { + notification_add($member['uid'], 'system', 'system_notice', array('subject' => $subject, 'message' => $message.$addmsg, 'from_id' => 0, 'from_idtype' => 'sendnotice'), 1); + } elseif($_GET['notifymembers'] == 'email') { + if(!sendmail("$member[username] <$member[email]>", $subject, $message.$addmsg)) { + runlog('sendmail', "$member[email] sendmail failed."); } - } - } else { - foreach($members as $member) { - if($_GET['notifymembers'] == 'pm') { - C::t('common_member_grouppm')->insert(array( - 'uid' => $member['uid'], - 'gpmid' => $gpmid, - 'status' => 0 - ), false, true); - $newpm = setstatus(2, 1, $member['newpm']); - C::t('common_member')->update($member['uid'], array('newpm'=>$newpm)); - } elseif($_GET['notifymembers'] == 'notice') { - notification_add($member['uid'], 'system', 'system_notice', array('subject' => $subject, 'message' => $message.$addmsg, 'from_id' => 0, 'from_idtype' => 'sendnotice'), 1); - } elseif($_GET['notifymembers'] == 'email') { - if(!sendmail("$member[username] <$member[email]>", $subject, $message.$addmsg)) { - runlog('sendmail', "$member[email] sendmail failed."); + + $log = array(); + if($_GET['updatecredittype'] == 0) { + foreach($setarr as $key => $val) { + if(empty($val)) continue; + $val = intval($val); + $id = intval($key); + $id = !$id && substr($key, 0, -1) == 'extcredits' ? intval(substr($key, -1, 1)) : $id; + if(0 < $id && $id < 9) { + $log['extcredits'.$id] = $val; } } - - $log = array(); - if($_GET['updatecredittype'] == 0) { - foreach($setarr as $key => $val) { - if(empty($val)) continue; - $val = intval($val); - $id = intval($key); - $id = !$id && substr($key, 0, -1) == 'extcredits' ? intval(substr($key, -1, 1)) : $id; - if(0 < $id && $id < 9) { - $log['extcredits'.$id] = $val; - } + $logtype = 'RPR'; + } else { + foreach($setarr as $val) { + if(empty($val)) continue; + $id = intval($val); + $id = !$id && substr($val, 0, -1) == 'extcredits' ? intval(substr($val, -1, 1)) : $id; + if(0 < $id && $id < 9) { + $log['extcredits'.$id] = '-1'; } - $logtype = 'RPR'; - } else { - foreach($setarr as $val) { - if(empty($val)) continue; - $id = intval($val); - $id = !$id && substr($val, 0, -1) == 'extcredits' ? intval(substr($val, -1, 1)) : $id; - if(0 < $id && $id < 9) { - $log['extcredits'.$id] = '-1'; - } - } - $logtype = 'RPZ'; } - include_once libfile('function/credit'); - credit_log($member['uid'], $logtype, $member['uid'], $log); - - $continue = TRUE; + $logtype = 'RPZ'; } + include_once libfile('function/credit'); + credit_log($member['uid'], $logtype, $member['uid'], $log); + + $continue = TRUE; } } @@ -3306,15 +3285,7 @@ function notifymembers($operation, $variable) { function banlog($username, $origgroupid, $newgroupid, $expiration, $reason, $status = 0) { global $_G, $_POST; - $cloud_apps = dunserialize($_G['setting']['cloud_apps']); - if (isset($_POST['bannew']) && $_POST['formhash'] && $cloud_apps['security']['status'] == 'normal') { - $securityService = Cloud::loadClass('Service_Security'); - if ($_POST['bannew']) { - $securityService->logBannedMember($username, $reason); - } else { - $securityService->updateMemberRecover($username); - } - } + $cloud_apps = dunserialize($_G['setting']['cloud_apps']); writelog('banlog', dhtmlspecialchars("$_G[timestamp]\t{$_G[member][username]}\t$_G[groupid]\t$_G[clientip]\t$username\t$origgroupid\t$newgroupid\t$expiration\t$reason\t$status")); } diff --git a/upload/source/admincp/admincp_prune.php b/upload/source/admincp/admincp_prune.php index cdac48f..66fc0d0 100644 --- a/upload/source/admincp/admincp_prune.php +++ b/upload/source/admincp/admincp_prune.php @@ -102,7 +102,6 @@ EOT; loadcache('posttableids'); $posttable = in_array($_GET['posttableid'], $_G['cache']['posttableids']) ? $_GET['posttableid'] : 0; - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); foreach(C::t('forum_post')->fetch_all($posttable, ($pids ? explode(',', $pids) : $_GET['pidarray']), false) as $post) { $prune['forums'][] = $post['fid']; $prune['thread'][$post['tid']]++; @@ -111,12 +110,6 @@ EOT; if($post['first']) { $tidsdelete[] = $post['tid']; } - - if($post['first']) { - $log_handler->myThreadLog('delete', array('tid' => $post['tid'])); - } else { - $log_handler->myPostLog('delete', array('pid' => $post['pid'])); - } } if($pidsdelete) { diff --git a/upload/source/admincp/admincp_recyclebin.php b/upload/source/admincp/admincp_recyclebin.php index 8afd371..39e0557 100644 --- a/upload/source/admincp/admincp_recyclebin.php +++ b/upload/source/admincp/admincp_recyclebin.php @@ -112,12 +112,8 @@ if(!$operation) { $pendtime = $_GET['pendtime']; $mstarttime = $_GET['mstarttime']; $mendtime = $_GET['mendtime']; - - $appService = Cloud::loadClass('Service_App'); - $secStatus = $appService->getCloudAppStatus('security'); - if($secStatus){ - $security = $_GET['security']; - } + + $secStatus = false; $searchsubmit = $_GET['searchsubmit']; diff --git a/upload/source/admincp/admincp_recyclebinpost.php b/upload/source/admincp/admincp_recyclebinpost.php index 9244ebc..90400fb 100644 --- a/upload/source/admincp/admincp_recyclebinpost.php +++ b/upload/source/admincp/admincp_recyclebinpost.php @@ -80,12 +80,8 @@ if(!$operation) { $keywords = $_GET['keywords']; $pstarttime = $_GET['pstarttime']; $pendtime = $_GET['pendtime']; - - $appService = Cloud::loadClass('Service_App'); - $secStatus = $appService->getCloudAppStatus('security'); - if($secStatus){ - $security = $_GET['security']; - } + + $secStatus = false; $searchsubmit = $_GET['searchsubmit']; diff --git a/upload/source/admincp/admincp_threads.php b/upload/source/admincp/admincp_threads.php index 3b2937d..279c74a 100644 --- a/upload/source/admincp/admincp_threads.php +++ b/upload/source/admincp/admincp_threads.php @@ -367,12 +367,7 @@ EOT; foreach(explode(',', $_GET['fids'].','.$_GET['toforum']) as $fid) { updateforumcount(intval($fid)); - } - - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($_GET['tidarray'] as $tid) { - $log_handler->myThreadLog('move', array('tid' => $tid, 'otherid' => $_GET['toforum'])); - } + } $cpmsg = cplang('threads_succeed'); @@ -399,11 +394,7 @@ EOT; foreach(explode(',', $_GET['fids']) as $fid) { updateforumcount(intval($fid)); } - - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($_GET['tidarray'] as $tid) { - $log_handler->myThreadLog('delete', array('tid' => $tid)); - } + $cpmsg = cplang('threads_succeed'); } elseif($optype == 'deleteattach') { @@ -424,11 +415,6 @@ EOT; C::t('forum_thread')->update($tidsarray, array('displayorder'=>$_GET['stick_level'])); $my_act = $_GET['stick_level'] ? 'sticky' : 'update'; - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($_GET['tidarray'] as $tid) { - $log_handler->myThreadLog($my_act, array('tid' => $tid)); - } - if($_G['setting']['globalstick']) { updatecache('globalstick'); } @@ -450,22 +436,13 @@ EOT; } C::t('forum_thread')->update($tidsarray, array('digest'=>$_GET['digest_level'])); $my_act = $_GET['digest_level'] ? 'digest' : 'update'; - - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($_GET['tidarray'] as $tid) { - $log_handler->myThreadLog($my_act, array('tid' => $tid)); - } + $cpmsg = cplang('threads_succeed'); } elseif($optype == 'addstatus') { C::t('forum_thread')->update($tidsarray, array('closed'=>$_GET['status'])); - $my_opt = $_GET['status'] ? 'close' : 'open'; - - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($_GET['tidarray'] as $tid) { - $log_handler->myThreadLog($my_opt, array('tid' => $tid)); - } + $my_opt = $_GET['status'] ? 'close' : 'open'; $cpmsg = cplang('threads_succeed'); diff --git a/upload/source/admincp/moderate/moderate_reply.php b/upload/source/admincp/moderate/moderate_reply.php index 11ebb88..d50cb79 100644 --- a/upload/source/admincp/moderate/moderate_reply.php +++ b/upload/source/admincp/moderate/moderate_reply.php @@ -261,12 +261,10 @@ if(!submitcheck('modsubmit') && !$_GET['fast']) { } $threadlist = C::t('forum_thread')->fetch_all($tids); - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); foreach($postlist as $post) { $post['lastpost'] = $threadlist[$post['tid']]['lastpost']; $pidarray[] = $post['pid']; - $log_handler->myPostLog('validate', array('pid' => $post['pid'])); if(getstatus($post['status'], 3) == 0) { updatepostcredits('+', $post['authorid'], 'reply', $post['fid']); $attachcount = C::t('forum_attachment_n')->count_by_id('tid:'.$post['tid'], 'pid', $post['pid']); diff --git a/upload/source/admincp/moderate/moderate_thread.php b/upload/source/admincp/moderate/moderate_thread.php index f9fb451..c5b875f 100644 --- a/upload/source/admincp/moderate/moderate_thread.php +++ b/upload/source/admincp/moderate/moderate_thread.php @@ -208,11 +208,8 @@ if(!submitcheck('modsubmit') && !$_GET['fast']) { if($moderation['delete']) { $deletetids = array(); - $recyclebintids = array(); - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); + $recyclebintids = array(); foreach(C::t('forum_thread')->fetch_all_by_tid_displayorder($moderation['delete'], $displayorder, '>=', $fidadd[fids]) as $thread) { - $log_handler->myThreadLog('delete', array('tid' => $thread['tid'])); - if($recyclebins[$thread['fid']]) { $recyclebintids[] = $thread['tid']; } else { @@ -242,8 +239,7 @@ if(!submitcheck('modsubmit') && !$_GET['fast']) { require_once libfile('function/forum'); $forums = array(); - $tids = $authoridarray = $moderatedthread = array(); - $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper'); + $tids = $authoridarray = $moderatedthread = array(); foreach(C::t('forum_thread')->fetch_all_by_tid_fid($moderation['validate'], $fidadd['fids']) as $thread) { if($thread['displayorder'] != -2 && $thread['displayorder']!= -3) { continue; @@ -252,8 +248,6 @@ if(!submitcheck('modsubmit') && !$_GET['fast']) { $poststatus = $poststatus['status']; $tids[] = $thread['tid']; - $log_handler->myThreadLog('validate', array('tid' => $thread['tid'])); - if(getstatus($poststatus, 3) == 0) { updatepostcredits('+', $thread['authorid'], 'post', $thread['fid']); $attachcount = C::t('forum_attachment_n')->count_by_id('tid:'.$thread['tid'], 'tid', $thread['tid']); diff --git a/upload/source/module/forum/forum_attachment.php b/upload/source/module/forum/forum_attachment.php index 78ac497..ace6bdd 100644 --- a/upload/source/module/forum/forum_attachment.php +++ b/upload/source/module/forum/forum_attachment.php @@ -165,9 +165,7 @@ if(empty($_GET['nothumb']) && $attach['isimage'] && $attach['thumb']) { } $filename = $_G['setting']['attachdir'].'/forum/'.$attach['attachment']; -if(!$attach['remote'] && !is_readable($filename)) { - $storageService = Cloud::loadClass('Service_Storage'); - $storageService->checkAttachment($attach); +if(!$attach['remote'] && !is_readable($filename)) { if(!$requestmode) { showmessage('attachment_nonexistence'); } else { diff --git a/upload/source/plugin/qqconnect/lib/Connect.php b/upload/source/plugin/qqconnect/lib/Connect.php index 3dd8c43..f67bfd5 100644 --- a/upload/source/plugin/qqconnect/lib/Connect.php +++ b/upload/source/plugin/qqconnect/lib/Connect.php @@ -123,7 +123,8 @@ class Cloud_Service_Connect { $params['sig'] = $this->connectGetSig($params, $this->connectGetSigKey()); $jsurl = $_G['connect']['discuz_new_feed_url']; - $utilService = Cloud::loadClass('Service_Util'); + require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Util.php'; + $utilService = new Cloud_Service_Util(); $jsurl .= '?' . $utilService->httpBuildQuery($params, '', '&'); return $jsurl; @@ -395,7 +396,8 @@ class Cloud_Service_Connect { $url = urlencode($url); - $utilService = Cloud::loadClass('Service_Util'); + require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Util.php'; + $utilService = new Cloud_Service_Util(); $param_str = urlencode($utilService->httpBuildQuery($params, '', '&')); $base_string = $method.'&'.$url.'&'.$param_str; @@ -554,7 +556,8 @@ class Cloud_Service_Connect { function connectCookieLoginReport($loginTimes) { global $_G; - $utilService = Cloud::loadClass('Service_Util'); + require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Util.php'; + $utilService = new Cloud_Service_Util(); $response = ''; if ($loginTimes) { diff --git a/upload/source/plugin/qqconnect/qqshow.inc.php b/upload/source/plugin/qqconnect/qqshow.inc.php index 0f2319e..faf881c 100644 --- a/upload/source/plugin/qqconnect/qqshow.inc.php +++ b/upload/source/plugin/qqconnect/qqshow.inc.php @@ -15,7 +15,8 @@ if(!$_G['uid']) { showmessage('not_loggedin', NULL, array(), array('login' => 1)); } -$connectService = Cloud::loadClass('Service_Connect'); +require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Connect.php'; +$connectService = new Cloud_Service_Connect(); $connectService->connectMergeMember(); if($_G['member']['conisbind']) { diff --git a/upload/source/plugin/wechat/connect.inc.php b/upload/source/plugin/wechat/connect.inc.php index 2cde90f..b746f6f 100644 --- a/upload/source/plugin/wechat/connect.inc.php +++ b/upload/source/plugin/wechat/connect.inc.php @@ -20,8 +20,9 @@ $_G['connect']['callback_url'] = $_G['siteurl'].'plugin.php?id=wechat:connect&op parse_str(substr($_GET['referer'], 1), $refererarray); $referer = 'http://wsq.discuz.com/'.$_GET['referer']; -try { - $connectOAuthClient = Cloud::loadClass('Service_Client_ConnectOAuth'); +try { + require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/ConnectOAuth.php'; + $connectOAuthClient = new Cloud_Service_Client_ConnectOAuth(); } catch(Exception $e) { showmessage('qqconnect:connect_app_invalid'); } @@ -74,8 +75,9 @@ if($op == 'init') { $params = $_GET; - if(!isset($params['receive'])) { - $utilService = Cloud::loadClass('Service_Util'); + if(!isset($params['receive'])) { + require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Util.php'; + $utilService = new Cloud_Service_Util(); echo ''; exit; }