// Update task or extension task?
if ($type == 'EXTENSION') {
+ // @TODO Should we init sql_notes here or inside REGISTER_EXTENSION()?
+ EXT_INIT_NOTES();
+
// Load SQL commands for registering
REGISTER_EXTENSION($ext_name, $id, true);
case 'NL_UNSUBSCRIBE': // Newsletter unsubscriptions
$result = SQL_QUERY_ESC("SELECT nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
list($span) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ($span > 0) {
// Undone unscubscribe request
$content = array(
- 'uid' => $uid,
- 'id' => $tid
+ 'uid' => $uid,
+ 'id' => $tid
);
$OUT .= LOAD_TEMPLATE('admin_newsletter_tsk', true, $content);
} else {
$content['assigned_admin'] = generateAdminLink($content['assigned_admin']);
// Generate infos
- switch ($content['task_type'])
- {
+ // @TODO Try to move this in includes
+ switch ($content['task_type']) {
case 'EXTENSION':
case 'EXTENSION_UPDATE':
$content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);