Skip to content

Commit

Permalink
refs #567
Browse files Browse the repository at this point in the history
  *  트랙백 글 계산 부분을 핑백까지 하도록 수정
  • Loading branch information
inureyes committed Nov 13, 2008
1 parent 151a78d commit 7f02915
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion interface/owner/data/correct/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function setProgress($progress, $text = null, $sub = null) {
$post->updateComments();

setProgress($item++ / $items * 100, _t('글의 걸린글 정보를 다시 계산해서 저장합니다.'));
$post->updateTrackbacks();
$post->updateRemoteResponses();

setProgress($item++ / $items * 100, _t('분류의 글 정보를 다시 계산해서 저장합니다.'));
updateEntriesOfCategory($blogid);
Expand Down
13 changes: 9 additions & 4 deletions library/components/Textcube.Data.Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ function updateComments($id = null) {
return $succeeded;
}

function updateTrackbacks($id = null) {
function updateRemoteResponses($id = null) {
global $database;
$this->init();

Expand All @@ -494,11 +494,16 @@ function updateTrackbacks($id = null) {
foreach ($posts as $id) {
$trackbacks = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = ".$this->blogid." AND entry = $id AND isFiltered = 0 AND type = 'trackback'");
if (!is_null($trackbacks)) {
if (POD::execute("UPDATE {$database['prefix']}Entries SET trackbacks = $trackbacks
if (!POD::execute("UPDATE {$database['prefix']}Entries SET trackbacks = $trackbacks
WHERE blogid = ".$this->blogid." AND id = $id"))
continue;
$succeeded = false;
}
$pingbacks = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = ".$this->blogid." AND entry = $id AND isFiltered = 0 AND type = 'pingback'");
if (!is_null($pingbacks)) {
if (!POD::execute("UPDATE {$database['prefix']}Entries SET pingbacks = $pingbacks
WHERE blogid = ".$this->blogid." AND id = $id"))
$succeeded = false;
}
$succeeded = false;
}
return $succeeded;
}
Expand Down

0 comments on commit 7f02915

Please sign in to comment.