From ae03d8b102c8929b42227e2dbac4402cc368064d Mon Sep 17 00:00:00 2001 From: icewing Date: Fri, 14 Mar 2008 11:10:12 +0000 Subject: Marcus Povey * Metastrings modified for new schema git-svn-id: https://code.elgg.org/elgg/trunk@217 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/metastrings.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'engine') diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php index b4d076eab..45ad8acda 100644 --- a/engine/lib/metastrings.php +++ b/engine/lib/metastrings.php @@ -14,16 +14,16 @@ /** * Return the meta string id for a given tag, or false. * - * @param string $tag The value (whatever that is) to be stored + * @param string $string The value (whatever that is) to be stored * @return mixed Integer tag or false. */ - function get_metastring_id($tag) + function get_metastring_id($string) { global $CONFIG; - $tag = sanitise_string($tag); + $string = sanitise_string($string); - $row = get_data_row("SELECT * from {$CONFIG->dbprefix}metastrings where tag='$tag' limit 1"); + $row = get_data_row("SELECT * from {$CONFIG->dbprefix}metastrings where string='$string' limit 1"); if ($row) return $row->id; @@ -34,19 +34,19 @@ * Add a metastring. * It returns the id of the tag, whether by creating it or updating it. * - * @param string $tag The value (whatever that is) to be stored + * @param string $string The value (whatever that is) to be stored * @return mixed Integer tag or false. */ - function add_metastring($tag) + function add_metastring($string) { global $CONFIG; - $tag = sanitise_string($tag); + $string = sanitise_string($string); - $id = get_metastring_id($tag); + $id = get_metastring_id($string); if ($id) return $id; - return insert_data("INSERT into {$CONFIG->dbprefix}metastrings (tag) values ('$tag')"); + return insert_data("INSERT into {$CONFIG->dbprefix}metastrings (string) values ('$string')"); } ?> \ No newline at end of file -- cgit v1.2.3