diff --git a/bl-kernel/admin/views/settings.php b/bl-kernel/admin/views/settings.php
index 38050bf9..ccf40219 100644
--- a/bl-kernel/admin/views/settings.php
+++ b/bl-kernel/admin/views/settings.php
@@ -35,6 +35,12 @@
'name'=>'homepage',
'value'=>$site->homepage()
));
+
+ // Page not found
+ echo Bootstrap::formInputHidden(array(
+ 'name'=>'pageNotFound',
+ 'value'=>$site->pageNotFound()
+ ));
?>
@@ -113,7 +119,6 @@
} catch (Exception $e) {
$homeValue = '';
}
-
echo Bootstrap::formInputText(array(
'name'=>'homepageTMP',
'label'=>$L->g('Homepage'),
@@ -123,13 +128,20 @@
'tip'=>$L->g('Returning page for the main page')
));
- $homepageOptions[' '] = '- '.$L->g('Default message').' -';
- echo Bootstrap::formSelect(array(
- 'name'=>'pageNotFound',
+ // Page not found 404
+ try {
+ $pageNotFoundKey = $site->pageNotFound();
+ $pageNotFound = new Page($pageNotFoundKey);
+ $pageNotFoundValue = $pageNotFound->title();
+ } catch (Exception $e) {
+ $pageNotFoundValue = '';
+ }
+ echo Bootstrap::formInputText(array(
+ 'name'=>'pageNotFoundTMP',
'label'=>$L->g('Page not found'),
- 'options'=>$homepageOptions,
- 'selected'=>$site->pageNotFound(),
+ 'value'=>$pageNotFoundValue,
'class'=>'',
+ 'placeholder'=>$L->g('Start typing a page title to see a list of suggestions.'),
'tip'=>$L->g('Returning page when the page doesnt exist')
));
@@ -268,7 +280,7 @@
@@ -498,3 +537,9 @@
+
+
diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php
index 9cc56fcb..2f2518f0 100644
--- a/bl-kernel/functions.php
+++ b/bl-kernel/functions.php
@@ -795,19 +795,10 @@ function activateTheme($themeDirectory) {
global $site;
global $syslog;
global $L, $language;
- global $blocks;
if (Sanitize::pathFile(PATH_THEMES.$themeDirectory)) {
$site->set(array('theme'=>$themeDirectory));
- // Remove all blocks
- $blocks->truncate();
-
- // Include Blocks for the theme
- if (Sanitize::pathFile(PATH_THEMES.$themeDirectory.DS.'blocks.php')) {
- include(PATH_THEMES.$themeDirectory.DS.'blocks.php');
- }
-
$syslog->add(array(
'dictionaryKey'=>'new-theme-configured',
'notes'=>$themeDirectory
@@ -818,7 +809,3 @@ function activateTheme($themeDirectory) {
}
return false;
}
-
-function deleteAllBlocks() {
- global $blocks;
-}
\ No newline at end of file