From ce4c63201cf9e7e9a35ebadd4d03c2528ef87a64 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 25 Aug 2005 03:21:37 +0000 Subject: [PATCH] r378: Added registry converter --- docs/lang_registry_converter.php | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/lang_registry_converter.php diff --git a/docs/lang_registry_converter.php b/docs/lang_registry_converter.php new file mode 100644 index 0000000..c24a609 --- /dev/null +++ b/docs/lang_registry_converter.php @@ -0,0 +1,94 @@ + + + + + + Phrase Registry Converter + + + +

Phrase Registry Converter

+ +Pick a phrase from the phrase registry and enter in a varname and a comment (optional). The converter will remove it from the phrase registry and add it to the language system. It will also fill in the md5 field and comment field in the language system. + +
+
+ +in['do'] == 'convert') +{ + foreach ($bugsys->in['phrases'] AS $md5 => $phrase) + { + if ($phrase['varname'] AND $phrase['phrasetext']) + { + $db->query(" + REPLACE INTO phrase + (varname, phrasetext, md5, comment) + VALUES + ('" . $phrase['varname'] . "', + '" . $phrase['phrasetext'] . "', + '" . $md5 . "', + '" . $phrase['comment'] . "' + )" + ); + + $db->query("DELETE FROM phraseregistry WHERE md5 = '" . $md5 . "'"); + } + } + + echo 'Converted phrase registry items. Continue...'; + exit; +} + +?> + +
+ + + + + + + + + + + +query("SELECT * FROM phraseregistry"); +while ($phrase = $db->fetch_array($registry)) +{ + $phrase['text_clean'] = htmlspecialchars($phrase['phrasetext']); + + echo << + + + + + +HTML; +} + +?> + + + + +
Phrase TextVarnameComment
+ +
+ + + \ No newline at end of file -- 2.43.5