getConf('adminonly')) {
if (!isset($_SERVER['REMOTE_USER']) || !auth_isadmin())
return;
}
echo '
';
echo '

';
echo '
';
echo '
';
}
function getQCData($theid){
global $ID;
$oldid = $ID;
$ID = $theid;
require_once DOKU_INC.'inc/parserutils.php';
$data = unserialize(p_cached_output(wikiFN($ID), 'qc', $ID));
$ID = $oldid;
return $data;
}
/**
* same function as tpl(), built markup contains additional data-attribute data-errors, which shows the current
* error count
*/
function tplErrorCount(){
global $ACT,$INFO,$ID;
if (!function_exists('gd_info')) {
msg('You have to install php-gd lib to use the QC plugin.');
return;
}
if($ACT != 'show' || !$INFO['exists']) return;
if(p_get_metadata($ID, 'relation qcplugin_disabled')) return;
if ($this->getConf('adminonly')) {
if (!isset($_SERVER['REMOTE_USER']) || !auth_isadmin())
return;
}
$qc_data = $this->getQCData($ID);
if($qc_data){
$num = $qc_data[score];
}
echo '';
echo '

';
echo '
';
echo '
';
}
}
// vim:ts=4:sw=4:et:enc=utf-8: