- if ((count($_CONFIG) > 1) && (is_resource($link)) && (isset($db))) {
- if (($_CONFIG['enable_title_deco'] == 'Y') && (trim(!empty($_CONFIG['title_left'])))) $TITLE .= trim($_CONFIG['title_left'])." ";
- $TITLE .= MAIN_TITLE;
+ // Config and database connection valid?
+ if ((isConfigLoaded()) && (SQL_IS_LINK_UP())) {
+ // Title decoration enabled?
+ if ((getConfig('enable_title_deco') == "Y") && (getConfig('title_left') != "")) $TITLE .= trim(getConfig('title_left'))." ";
+
+ // Do we have some extra title?
+ if (!empty($EXTRA_TITLE)) {
+ // Then prepent it
+ $TITLE .= $EXTRA_TITLE." by ";
+ } // END - if
+
+ // Add main title
+ $TITLE .= constant('MAIN_TITLE');