forked from GithubBackups/vichan
This clean feature is too SQL intensive. Only check clean if in mod.php
This commit is contained in:
parent
37f7406db8
commit
bd128bf465
@ -415,10 +415,10 @@ class Post {
|
||||
));
|
||||
}
|
||||
|
||||
public function getClean( ) {
|
||||
public function getClean($actually_do = false) {
|
||||
global $board, $config;
|
||||
|
||||
if( !isset( $this->clean ) ) {
|
||||
if( !isset( $this->clean ) && $actually_do ) {
|
||||
if ($config['cache']['enabled'] && $this->clean = cache::get("post_clean_{$board['uri']}_{$this->id}")) {
|
||||
return $this->clean;
|
||||
}
|
||||
@ -441,8 +441,10 @@ class Post {
|
||||
if ($config['cache']['enabled'])
|
||||
cache::set("post_clean_{$board['uri']}_{$this->id}", $this->clean);
|
||||
}
|
||||
} else {
|
||||
$this->clean = array();
|
||||
}
|
||||
|
||||
|
||||
return $this->clean;
|
||||
}
|
||||
};
|
||||
|
@ -2507,7 +2507,7 @@ function mod_reports() {
|
||||
}
|
||||
|
||||
// Fetch clean status.
|
||||
$po->getClean();
|
||||
$po->getClean(true);
|
||||
$clean = $po->clean;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user