/** * Returns a list of all available short notations. * * @return Array Associative list with short notation as key and smiley * name as value */ static function getShort() { if (class_exists('DBManager') && !$GLOBALS['SMILEY_NO_DB']) { if (self::$shortnames === null) { $query = "SELECT short_name, smiley_name FROM smiley WHERE short_name != ''"; self::$shortnames = DBManager::get()->query($query)->fetchGrouped(PDO::FETCH_COLUMN); } return self::$shortnames; } else { // Unit test $short = (array) $GLOBALS['SMILE_SHORT']; } return $short; }