// Version history array (add more with , '0.1.0' and so on)
setExtensionVersionHistory(array('0.0'));
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
// Init imprint data
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_imprint_data` (`imprint_key`) VALUES ('company'),('surname'),('family'),('street_nr1'),('street_nr2'),('zip'),('city'),('state'),('country'),('phone'),('fax'),('email'),('footer')");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_imprint_data` SET `imprint_value`='{?WEBMASTER?}' WHERE `imprint_key`='email' LIMIT 1");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_imprint_data` SET `imprint_value`='{OPEN_CONFIG}WEBMASTER{CLOSE_CONFIG}' WHERE `imprint_key`='email' LIMIT 1");
break;
case 'remove': // Do stuff when removing extension
} // END - if
// Fix HTML parameter (default is no!)
- if (empty($isHtml)) $isHtml = 'N';
+ if (empty($isHtml)) {
+ $isHtml = 'N';
+ } // END - if
// Debug mode enabled?
if (isDebugModeEnabled()) {
rebuildCache('modules', 'modules');
} elseif ($found === false) {
// Problem with module detected
- logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s,locked=%d,hidden=%d,mem=%d,admin=%d,output_mode=%s",
+ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. getModuleStatus()=%s,locked=%d,hidden=%d,mem=%d,admin=%d,output_mode=%s",
$module_chk,
getModuleStatus($module_chk),
intval(isModuleLocked($module_chk)),
// Listing of SQLs enabled?
if (isVerboseSqlEnabled()) {
// Load SQL commands in remove mode
- if (loadExtension($ext_name, 'remove', '', true)) {
+ if (loadExtension($ext_name, 'remove', '0.0', true)) {
// Generate extra table with loaded SQL commands
$VERBOSE_OUT = addExtensionVerboseSqlTable();
} // END - if
// Getter for HTTP status
function getHttpStatus () {
+ // Is the status set?
+ if (!isset($GLOBALS['http_status'])) {
+ // Abort here
+ debug_report_bug(__FUNCTION__, __LINE__, 'No HTTP status set!');
+ } // END - if
+
+ // Return it
return $GLOBALS['http_status'];
}
// Load the required file(s)
require('inc/config-global.php');
-// Set content type
+// Set content type and HTTP status
setContentType('text/html');
+setHttpStatus('404 NOT FOUND');
// Is the extension active?
redirectOnUninstalledExtension('mailid');
} // END - if
if (($time > 0) && (($payment > 0) || ($points > 0))) {
+ // Set HTTP status to okay
+ setHttpStatus('200 OK');
+
// Export data into constants for the template
$content = array(
'userid' => $userId,
// Load the required file(s)
require('inc/config-global.php');
-// Set content type
+// Set content type and HTTP status
setContentType('text/html');
+setHttpStatus('404 NOT FOUND');
// Is the extension mailid active?
redirectOnUninstalledExtension('mailid');
// Right code entered?
if (bigintval(postRequestParameter('gfx_check')) == $img_code) {
+ // Set HTTP status to okay
+ setHttpStatus('200 OK');
+
// Add points over referal system is the default
$template = 'mailid_points_done';
case 'locked':
// Set HTTP status
- setHttpStatus('403');
+ setHttpStatus('403 FORBIDDEN');
if (!isIncludeReadable($GLOBALS['module_inc'])) {
- // Set HTTP status
- setHttpStatus('404');
+ // Set HTTP status again
+ setHttpStatus('404 NOT FOUND');
// Module does addionally not exists
addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MODULE_REGISTRY_404', getModule()));