added karmabar in maplist
This commit is contained in:
1 parent
cdda23cb60
commit
321eb11385
4 files changed
+50
-10
No files matched your search
@@ -365,7 +365,7 @@ class KarmaPlugin implements CallbackListener, Plugin {
|
||||
* @param Map $map
|
||||
* @return float | bool
|
||||
*/
|
||||
private function getMapKarma(Map $map) {
|
||||
public function getMapKarma(Map $map) {
|
||||
$mysqli = $this->maniaControl->database->mysqli;
|
||||
$query = "SELECT AVG(`vote`) AS `karma` FROM `" . self::TABLE_KARMA . "`
|
||||
WHERE `mapIndex` = {$map->index}
|
||||
@@ -394,7 +394,7 @@ class KarmaPlugin implements CallbackListener, Plugin {
|
||||
* @param Map $map
|
||||
* @return array
|
||||
*/
|
||||
private function getMapVotes(Map $map) {
|
||||
public function getMapVotes(Map $map) {
|
||||
$mysqli = $this->maniaControl->database->mysqli;
|
||||
$query = "SELECT `vote`, COUNT(`vote`) AS `count` FROM `" . self::TABLE_KARMA . "`
|
||||
WHERE `mapIndex` = {$map->index}
|
||||
|
||||
Reference in new issue
Block a user