summaryrefslogblamecommitdiffstats
path: root/modules-available/baseconfig/hooks/translation.inc.php
blob: 84a6d33a33e8f080d4913e8775339f9f7c5c6a47 (plain) (tree)






































                                                                                         
<?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;
};