// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-// Normally we want the overview of all registered extensions
+// By default generate overview of all installed extensions
$do = 'overview';
if (isGetRequestElementSet('register_ext')) {
// Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
- array($active, bigintval($ext_id), $ext_active), __FILE__, __LINE__);
+ array(
+ $active,
+ bigintval($ext_id),
+ $ext_active
+ ), __FILE__, __LINE__);
// Run embeded SQL commands
doExtensionSqls($ext_id, getExtensionMode());
// Redirect to prevent missing cache in js.php
redirectToUrl('modules.php?module=admin&what=extensions&changed=' . countPostSelection());
-} elseif (((isFormSent('edit')) || (isPostRequestElementSet('modify'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
+} elseif (((isFormSent('edit')) || (isPostRequestElementSet('do_edit'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Change settings like CSS file load
- if (isPostRequestElementSet('modify')) {
+ if (isPostRequestElementSet('do_edit')) {
// Change entries
$cache_update = '0';
foreach (postRequestElement('sel') as $ext_id => $sel) {
redirectToUrl('modules.php?module=admin&what=extensions&removed=' . countPostSelection());
} elseif ((isGetRequestElementSet('do')) && (!isDemoModeActive())) {
// Other things to do
- $do = SQL_ESCAPE(secureString(getRequestElement('do')));
+ $do = getRequestElement('do');
} elseif (isGetRequestElementSet('do')) {
// Demo mode active!
$do = 'demo';
// Shall we display active/inactive extensions?
$where = '';
if (isGetRequestElementSet('active')) {
- $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestElement('active'))));
+ $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(getRequestElement('active')));
} // END - if
// Case selection
case 'overview': // List all registered extensions
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
// Load extension data with CSS informations
- $result = SQL_QUERY("SELECT
+ $result = SQL_QUERY('SELECT
`id` AS `ext_id`,
`ext_name`,
`ext_active`,
`ext_version`
FROM
`{?_MYSQL_PREFIX?}_extensions`
-".$where."
+' . $where . '
ORDER BY
- `ext_name` ASC", __FILE__, __LINE__);
+ `ext_name` ASC', __FILE__, __LINE__);
} else {
// Load extension data without CSS informations
- $result = SQL_QUERY("SELECT
+ $result = SQL_QUERY('SELECT
`id` AS `ext_id`,
`ext_name`,
`ext_active`,
`ext_version`
FROM
`{?_MYSQL_PREFIX?}_extensions`
-".$where."
+' . $where . '
ORDER BY
- `ext_name` ASC", __FILE__, __LINE__);
+ `ext_name` ASC', __FILE__, __LINE__);
}
// Are there some entries?
$numTasks = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, "AND `task_type`='EXTENSION'");
// Is the id number valid and the task was found?
- if (($taskId > 0) && ($numTasks > 0)) {
+ if ((isValidId($taskId)) && ($numTasks > 0)) {
// id is valid so begin with registration, we first want to it's real name from task management (subject column)
$result = SQL_QUERY_ESC("SELECT `subject` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1",
array(bigintval($taskId)), __FILE__, __LINE__);