From c5cc2821311012a8a4385a304a043c4b41f2afbb Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 31 Aug 2009 19:05:21 +0000 Subject: All line endings are now Unix-style. git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/metastrings.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'engine/lib/metastrings.php') diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php index 94529e16f..31981efab 100644 --- a/engine/lib/metastrings.php +++ b/engine/lib/metastrings.php @@ -68,18 +68,18 @@ $METASTRINGS_DEADNAME_CACHE[$string] = $string; return false; - } - - /** - * When given an ID, returns the corresponding metastring - * - * @param int $id Metastring ID - * @return string Metastring - */ - function get_metastring($id) { - - global $CONFIG, $METASTRINGS_CACHE; - + } + + /** + * When given an ID, returns the corresponding metastring + * + * @param int $id Metastring ID + * @return string Metastring + */ + function get_metastring($id) { + + global $CONFIG, $METASTRINGS_CACHE; + $id = (int) $id; if (isset($METASTRINGS_CACHE[$id])) { @@ -88,20 +88,20 @@ error_log("** Returning string for id:$id from cache."); return $METASTRINGS_CACHE[$id]; - } - - $row = get_data_row("SELECT * from {$CONFIG->dbprefix}metastrings where id='$id' limit 1"); + } + + $row = get_data_row("SELECT * from {$CONFIG->dbprefix}metastrings where id='$id' limit 1"); if ($row) { $METASTRINGS_CACHE[$id] = $row->string; // Cache it if ($CONFIG->debug) error_log("** Cacheing string '{$row->string}'"); - + return $row->string; - } - - return false; - + } + + return false; + } /** -- cgit v1.2.3