} // END - if
// Update database
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
array(
$active,
bigintval($ext_id),
// Update extension's record
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
// Update also CSS column when extensions ext-sql_patches is newer or exact v0.0.6
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s',`ext_active`='%s' WHERE `id`=%s LIMIT 1",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s',`ext_active`='%s' WHERE `id`=%s LIMIT 1",
array(postRequestElement('css', $ext_id), $active, $ext_id), __FILE__, __LINE__);
} else {
// When extension is older than v0.0.6 there is no column for the CSS information
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1",
array($active, $ext_id), __FILE__, __LINE__);
}
// Load required data
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
- $result = SQL_QUERY_ESC("SELECT `ext_has_css`, `ext_active` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `ext_has_css`, `ext_active` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
array(bigintval($ext_id)), __FILE__, __LINE__);
- list($css, $active) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ list($css, $active) = sqlFetchRow($result);
+ sqlFreeResult($result);
} else {
- $result = SQL_QUERY_ESC("SELECT `ext_active` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
+ $result = sqlQueryEscaped("SELECT `ext_active` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
array(bigintval($ext_id)), __FILE__, __LINE__);
- list($active) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ list($active) = sqlFetchRow($result);
+ sqlFreeResult($result);
$css = 'X';
}
// Shall we display active/inactive extensions?
$where = '';
if (isGetRequestElementSet('active')) {
- $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(getRequestElement('active')));
+ $where = sprintf("WHERE `ext_active`='%s'", sqlEscapeString(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 = sqlQuery('SELECT
`id` AS `ext_id`,
`ext_name`,
`ext_active`,
`ext_name` ASC', __FILE__, __LINE__);
} else {
// Load extension data without CSS informations
- $result = SQL_QUERY('SELECT
+ $result = sqlQuery('SELECT
`id` AS `ext_id`,
`ext_name`,
`ext_active`,
}
// Are there some entries?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Extensions are registered
$OUT = '';
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Prepare CSS selection output
$cssSelection = '---';
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
} // END - while
// Free memory
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Load template
loadTemplate('admin_list_extensions', FALSE, $OUT);
// Is the id number valid and the task was found?
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",
+ $result = sqlQueryEscaped("SELECT `subject` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1",
array(bigintval($taskId)), __FILE__, __LINE__);
- list($subject) = SQL_FETCHROW($result);
+ list($subject) = sqlFetchRow($result);
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Disable cache update by default
$cache_update = '0';