NOBUG wiki: Fixing wiki_scale_used_anywhere()

Firstly, the conditions array was passed incorrectly. Secondly, the
scale id would be probably saved as negative integer. Thirdly, the
column does not exist in the new wiki yet.
This commit is contained in:
David Mudrak 2010-06-01 13:01:20 +00:00
parent 5cca21a665
commit 75a8ba5461

View file

@ -367,11 +367,13 @@ function wiki_scale_used($wikiid, $scaleid) {
function wiki_scale_used_anywhere($scaleid) { function wiki_scale_used_anywhere($scaleid) {
global $DB; global $DB;
if ($scaleid and $DB->record_exists('wiki', array('grade', $scaleid))) { //if ($scaleid and $DB->record_exists('wiki', array('grade' => -$scaleid))) {
return true; // return true;
} else { //} else {
// return false;
//}
return false; return false;
}
} }
/** /**