} // END - while
// Sort whole array by title
- array_pk_sort($themesArray, array("theme_name"));
+ array_pk_sort($themesArray, array('theme_name'));
// Construct selection form for the box template
$OUT = '';
);
// Return generated selection
- return LOAD_TEMPLATE("theme_select_form", true, $content);
+ return LOAD_TEMPLATE('theme_select_form', true, $content);
}
// Get version from name
// Is the extension 'theme' installed?
if (!EXT_IS_ACTIVE('theme')) {
// Then abort here
- return "!.!";
+ return '!.!';
} // END - if
- // Default version "number"
- $cver = "?.?";
+ // Default version 'number'
+ $cver = '?.?';
// Is the cache entry there?
if (isset($GLOBALS['cache_array']['themes']['theme_ver'][$name])) {
incrementConfigEntry('cache_hits');
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Load version from database
- $result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `theme_ver` FROM `{!_MYSQL_PREFIX!}_themes` WHERE `theme_path`='%s' LIMIT 1",
+ array($name), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
incrementConfigEntry('cache_hits');
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Check if current theme is already imported or not
- $result = SQL_QUERY_ESC("SELECT theme_active FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `theme_active` FROM `{!_MYSQL_PREFIX!}_themes` WHERE `theme_path`='%s' AND `theme_active`='Y' LIMIT 1",
+ array($name), __FUNCTION__, __LINE__);
// Is the theme active and installed?
$active = (SQL_NUMROWS($result) == 1);
// Is the extension 'theme' installed?
if (!EXT_IS_ACTIVE('theme')) {
// Then abort here
- return "default";
+ return 'default';
} // END - if
// Get the Uni* name
incrementConfigEntry('cache_hits');
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Check if current theme is already imported or not
- $result = SQL_QUERY_ESC("SELECT theme_name FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `theme_name` FROM `{!_MYSQL_PREFIX!}_themes` WHERE `theme_path`='%s' AND `theme_active`='Y' LIMIT 1",
+ array($name), __FUNCTION__, __LINE__);
// Load theme name
list($name) = SQL_FETCHROW($result);
$GLOBALS['curr_theme'] = getCurrentTheme();
// Check if new theme is selcted
-if ((REQUEST_ISSET_POST(('new_theme'))) && (REQUEST_POST('new_theme') != $GLOBALS['curr_theme'])) {
+if ((REQUEST_ISSET_POST('new_theme')) && (REQUEST_POST('new_theme') != $GLOBALS['curr_theme'])) {
// Set new theme for guests
$newTheme = REQUEST_POST('new_theme');
ADD_INC_TO_POOL(sprintf("%stheme/%s/theme.php", constant('PATH'), $newTheme));
} // END - if
-//
+// [EOF]
?>