./inc/extensions/ext-yoomedia.php:56:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
./inc/extensions-functions.php:143: // @TODO Do we still need this? setExtensionUpdateNotes('');
./inc/extensions-functions.php:424:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
-./inc/extensions-functions.php:540: // @TODO Extension is loaded, what next?
+./inc/extensions-functions.php:548: // @TODO Extension is loaded, what next?
./inc/functions.php:115: // @TODO Extension 'msg' does not exist
./inc/functions.php:1482: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
./inc/functions.php:1505: // @TODO Rewrite this old lost code to a template
// We don't like empty extension names here
if (empty($ext_name)) {
// Please fix them all
- debug_report_bug(__FUNCTION__.': ext_name is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty.');
} // END - if
// By default non is installed
// Check if given extension is active
function isExtensionActive ($ext_name) {
- // Extensions are all inactive during installation
- if ((isInstallationPhase()) || (empty($ext_name))) return false;
+ if (isInstallationPhase()) {
+ // Extensions are all inactive during installation
+ return false;
+ } elseif (empty($ext_name)) {
+ // Empty extension names must befixed
+ debug_report_bug(__FUNCTION__, __LINE__, 'Empty extension name provided.');
+ } elseif (!isExtensionInstalled($ext_name)) {
+ // Not installed extensions are always inactive
+ return false;
+ }
// Not active is the default
$data['ext_active'] = 'N';
// Integrity check
if (!is_array($array)) {
// Not an array!
- debug_report_bug(__FUNCTION__.': No array provided.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'No array provided.');
} // END - if
// Init count
// Sanity check on salt
if (strlen($salt) != getSaltLength()) {
// Not the same!
- debug_report_bug(__FUNCTION__.': salt length mismatch! ('.strlen($salt).'/'.getSaltLength().')');
+ debug_report_bug(__FUNCTION__, __LINE__, 'salt length mismatch! ('.strlen($salt).'/'.getSaltLength().')');
} // END - if
}
// Read a given SQL dump
function readSqlDump ($FQFN) {
- // Sanity-check if file is there (should be there, but just to make it sure)
- if (!isFileReadable($FQFN)) {
- // This should not happen
- debug_report_bug(__FUNCTION__.': File ' . basename($FQFN) . ' is not readable!');
- } // END - if
-
// Load the file
$content = readFromFile($FQFN);
// Sanity-check if file is there (should be there, but just to make it sure)
if (!isFileReadable($FQFN)) {
// This should not happen
- debug_report_bug(__FUNCTION__.': File ' . basename($FQFN) . ' is not readable!');
+ debug_report_bug(__FUNCTION__, __LINE__, 'File ' . basename($FQFN) . ' is not readable!');
} // END - if
// Is it cached?
// Trigger an error on failure
if ((ob_get_length() > 0) && (!ob_end_clean())) {
// Failed!
- debug_report_bug(__FUNCTION__.': Failed to clean output buffer.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Failed to clean output buffer.');
} // END - if
}
// Init user data array
function initUserData () {
// User id should not be zero
- if (getCurrentUserId() < 1) debug_report_bug(__FUNCTION__.': User id is zero.');
+ if (getCurrentUserId() < 1) debug_report_bug(__FUNCTION__, __LINE__, 'User id is zero.');
// Init the user
$GLOBALS['user_data'][getCurrentUserId()] = array();
// Getter for user data
function getUserData ($column) {
// User id should not be zero
- if (getCurrentUserId() < 1) debug_report_bug(__FUNCTION__.': User id is zero.');
+ if (getCurrentUserId() < 1) debug_report_bug(__FUNCTION__, __LINE__, 'User id is zero.');
// Return the value
return $GLOBALS['user_data'][getCurrentUserId()][$column];
$uid = getCurrentUserId();
// User id should not be zero
- if ($uid < 1) debug_report_bug(__FUNCTION__.': User id is zero.');
+ if ($uid < 1) debug_report_bug(__FUNCTION__, __LINE__, 'User id is zero.');
// Get the whole array if found
if (isset($GLOBALS['user_data'][$uid])) {