Permalink
Browse files

build 952: moved website settings from page setup to website settings…

… :) sounds strange i know....

Signed-off-by: Fabian Vogelsteller <fabian@frozeman.de>
  • Loading branch information...
frozeman committed Jul 2, 2012
1 parent e95519d commit 4ebd0f3e03b9dbc3ed05646ea203a5f158c35d70
Showing with 1,678 additions and 1,577 deletions.
  1. +2 −1 CHANGELOG
  2. +1 −1 VERSION
  3. +1 −1 feindura.include.php
  4. +7 −7 index.php
  5. +12 −12 library/classes/Feindura.class.php
  6. +5 −5 library/classes/FeinduraBase.class.php
  7. +606 −566 library/classes/GeneralFunctions.class.php
  8. +162 −162 library/classes/Search.class.php
  9. +1 −1 library/classes/StatisticFunctions.class.php
  10. +32 −32 library/controllers/adminSetup.controller.php
  11. +25 −25 library/controllers/backup.controller.php
  12. +21 −21 library/controllers/editor.controller.php
  13. +12 −12 library/controllers/feinduraWebmasterApp-0.3.controller.php
  14. +2 −2 library/controllers/filemanager.controller.php
  15. +10 −10 library/controllers/frontendEditing.controller.php
  16. +3 −162 library/controllers/pageSetup.controller.php
  17. +3 −3 library/controllers/saveEditFiles.controller.php
  18. +15 −12 library/controllers/sortPages.controller.php
  19. +18 −18 library/controllers/statisticSetup.controller.php
  20. +43 −40 library/controllers/thumbnailUpload.controller.php
  21. +19 −19 library/controllers/userSetup.controller.php
  22. +181 −22 library/controllers/websiteSetup.controller.php
  23. +31 −29 library/functions/backend.functions.php
  24. +5 −5 library/includes/backend.include.php
  25. +89 −88 library/javascripts/content.js
  26. +16 −12 library/languages/de.backend.php
  27. +17 −13 library/languages/en.backend.php
  28. +14 −11 library/languages/fr.backend.php
  29. +14 −11 library/languages/it.backend.php
  30. +14 −11 library/languages/ru.backend.php
  31. +22 −16 library/rightSidebar.loader.php
  32. +1 −1 library/styles/layout.css
  33. +54 −54 library/views/adminSetup.php
  34. +7 −4 library/views/editor.php
  35. +12 −9 library/views/listPages.php
  36. +0 −82 library/views/pageSetup.php
  37. +35 −35 library/views/search.php
  38. +122 −34 library/views/websiteSetup.php
  39. +1 −1 library/views/windowBox/addPageLanguage.php
  40. +10 −10 library/views/windowBox/deletePageLanguage.php
  41. +14 −11 library/views/windowBox/deleteWebsiteLanguages.php
  42. +19 −6 update.php
