function _themekey_load_paths in ThemeKey 6
Function _themekey_load_paths().
1 call to _themekey_load_paths()
- _themekey_paths_form in ./
themekey_admin.inc - Function _themekey_paths_form().
File
- ./
themekey_build.inc, line 92
Code
function _themekey_load_paths($limit = NULL) {
$paths = array();
$query = 'SELECT * FROM {themekey_paths} WHERE custom = 1';
$result = isset($limit) ? pager_query($query, $limit) : db_query($query);
while ($item = db_fetch_array($result)) {
$item['wildcards'] = unserialize($item['wildcards']);
if (count($item['wildcards'])) {
$parts = explode('/', $item['path'], MENU_MAX_PARTS);
foreach ($item['wildcards'] as $index => $wildcard) {
$parts[$index] .= $wildcard;
}
$item['path'] = implode('/', $parts);
}
$item['conditions'] = unserialize($item['conditions']);
$item['conditions'] = count($item['conditions']) ? implode('; ', $item['conditions']) : '';
$paths[] = $item;
}
return $paths;
}