diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-08-31 19:05:21 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-08-31 19:05:21 +0000 |
commit | c5cc2821311012a8a4385a304a043c4b41f2afbb (patch) | |
tree | 3703351e4b5d56905eb52547d6129ffa14cb2a32 /engine/lib/metastrings.php | |
parent | 775a5f08c501acc565c69659022bc31052677485 (diff) | |
download | elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2 |
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r-- | engine/lib/metastrings.php | 40 |
1 files changed, 20 insertions, 20 deletions
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; + } /** |