View
@@ -1,7 +1,7 @@
feindura - Flat File Content Management System
Version
2.0
-Build 951
+Build 952
==================================================
Copyright (C) Fabian Vogelsteller [frozeman.de]
published under the GNU General Public License version 3
@@ -24,6 +24,7 @@ ChangeLog:
2.0
+ build 952: moved website settings from page setup to website settings :) sounds strange i know....
build 951: add deactivate website (shows a "under construction" text)
build 950: add modified and revised meta tag
build 949: check pageMetaArray Dat if page a was moved or otherwiese changed
View
@@ -1,3 +1,3 @@
This file is necessary for the next feindura update. Do not delete it!
2.0
-951
+952
View
@@ -42,7 +42,7 @@
// -> SEND FRONTEND HEADER
header('Content-Type:text/html; charset=UTF-8');
-if($adminConfig['multiLanguageWebsite']['active'] && strlen($_SESSION['feinduraSession']['websiteLanguage']) === 2)
+if($websiteConfig['multiLanguageWebsite']['active'] && strlen($_SESSION['feinduraSession']['websiteLanguage']) === 2)
header('Content-Language:'.$_SESSION['feinduraSession']['websiteLanguage']);
// -> rename the config var names
View
@@ -416,24 +416,24 @@
// ->> RE-SET CURRENT WEBSITE LANGUAGE based on the pages languages
- if($adminConfig['multiLanguageWebsite']['active']) {
+ if($websiteConfig['multiLanguageWebsite']['active']) {
// -> use the languages of the page
- $currentlanguageSlection = (isset($pageContent['localized'])) ? array_keys($pageContent['localized']) : $adminConfig['multiLanguageWebsite']['languages'];
+ $currentlanguageSlection = (isset($pageContent['localized'])) ? array_keys($pageContent['localized']) : $websiteConfig['multiLanguageWebsite']['languages'];
// -> add new language to the page languages selection, if $_GET['status'] = "addLanguage"
if($_GET['status'] == 'addLanguage')
- $currentlanguageSlection = array_unique(array_merge($adminConfig['multiLanguageWebsite']['languages'],array_keys($pageContent['localized'])));
+ $currentlanguageSlection = array_unique(array_merge($websiteConfig['multiLanguageWebsite']['languages'],array_keys($pageContent['localized'])));
$_SESSION['feinduraSession']['websiteLanguage'] = (in_array($_SESSION['feinduraSession']['websiteLanguage'], $currentlanguageSlection)) ? $_SESSION['feinduraSession']['websiteLanguage']: current($currentlanguageSlection);
// if NEW PAGE, overwrite with the mainLanguage
if($newPage)
- $currentlanguageSlection = $adminConfig['multiLanguageWebsite']['languages'];
+ $currentlanguageSlection = $websiteConfig['multiLanguageWebsite']['languages'];
// find out if there are missing languages
if($isInPageEditor) {
$missingLanguages = false;
- foreach ($adminConfig['multiLanguageWebsite']['languages'] as $langCode) {
+ foreach ($websiteConfig['multiLanguageWebsite']['languages'] as $langCode) {
if(!isset($pageContent['localized'][$langCode]))
$missingLanguages[] = $langCode;
}
@@ -517,7 +517,7 @@
}
// WEBSITE LANGUAGE BUTTONS and SELECTION
- if($adminConfig['multiLanguageWebsite']['active']) {
+ if($websiteConfig['multiLanguageWebsite']['active']) {
// ADD PAGE LANGUAGE
if($isInPageEditor) {
@@ -537,7 +537,7 @@
}
// PAGE LANGUAGE SELECTION with
- if(!empty($adminConfig['multiLanguageWebsite']['languages']) && (empty($pageContent) || !empty($pageContent['localized']))) {
+ if(!empty($websiteConfig['multiLanguageWebsite']['languages']) && (empty($pageContent) || !empty($pageContent['localized']))) {
?>
<li class="spacer">&nbsp;</li>
<li>
@@ -818,16 +818,16 @@ public function __construct($language = false) {
$this->language = $_SESSION['feinduraSession']['websiteLanguage'];
// -> last get BROWSER LANGUAGE
} else
- $this->language = GeneralFunctions::getBrowserLanguages($this->adminConfig['multiLanguageWebsite']['mainLanguage']);
+ $this->language = GeneralFunctions::getBrowserLanguages($this->websiteConfig['multiLanguageWebsite']['mainLanguage']);
// ->> CHECK LANGUAGE
// MULTILANGUAGE WEBSITE -> make sure the language exist
- if($this->adminConfig['multiLanguageWebsite']['active'] && is_array($this->adminConfig['multiLanguageWebsite']['languages']) && in_array($this->language, $this->adminConfig['multiLanguageWebsite']['languages']))
+ if($this->websiteConfig['multiLanguageWebsite']['active'] && is_array($this->websiteConfig['multiLanguageWebsite']['languages']) && in_array($this->language, $this->websiteConfig['multiLanguageWebsite']['languages']))
$this->language = $this->language;
// MULTILANGUAGE WEBSITE -> if not use the MAIN LANGUAGE
- elseif($this->adminConfig['multiLanguageWebsite']['active'])
- $this->language = $this->adminConfig['multiLanguageWebsite']['mainLanguage'];
+ elseif($this->websiteConfig['multiLanguageWebsite']['active'])
+ $this->language = $this->websiteConfig['multiLanguageWebsite']['mainLanguage'];
// SINGLE LANGUAGE -> LOGGED IN use the backend language
elseif($this->loggedIn && !empty($_SESSION['feinduraSession']['backendLanguage']))
$this->language = $_SESSION['feinduraSession']['backendLanguage'];
@@ -1175,7 +1175,7 @@ public function createMetaTags($charset = 'UTF-8', $author = false, $publisher =
// -> CHECK if website is currently under MAINTENANCE, if so show ERROR
- if($this->adminConfig['maintenance'] && !$this->loggedIn) {
+ if($this->websiteConfig['maintenance'] && !$this->loggedIn) {
die($metaTags.' <link rel="stylesheet" type="text/css" href="'.GeneralFunctions::Path2URI($this->adminConfig['basePath']).'library/styles/frontendEditing.css"'.$tagEnding."\n".'</head><body class="feindura_maintenanceWarning"><div class="feindura_box">'.$this->languageFile['INFO_MAINTENACE'].'<div class="feindura_footer">'.$this->metaData['title'].'<br>&copy; '.date('Y').' '.$this->metaData['copyright'].'</div></div></body></html>');
}
@@ -1186,8 +1186,8 @@ public function createMetaTags($charset = 'UTF-8', $author = false, $publisher =
if($category['public'] && $category['feeds']) {
// get languages
- if($this->adminConfig['multiLanguageWebsite']['active'])
- $feedLanguages = $this->adminConfig['multiLanguageWebsite']['languages'];
+ if($this->websiteConfig['multiLanguageWebsite']['active'])
+ $feedLanguages = $this->websiteConfig['multiLanguageWebsite']['languages'];
else
$feedLanguages = array(0 => 0);
@@ -1291,7 +1291,7 @@ public function createMetaTags($charset = 'UTF-8', $author = false, $publisher =
TOPBAR_TIP_DEACTIVATEFRONTENDEDITING: \"".$this->languageFile['TOPBAR_TIP_DEACTIVATEFRONTENDEDITING']."\"
};
var feindura_logoutUrl = '".GeneralFunctions::getCurrentUrl('feinduraLogout')."';
- var feindura_setStartPage = '".$this->adminConfig['setStartPage']."';
+ var feindura_setStartPage = '".$this->websiteConfig['setStartPage']."';
var feindura_startPage = '".$this->startPage."';
var feindura_xHtml = '".$this->xHtml."';
/* ]]> */
@@ -2314,12 +2314,12 @@ public function createSubMenuFromCategory($categoryId = false, $menuTag = false,
public function createLanguageMenu($menuTag = false, $linkText = true, $breakAfter = false) {
// quit if multilanguage website is deactivated
- if(!$this->adminConfig['multiLanguageWebsite']['active'])
+ if(!$this->websiteConfig['multiLanguageWebsite']['active'])
return array();
// -> STOREs the LINKs in an Array
$links = array();
- if(!empty($this->adminConfig['multiLanguageWebsite']['languages'])) {
+ if(!empty($this->websiteConfig['multiLanguageWebsite']['languages'])) {
// -> store original values
$orgLinkShowThumbnail = $this->linkShowThumbnail;
$orgLanguage = $this->language;
@@ -2329,7 +2329,7 @@ public function createLanguageMenu($menuTag = false, $linkText = true, $breakAft
$this->linkShowThumbnail = false;
// create a link out of every language in the array
- foreach($this->adminConfig['multiLanguageWebsite']['languages'] as $langCode) {
+ foreach($this->websiteConfig['multiLanguageWebsite']['languages'] as $langCode) {
// set language name as link text
if($linkText === true)
@@ -2458,7 +2458,7 @@ public function createBreadCrumbsMenu($id = false, $separator = ' > ', $menuTag
if(($pageContent = GeneralFunctions::readPage($ids[0],$ids[1])) !== false) {
// start page
- if($this->adminConfig['setStartPage'] && !empty($this->websiteConfig['startPage']) && $this->websiteConfig['startPage'] != $pageContent['id'] && ($startPage = GeneralFunctions::readPage($this->websiteConfig['startPage'],GeneralFunctions::getPageCategory($this->websiteConfig['startPage'])))) {
+ if($this->websiteConfig['setStartPage'] && !empty($this->websiteConfig['startPage']) && $this->websiteConfig['startPage'] != $pageContent['id'] && ($startPage = GeneralFunctions::readPage($this->websiteConfig['startPage'],GeneralFunctions::getPageCategory($this->websiteConfig['startPage'])))) {
$link['link'] = $this->createLink($startPage).$separator;
$link['href'] = $this->createHref($startPage);
$link['id'] = $startPage['id'];
@@ -367,7 +367,7 @@ public function getCurrentCategoryId() {
}
}
}
- } elseif(empty($_GET['page']) && $this->adminConfig['setStartPage'] && is_numeric($this->startCategory)) {
+ } elseif(empty($_GET['page']) && $this->websiteConfig['setStartPage'] && is_numeric($this->startCategory)) {
return $this->startCategory;
} else
return false;
@@ -414,7 +414,7 @@ public function getCategoryId() {
protected function setCurrentPageId($setStartPage = false) {
// sets the startPage if it exists
- if($setStartPage === true && $this->adminConfig['setStartPage'] && !empty($this->websiteConfig['startPage'])) { //empty($this->category)
+ if($setStartPage === true && $this->websiteConfig['setStartPage'] && !empty($this->websiteConfig['startPage'])) { //empty($this->category)
$this->startPage = intval($this->websiteConfig['startPage']);
}
@@ -462,7 +462,7 @@ protected function setPageId($setStartPage = false) {
protected function setCurrentCategoryId($setStartCategory = false) {
// sets the startPage if it exists
- if($setStartCategory === true && $this->adminConfig['setStartPage'] && !empty($this->websiteConfig['startPage'])) {
+ if($setStartCategory === true && $this->websiteConfig['setStartPage'] && !empty($this->websiteConfig['startPage'])) {
$this->startCategory = GeneralFunctions::getPageCategory($this->websiteConfig['startPage']);
}
@@ -986,7 +986,7 @@ protected function generatePage($page, $showErrors = true, $shortenText = false,
// ->> MODIFING pageContent
// ************************
- if($this->adminConfig['multiLanguageWebsite']['active'])
+ if($this->websiteConfig['multiLanguageWebsite']['active'])
$langCode = $this->language;
else
$langCode = 0;
@@ -1168,7 +1168,7 @@ protected function createTitle($pageContent, $titleLength = false, $titleAsLink
// ACTIVATE FRONTEND EDITING
if($allowFrontendEditing && !$GLOBALS['ISSNIPPET'] && !$titleAsLink && $this->loggedIn && $this->adminConfig['user']['frontendEditing'] && PHP_VERSION >= REQUIREDPHPVERSION) {// data-feindura="pageID categoryID language"
- if($this->adminConfig['multiLanguageWebsite']['active'])
+ if($this->websiteConfig['multiLanguageWebsite']['active'])
$langCode = $this->language;
else
$langCode = 0;
Oops, something went wrong.

0 comments on commit 4ebd0f3

Please sign in to comment.