From 2025bfc15e74c402763f5cd7c39b6c7863615311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Fri, 18 Jan 2013 21:12:04 +0100 Subject: [PATCH] Fix entry title. re #32 --- customcolumn.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/customcolumn.php b/customcolumn.php index a876a71..6d59768 100644 --- a/customcolumn.php +++ b/customcolumn.php @@ -48,10 +48,17 @@ class CustomColumn extends Base { public static function getUriAllCustoms ($customId) { return "?page=" . parent::PAGE_ALL_CUSTOMS . "&custom={$customId}"; } + + public static function getAllTitle ($customId) { + $result = parent::getDb ()->prepare('select name from custom_columns where id = ?'); + $result->execute (array ($customId)); + $post = $result->fetchObject (); + return $post->name; + } public static function getCount($customId) { $nCustoms = parent::getDb ()->query('select count(*) from ' . self::getTableName ($customId))->fetchColumn(); - $entry = new Entry (localize("tags.title"), self::getAllCustomsId ($customId), + $entry = new Entry (self::getAllTitle ($customId), self::getAllCustomsId ($customId), str_format (localize("tags.alphabetical"), $nCustoms), "text", array ( new LinkNavigation (self::getUriAllCustoms ($customId)))); return $entry;