aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metastrings.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-22 21:28:30 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-22 21:28:30 +0000
commit11512c0b3ef34ebf5b66e98c9c11cbbad074c037 (patch)
treeab2947cc6a8c38e421b759fb4a6d47579d551ade /engine/lib/metastrings.php
parentb4ac8dcaf7676152f0430023145c3a54334a57ec (diff)
downloadelgg-11512c0b3ef34ebf5b66e98c9c11cbbad074c037.tar.gz
elgg-11512c0b3ef34ebf5b66e98c9c11cbbad074c037.tar.bz2
Introducing elgg_view_annotation
git-svn-id: https://code.elgg.org/elgg/trunk@1046 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r--engine/lib/metastrings.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index aaa199e03..74668ec81 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -28,6 +28,26 @@
return $row->id;
return false;
+ }
+
+ /**
+ * When given an ID, returns the corresponding metastring
+ *
+ * @param int $id Metastring ID
+ * @return string Metastring
+ */
+ function get_metastring($id) {
+
+ global $CONFIG;
+
+ $id = (int) $id;
+
+ $row = get_data_row("SELECT * from {$CONFIG->dbprefix}metastrings where id='$id' limit 1");
+ if ($row)
+ return $row->string;
+
+ return false;
+
}
/**