diff options
Diffstat (limited to 'modules-available/baseconfig/hooks/translation.inc.php')
-rw-r--r-- | modules-available/baseconfig/hooks/translation.inc.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/modules-available/baseconfig/hooks/translation.inc.php b/modules-available/baseconfig/hooks/translation.inc.php new file mode 100644 index 00000000..84a6d33a --- /dev/null +++ b/modules-available/baseconfig/hooks/translation.inc.php @@ -0,0 +1,39 @@ +<?php + +$HANDLER = array(); + +/** + * List of valid subsections + */ +$HANDLER['subsections'] = array( + 'categories', 'settings' +); + +/* + * Handlers for the subsections that will return an array of expected tags. + * This is optional, if you don't want to define expected tags, don't create a function. + */ + +/** + * Configuration categories + */ +$HANDLER['grep']['categories'] = function($module) { + $want = array(); + $res = Database::simpleQuery("SELECT catid FROM cat_setting ORDER BY catid ASC"); + while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + $want[] = 'cat_' . $row['catid']; + } + return $want; +}; + +/** + * Configuration variables + */ +$HANDLER['grep']['settings'] = function($module) { + $want = array(); + $res = Database::simpleQuery("SELECT setting FROM setting ORDER BY setting ASC"); + while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + $want[] = $row['setting']; + } + return $want; +}; |