diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-14 11:10:12 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-14 11:10:12 +0000 |
commit | ae03d8b102c8929b42227e2dbac4402cc368064d (patch) | |
tree | 726f1c12e6867bc7c960bc474da1a243fd0e6a7d /engine/lib/metastrings.php | |
parent | 2612c81c6fa8b2e5fc548b01e11eae47c8f2e72e (diff) | |
download | elgg-ae03d8b102c8929b42227e2dbac4402cc368064d.tar.gz elgg-ae03d8b102c8929b42227e2dbac4402cc368064d.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Metastrings modified for new schema
git-svn-id: https://code.elgg.org/elgg/trunk@217 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r-- | engine/lib/metastrings.php | 18 |
1 files changed, 9 insertions, 9 deletions
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 |