<?php
/***************************************************************************
- * Copyright (C) 2003-2011 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
public static function fetchData(array $pids, Visibility $visibility)
{
- $data = XDB::iterator('SELECT pm.pid, pm.mid, pm.gid, pme.text, pme.img, pmge.text AS grade
+ $data = XDB::iterator('SELECT pm.pid, pm.mid, pm.gid, pme.text, pme.img, pmge.text AS grade, pm.level
FROM profile_medals AS pm
LEFT JOIN profiles AS p ON (pm.pid = p.pid)
LEFT JOIN profile_medal_enum AS pme ON (pme.id = pm.mid)
static public function get($id)
{
- if (!array_key_exists($id, self::$companies)) {
+ if (!is_null($id) && !array_key_exists($id, self::$companies)) {
self::preload();
}
if (isset(self::$companies[$id])) {
}
// }}}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>