shouldShow()) return; echo '
'; echo '
'; echo $this->getLang('i_qcscore'); echo '
'; echo ''; echo '
'; } /** * Should the QC plugin be shown? * * It checks if the page exists, if QC was disabled for this page, general * settings and ACLs * * This may be called from page context as well as from AJAX. In AJAX context * the page id needs to be passed as parameter * * @param string $id the page ID, defaults to global $ID * @return bool */ public function shouldShow($id = '') { global $ACT, $INFO, $ID; if ($id === '') $id = $ID; if (isset($ACT) && $ACT != 'show') return false; if (isset($INFO)) { $exists = $INFO['exists']; } else { $exists = page_exists($id); } if (!$exists) return false; if (auth_quickaclcheck($id) < AUTH_READ) return false; if (p_get_metadata($id, 'relation qcplugin_disabled')) return false; if ($this->getConf('adminonly')) { if (!isset($_SERVER['REMOTE_USER']) || !auth_isadmin()) { return false; } } return true; } /** * Return the raw quality data * * Always call this asynchronly! * * @param $theid * @return array */ public function getQCData($theid) { global $ID; $oldid = $ID; $ID = $theid; $data = unserialize(p_cached_output(wikiFN($ID), 'qc', $ID)); $ID = $oldid; return $data; } }