templates/de/emails/admin/admin_autopurge_unconfirmed.tpl -text
templates/de/emails/admin/admin_del_surfbar_urls.tpl -text
templates/de/emails/admin/admin_edit_surfbar_urls.tpl -text
+templates/de/emails/admin/admin_ext_deactivated.tpl -text
templates/de/emails/admin/admin_holiday_deactivated.tpl -text
templates/de/emails/admin/admin_holiday_request.tpl -text
templates/de/emails/admin/admin_holiday_unlock.tpl -text
templates/de/html/surfbar/surfbar_frameset.tpl -text
templates/de/html/surfbar/surfbar_start_banner.tpl -text
templates/de/html/surfbar/surfbar_stopped.tpl -text
+templates/de/html/task/.htaccess -text
+templates/de/html/task/task_ext_deactivated.tpl -text
templates/de/html/theme_one.tpl -text
templates/de/html/theme_select_box.tpl -text
templates/de/html/theme_select_form.tpl -text
define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "625");
+define('CURR_SVN_REVISION', "626");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
require($INC);
}
-// Load the extension and maybe found language and function files
-function LOAD_EXTENSION ($ext_name) {
+// Load the extension and maybe found language and function files.
+function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "") {
global $EXT_LOADED, $_CONFIG, $CSS, $cacheMode;
// Is the extension already loaded?
require($funcsInclude);
} // END - if
- // Set extension load mode to nothing (default)
- $EXT_LOAD_MODE = "";
+ // Extensions are not deprecated by default
+ $EXT_DEPRECATED = "N";
// Include the extension file
//* DEBUG: */ echo "Extension loaded.<br />\n";
require($extInclude);
+ // Is this extension deprecated?
+ if ($EXT_DEPRECATED == "Y") {
+ // Deactivate the extension
+ DEACTIVATE_EXTENSION($ext_name);
+
+ // Abort here
+ return false;
+ } // END - if
+
// Mark it as loaded
$EXT_LOADED[$ext_name] = true;
} // END - if
// Register extension
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
array($ext_name, $EXT_ALWAYS_ACTIVE, $EXT_VERSION), __FILE__, __LINE__);
// Update task management
return $ret;
}
//
-function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
-{
+function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) {
// This shall never do a non-admin user!
global $cacheInstance, $_CONFIG, $NOTES;
}
// Check if version is updated
- if ((($EXT_VERSION != $EXT_VER) || ($dry_run)) && (is_array($EXT_VER_HISTORY)))
- {
+ if ((($EXT_VERSION != $EXT_VER) || ($dry_run)) && (is_array($EXT_VER_HISTORY))) {
// Search for starting point
$start = array_search($EXT_VER, $EXT_VER_HISTORY);
$NOTES = "";
// And load SQL queries in order of version history
- for ($idx = ($start + 1); $idx < sizeof($EXT_VER_HISTORY); $idx++)
- {
+ for ($idx = ($start + 1); $idx < sizeof($EXT_VER_HISTORY); $idx++) {
// Remove old SQLs array to prevent possible bugs
if (!$dry_run) { unset($SQLs); $SQLs = array(); }
include(PATH."inc/extensions/".$file);
// Add notes
- if ($_CONFIG['verbose_sql'] == "Y")
- {
+ if ($_CONFIG['verbose_sql'] == "Y") {
$EXT_VER = $EXT_VER_HISTORY[$idx];
- if (!empty($UPDATE_NOTES))
- {
+ if (!empty($UPDATE_NOTES)) {
// Update notes found
$NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br />".$UPDATE_NOTES."<br /><br />\n";
$UPDATE_NOTES = "";
- }
- elseif ($EXT_VER == "0.0")
- {
+ } elseif ($EXT_VER == "0.0") {
// Initial release
$NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br />".INITIAL_RELEASE."<br /><br />\n";
- }
- else
- {
+ } else {
$NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br /><I>".NO_UPDATE_NOTES."</I><br /><br />\n";
}
- }
+ } // END - if
// In real-mode execute any existing includes
if ((!$dry_run) && (count($INC_POOL) > 0)) {
// Remove SQLs if extension is not installed
$SQLs = array();
}
- }
+ } // END - for
- if (!$dry_run)
- {
+ if (!$dry_run) {
// In normal mode insert task and update extension's version...
$ext_subj = "[UPDATE-".$ext."-".$EXT_VERSION.":] ".ADMIN_UPDATE_EXT_SUBJ;
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
- array($name), __FILE__, __LINE__);
+ array($name), __FILE__, __LINE__);
list($ret) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
}
// Activate given extension
-function ACTIVATE_EXTENSION($ext_name) {
+function ACTIVATE_EXTENSION ($ext_name) {
// Activate the extension
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
array($ext_name), __FILE__, __LINE__);
} // END - if
}
+// Deactivate given extension
+function DEACTIVATE_EXTENSION($ext_name) {
+ // Activate the extension
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='%s' LIMIT 1",
+ array($ext_name), __FILE__, __LINE__);
+
+ // Extension has been activated?
+ if (SQL_AFFECTEDROWS() == 1) {
+ // Then run all queries
+ EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "deactivate");
+
+ // Create new task
+ CREATE_EXTENSION_DEACTIVATION_TASK($ext_name);
+
+ // Notify the admin
+ SEND_ADMIN_NOTIFICATION(ADMIN_SUBJECT_EXTENSION_DEACTIVATED, "admin_ext_deactivated", array('ext_name' => $ext_name));
+ } // END - if
+}
+
// Checks wether the extension is older than given
function EXT_VERSION_IS_OLDER ($ext_name, $ext_ver) {
// Get current extension version
// Now compare both and return the result
return ($currVersion < $ext_ver);
}
+
+// Creates a new task for updated extension
+function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $subject, $notes) {
+ // Check if task is not there
+ $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE subject='%s' LIMIT 1",
+ array($subject), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 0) {
+ // Task not created so it's a brand-new extension which we need to register and create a task for!
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())",
+ array($admin_id, $subject, $notes), __FILE__, __LINE__);
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+}
+
+// Creates a new task for newly installed extension
+function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
+ // Not installed and do we have created a task for the admin?
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `"._MYSQL_PREFIX."_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1",
+ array($subject), __FILE__, __LINE__);
+ if ((SQL_NUMROWS($result) == 0) && (GET_EXT_VERSION($ext) == "")) {
+ // Template file
+ $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
+ PATH,
+ GET_LANGUAGE(),
+ $ext
+ );
+
+ // Load text for task
+ if (FILE_READABLE($tpl)) {
+ // Load extension's own text template (HTML!)
+ $msg = LOAD_TEMPLATE("ext_".$ext, true);
+ } else {
+ // Load default message
+ $msg = LOAD_TEMPLATE("admin_new_ext", "", 0);
+ }
+
+ // Task not created so it's a brand-new extension which we need to register and create a task for!
+ $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
+VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())",
+ array(
+ $admin_id,
+ $subject,
+ addslashes($msg),
+ ), __FILE__, __LINE__, true, false
+ );
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+}
+
+// Creates a task for automatically deactivated (deprecated) extension
+function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
+ // Create subject line
+ $subject = sprintf("[%s:] %s", $ext, TASK_SUBJ_EXTENSION_DEACTIVATED);
+
+ // Not installed and do we have created a task for the admin?
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `"._MYSQL_PREFIX."_task_system` WHERE `subject` = '%s' LIMIT 1",
+ array($subject), __FILE__, __LINE__);
+ if ((SQL_NUMROWS($result) == 0) && (GET_EXT_VERSION($ext) != "")) {
+ // Task not created so add it
+ $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
+VALUES (0,0,'NEW','EXTENSION_DEACTIVATION','%s','%s',UNIX_TIMESTAMP())",
+ array(
+ $subject,
+ addslashes(LOAD_TEMPLATE("task_ext_deactivated", true, $ext)),
+ ), __FILE__, __LINE__, true, false
+ );
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+}
+
//
?>
// Version history array (add more with , "0.1" and so on)
$EXT_VER_HISTORY = array("0.0");
-/*
-print "<pre>";
-debug_print_backtrace();
-print "<pre>";
-*/
+// This extension is deprecated!
+$EXT_DEPRECATED = "Y";
switch ($EXT_LOAD_MODE)
{
define('ADMIN_TASK_TYPE', "Aufgabenbereich");
define('ADMIN_TASK_CREATED', "Task erstellt");
define('ADMIN_NO_ADMIN_ASSIGNED', "Kein Admin-Login zugewiesen!");
-define('ADMIN_TASK_IS_MEMBER_SUPPORT', "Support-Anfrage eines Mitgliedes");
define('ADMIN_UNKNOWN_TASK_TYPE_1', "Unbekannter Task-Typ <strong>");
define('ADMIN_UNKNOWN_TASK_TYPE_2', "</strong> im Task <strong>");
define('ADMIN_UNKNOWN_TASK_TYPE_3', "</strong> erkannt!");
);
//
define('ADMIN_IS_SYSTEM_TASK', "System-Task");
-define('ADMIN_TASK_IS_EXTENSION', "Erweiterung-Management");
define('ADMIN_NEW_EXT_SUBJ', "Neue Erweiterung gefunden");
define('ADMIN_TASK_SUBJECT', "Aufgabenbetreff");
define('ADMIN_TASK_TEXT', "Aufgabentext");
define('ADMIN_REG_FAILED_404', "Registrierung fehlgeschlagen: Erweiterung nicht auffindbar!");
define('ADMIN_REG_FAILED_ASSIGED', "Registrierung fehlgeschlagen: Sie sind nicht zugewiesen oder Task ist veraltet!");
define('ADMIN_REG_FAILED_ALREADY', "Registrierung fehlgeschlagen: Erweiterun bereits installiert.");
+define('ADMIN_REG_FAILED_DEPRECATED', "Registrierung fehlgeschlagen: Erweiterung ist veraltet.");
define('ADMIN_NO_EXTENSION_REGISTERED', "Derzeit haben Sie keine Erweiterung in Ihrem {!MT_WORD!} registriert.");
define('ADMIN_EXTENSION_REGISTERED', "Erweiterung wurde in Ihrem {!MT_WORD!} registriert.");
define('ADMIN_EXT_ALREADY_REGISTERED', "Erweiterung bereits registriert!");
define('ADMIN_EXT_ALREADY_INSTALLED_2', "</U></strong> gefundenen Erweiterungen sind bereits installiert!");
define('ADMIN_EXT_NOTHING_FOUND', "Keine Erweiterungen auf dem Server gefunden!");
define('ADMIN_EXT_VERSION', "Version");
-define('ADMIN_TASK_IS_EXTENSION_UPDATE', "Erweiterung-Update");
define('ADMIN_EXTENSION_UPDATED', "Erweiterung aktualisiert!");
define('ADMIN_UPDATE_EXT_SUBJ', "Erweiterung-Update installiert");
define('MEMBER_ORDER_PAGE1_INTRO', "Mailbuchung - Schritt 1 von 4: PLZ eingeben");
define('EXTENSION', "Erweiterung");
define('MOD_REWRITE_ERROR', "Sie müssen mod_rewrite in Apache aktiviert haben um die Erweiterung rewrite nutzen zu können.");
define('ADMIN_BUILD_STATUS_HANDLER', "Status-Handler");
+define('TASK_SUBJ_EXTENSION_DEACTIVATED', "Erweiterung deaktiviert");
+define('ADMIN_SUBJECT_EXTENSION_DEACTIVATED', "Automatische Deaktivierung einer Erweiterung");
define('MEMBER_MAIL_BONUS_CONFIRMED_ON', "Sie haben diese Bonusmail <span class=\"data\">%s</span> bestätigt.");
define('MEMBER_MAIL_NORMAL_CONFIRMED_ON', "Sie haben diese Klickmail <span class=\"data\">%s</span> bestätigt.");
define('ADMIN_LIST_STATUS_CONFIRMED_ACCOUNTS', "Alle bestätigten Mitglieder-Accounts auflisten");
define('ADMIN_LIST_MODE_NOREFS_ACCOUNTS', "Alle Mitglieder-Accounts ohne Referrals auflisten");
+// Admin task lines
+define('ADMIN_TASK_IS_MEMBER_SUPPORT', "Support-Anfrage eines Mitgliedes");
+define('ADMIN_TASK_IS_EXTENSION', "Erweiterung-Management");
+define('ADMIN_TASK_IS_EXTENSION_UPDATE', "Erweiterung-Update");
+define('ADMIN_TASK_IS_EXTENSION_DEACTIVATION', "Erweiterung-Management");
+
//
?>
// Cache file is damaged so kill it
$cacheInstance->destroyCacheFile();
- // Skip any further execution
+ // Retry it
+ require(__FILE__);
return;
} // END - if
// First check for solved and not assigned tasks and assign them to current admin
$result_task = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
- array(GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
+ array(GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
// We currently don't want to install an extension so let's find out if we need...
$EXT_LOAD_MODE = "register";
} elseif (!EXT_IS_ACTIVE("cache")) {
// Load data from database
$result = SQL_QUERY_ESC("SELECT id, ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
- array($ext), __FILE__, __LINE__);
+ array($ext), __FILE__, __LINE__);
}
// Is the extension not yet installed?
// Generate subject line
$ext_subj = sprintf("[%s:]", $ext);
- // Create a task for newly installed extension
- CREATE_NEW_EXTENSION_TASK(GET_ADMIN_ID(get_session('admin_login')), $ext_subj, $ext);
-
// We maybe want to install an extension so let's test-drive it...
- include(PATH."inc/extensions/".$file);
+ if (LOAD_EXTENSION($ext, $EXT_LOAD_MODE)) {
+ // Create a task for newly installed extension
+ CREATE_NEW_EXTENSION_TASK(GET_ADMIN_ID(get_session('admin_login')), $ext_subj, $ext);
+ } // END - if
} else {
// Maybe we want to update?
if ((empty($cacheArray['extensions']['ext_version'][$ext])) && (SQL_NUMROWS($result) == 1)) {
FROM "._MYSQL_PREFIX."_task_system
WHERE assigned_admin='%s' OR (assigned_admin='0' AND status='NEW')
ORDER BY userid DESC, task_type DESC, subject, task_created DESC",
- array(GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
+ array(GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_tasks) > 0) {
// New jobs found!
$OUT = ""; $SW = 2;
foreach ($_POST['task'] as $id => $sel) {
$result_task = SQL_QUERY_ESC("SELECT id, userid, task_type, subject, text, task_created, status, assigned_admin FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND (assigned_admin='%s' OR (assigned_admin='0' AND status='NEW')) LIMIT 1",
- array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
+ array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_task) == 1) {
// Task is valid...
list($tid, $uid, $type, $subj, $text, $created, $status, $aid) = SQL_FETCHROW($result_task);
if ($aid == "0") {
// Assgin current admin to unassgigned task
$result_assign = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE id=%s LIMIT 1",
- array(GET_ADMIN_ID(get_session('admin_login')), bigintval($tid)), __FILE__, __LINE__);
+ array(GET_ADMIN_ID(get_session('admin_login')), bigintval($tid)), __FILE__, __LINE__);
} // END - if
$ADD = "";
// Set title
$title = ADMIN_SQLS_EXECUTED_ON_REGISTER;
} elseif ($type == "EXTENSION_UPDATE") {
- // Load SQL commands for update (already done!)
+ // Prepare extension name and version
$ext_name = substr($ext_name, 7);
$ext_name = substr($ext_name, 0, strpos($ext_name, "-"));
$test = "[UPDATE-".$ext_name."-";
case "overview": // List all registered extensions
if (GET_EXT_VERSION("sql_patches") >= "0.0.6") {
// Load extension data with CSS informations
- $result = SQL_QUERY("SELECT id, ext_name, ext_active, ext_has_css, ext_version
+ $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version
FROM "._MYSQL_PREFIX."_extensions
".$where."
ORDER BY ext_name", __FILE__, __LINE__);
} else {
// Load extension data without CSS informations
- $result = SQL_QUERY("SELECT id, ext_name, ext_active, id, ext_version
+ $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, id, ext_version
FROM "._MYSQL_PREFIX."_extensions
".$where."
ORDER BY ext_name", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Extensions are registered
$SW = 2; $OUT = "";
- while (list($id, $name, $lang, $active, $css, $ver) = SQL_FETCHROW($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
$CSS = "---";
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $CSS = TRANSLATE_YESNO($css);
+ if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $CSS = TRANSLATE_YESNO($content['ext_css']);
// Prepare data for the row template
$content = array(
'sw' => $SW,
- 'id' => $id,
- 'name' => $name,
- 'active' => TRANSLATE_YESNO($active),
- 'act_val' => $active,
- 'lang' => $lang,
+ 'id' => $content['ext_id'],
+ 'name' => $content['ext_name'],
+ 'active' => TRANSLATE_YESNO($content['ext_active']),
+ 'act_val' => $content['ext_active'],
'css' => $CSS,
- 'ver' => $ver,
+ 'ver' => $content['ext_version'],
);
// Load row template and switch color
case "register": // Register new extension
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND task_type='EXTENSION' LIMIT 1",
- array(bigintval(GET_ADMIN_ID(get_session('admin_login')))), __FILE__, __LINE__);
+ array(bigintval(GET_ADMIN_ID(get_session('admin_login')))), __FILE__, __LINE__);
$task_found = SQL_NUMROWS($result);
// Free result
if (($id > 0) && ($task_found == 1)) {
// 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($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($subj) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Extract extension's name from subject...
$ext_name = trim(substr($subj, 1, strpos($subj, ":") - 1));
- // ... so we can finally register and load it in registration mode
- $status = EXTENSION_REGISTER($ext_name, $id);
- if ($status == true) {
- // Extension was found and successfully registered
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_EXTENSION_REGISTERED);
-
- // Do we need to update cache file?
- if ((EXT_IS_ACTIVE("cache")) && ($cacheMode != "no")) {
- // Remove cache file (will be auto-created again!)
- if ($cacheInstance->loadCacheFile("config")) $cacheInstance->destroyCacheFile();
- if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
- if ($cacheInstance->loadCacheFile("mod_reg")) $cacheInstance->destroyCacheFile();
- } // END - if
- } elseif (GET_EXT_VERSION($ext_name) != "") {
- // Motify the admin that we have a problem here...
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_ALREADY);
+ // Test the extension for deprecation
+ $EXT_DEPRECATED = "N"; $EXT_LOAD_MODE = "";
+ include(PATH."inc/extensions/ext-".$ext_name.".php");
+
+ // Is the extension deprecated?
+ if ($EXT_DEPRECATED == "N") {
+ // ... so we can finally register and load it in registration mode
+ $status = EXTENSION_REGISTER($ext_name, $id);
+ if ($status == true) {
+ // Extension was found and successfully registered
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_EXTENSION_REGISTERED);
+
+ // Do we need to update cache file?
+ if ((EXT_IS_ACTIVE("cache")) && ($cacheMode != "no")) {
+ // Remove cache file (will be auto-created again!)
+ if ($cacheInstance->loadCacheFile("config")) $cacheInstance->destroyCacheFile();
+ if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
+ if ($cacheInstance->loadCacheFile("mod_reg")) $cacheInstance->destroyCacheFile();
+ } // END - if
+ } elseif (GET_EXT_VERSION($ext_name) != "") {
+ // Notify the admin that we have a problem here...
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_ALREADY);
+ } else {
+ // Notify the admin that we have a problem here...
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_404);
+ }
} else {
// Motify the admin that we have a problem here...
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_404);
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_DEPRECATED);
}
} else {
// Extension was not found in task management
REBUILD_CACHE("config", "config");
}
-// Creates a new task for updated extension
-function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $subject, $notes) {
- // Check if task is not there
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE subject='%s' LIMIT 1",
- array($subject), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
- // Task not created so it's a brand-new extension which we need to register and create a task for!
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())",
- array($admin_id, $subject, $notes), __FILE__, __LINE__);
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result);
-}
-
-// Creates a new task for newly installed extension
-function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
- // Not installed and do we have created a task for the admin?
- $result = SQL_QUERY_ESC("SELECT `id` FROM `"._MYSQL_PREFIX."_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1",
- array($subject), __FILE__, __LINE__);
- if ((SQL_NUMROWS($result) == 0) && (GET_EXT_VERSION($ext) == "")) {
- // Template file
- $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
- PATH,
- GET_LANGUAGE(),
- $ext
- );
-
- // Load text for task
- if (FILE_READABLE($tpl)) {
- // Load extension's own text template (HTML!)
- $msg = LOAD_TEMPLATE("ext_".$ext, true);
- } else {
- // Load default message
- $msg = LOAD_TEMPLATE("admin_new_ext", "", 0);
- }
-
- // Task not created so it's a brand-new extension which we need to register and create a task for!
- $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
-VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())",
- array(
- $admin_id,
- $subject,
- SQL_ESCAPE($msg),
- ), __FILE__, __LINE__, true, false
- );
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result);
-}
-
// Prepares an SQL statement part for HTML mail and/or holiday depency
function PREPARE_SQL_HTML_HOLIDAY ($mode) {
// Exclude no users by default
--- /dev/null
+{--HELLO_ADMIN--},
+
+es wurde soeben die Erweiterung $content[ext_name] automatisch deaktiviert, da sie als veraltet markiert ist.
+
+Bitte deinstallieren Sie bald diese Erweiterung. Sie wird von mxchange.org nicht mehr unterstützt.
+
+Mit freundlichem Gruss,
+ Ihr {!MAIN_TITLE!} Team
+
+{!URL!}/login.php ({!WEBMASTER!})
-<FORM action="{!URL!}/modules.php?module=admin&what=extensions"
- method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="590"
- align="center" class="admin_table dashed">
+<FORM action="{!URL!}/modules.php?module=admin&what=extensions" method="POST" style="margin-bottom: 0px">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="510" align="center" class="admin_table dashed">
<TR>
- <TD colspan="6" align="center" class="admin_title" height="30"><STRONG>{--ADMIN_REGISTERED_EXTENSIONS--}</STRONG>
+ <TD colspan="5" align="center" class="admin_title" height="30">
+ <STRONG>{--ADMIN_REGISTERED_EXTENSIONS--}</STRONG>
</TD>
</TR>
<TR>
- <TD align="center" class="admin_title bottom2 right2" width="30"><STRONG>{--ID_SELECT--}</STRONG></TD>
- <TD align="center" class="admin_title bottom2 right2" width="240"><STRONG>{--ADMIN_EXT_NAME--}</STRONG></TD>
- <TD align="center" class="admin_title bottom2 right2" width="240"><STRONG>{--ADMIN_EXT_LANG--}</STRONG></TD>
- <TD align="center" class="admin_title bottom2 right2" width="80"><STRONG>{--ADMIN_EXT_CSSFILE--}</STRONG></TD>
- <TD align="center" class="admin_title bottom2 right2" width="80"><STRONG>{--ADMIN_EXT_ACTIVE--}</STRONG></TD>
- <TD align="center" class="admin_title bottom2" width="80"><STRONG>{--ADMIN_EXT_VERSION--}</STRONG></TD>
+ <TD align="center" class="admin_title bottom2 right2" width="40"><STRONG>{--ID_SELECT--}</STRONG></TD>
+ <TD align="center" class="admin_title bottom2 right2" width="200"><STRONG>{--ADMIN_EXT_NAME--}</STRONG></TD>
+ <TD align="center" class="admin_title bottom2 right2" width="90"><STRONG>{--ADMIN_EXT_CSSFILE--}</STRONG></TD>
+ <TD align="center" class="admin_title bottom2 right2" width="90"><STRONG>{--ADMIN_EXT_ACTIVE--}</STRONG></TD>
+ <TD align="center" class="admin_title bottom2" width="90"><STRONG>{--ADMIN_EXT_VERSION--}</STRONG></TD>
</TR>
{!__EXT_ROWS!}
<TR>
- <TD colspan="6" class="admin_footer"><INPUT
- type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
- <INPUT type="submit" name="change" class="admin_submit"
- value="{--ADMIN_DE_ACTIVATE--}" /> <INPUT type="submit"
- name="edit" class="admin_submit" value="{--ADMIN_EDIT--}" />
- <INPUT type="submit" name="delete" class="admin_delete"
- value="{--ADMIN_DELETE_ENTRIES--}" /></TD>
+ <TD colspan="5" class="admin_footer">
+ <INPUT type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+ <INPUT type="submit" name="change" class="admin_submit" value="{--ADMIN_DE_ACTIVATE--}" />
+ <INPUT type="submit" name="edit" class="admin_submit" value="{--ADMIN_EDIT--}" />
+ <INPUT type="submit" name="delete" class="admin_delete" value="{--ADMIN_DELETE_ENTRIES--}" />
+ </TD>
</TR>
</TABLE>
</FORM>
<TD class="switch_sw$content[sw] bottom2 right2">
$content[name]
</TD>
- <TD class="switch_sw$content[sw] bottom2 right2">
- $content[lang]
- </TD>
<TD class="switch_sw$content[sw] bottom2 right2" align="center">
$content[css]
</TD>
--- /dev/null
+Deny from all\r
--- /dev/null
+Es wurde die Erweiterung <strong>$content</strong> in Ihrem {!MT_WORD!}
+automatisch deaktiviert, da sie veraltet ist und bald von mxchange.org nicht
+mehr unterstützt wird. Bitte schauen Sie in <a
+ href="" title="Direktlink zu den Forenankündigungen" target="_blank">den
+Forenankündigungen</a> nach, ob bereits ein Eintrag zu der deaktivierten
+Erweiterung existiert. Dort sollte immer eine Ersatzerweiterung angegeben sein.