diff options
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r-- | engine/lib/metastrings.php | 20 |
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;
+
} /** |