Commit c05d8be4 authored by fettesvieh's avatar fettesvieh

Merged the recent changes from the trunk - Beta 9 is near

parent e088d9fc
......@@ -36,6 +36,6 @@
{/foreach}
{else}
<div class="error">
<h4>{lang values="common|no_entries"}</h5>
<h5>{lang values="common|no_entries"}</h5>
</div>
{/if}
\ No newline at end of file
......@@ -39,7 +39,7 @@ include SMARTY_DIR . 'Smarty.class.php';
$tpl = new smarty;
$tpl->template_dir = './designs/' . CONFIG_DESIGN . '/';
$tpl->compile_dir = './cache/';
$tpl->compile_check = false;
//$tpl->compile_check = false;
// Einige Konstanten definieren
define('PHP_SELF', htmlentities($_SERVER['PHP_SELF']));
......
......@@ -74,10 +74,26 @@ function select_entry($name, $value, $field_value = '', $attr = 'selected') {
// Konfigurationsdateien für die Module erstellen
function write_config($module, $data)
{
$path = '../modules/' . $module . '/config.php';
$path = '../modules/' . $module . '/module.xml';
if (!preg_match('=/=', $module) && is_file($path)) {
$content = '<?php' . "\n" . '$settings = ' . var_export($data, true) . ';' . "\n" . '?>';
$bool = @file_put_contents($path, $content);
$xml = DOMDocument::load($path);
$xp = new domxpath($xml);
$items = $xp->query('settings/*');
$i = $items->length - 1;
while ($i > -1) {
$item = $items->item($i);
if (array_key_exists($item->nodeName, $data)) {
$newitem = $xml->createElement($item->nodeName);
$newitem_content = $xml->createCDATASection($data[$item->nodeName]);
$newitem->appendChild($newitem_content);
$item->parentNode->replaceChild($newitem, $item);
}
$i--;
}
$bool = $xml->save($path);
return $bool ? true : false;
}
return false;
......
......@@ -16,9 +16,9 @@ include 'functions.php';
define('SMARTY_DIR', '../includes/smarty/');
include SMARTY_DIR . 'Smarty.class.php';
$tpl = new smarty;
$tpl->template_dir = 'design/';
$tpl->template_dir = '../installation/design/';
$tpl->compile_dir = '../cache/';
$tpl->compile_check = false;
//$tpl->compile_check = false;
define('PHP_SELF', $_SERVER['PHP_SELF']);
$tpl->assign('php_self', PHP_SELF);
......
......@@ -62,7 +62,7 @@ if (isset($errors)) {
$form['meta_description'] = mask($form['meta_description']);
$form['meta_keywords'] = '';
$form['title'] = mask($form['title']);
$form['version'] = '4.0b9 SVN';
$form['version'] = '4.0b9';
ksort($form);
// Modulkonfigurationsdateien schreiben
......
......@@ -36,6 +36,6 @@ INSERT INTO `{pre}access` VALUES ('2', 'Besucher', 'users:1,feeds:1,files:1,emot
INSERT INTO `{pre}access` VALUES ('3', 'Benutzer', 'users:1,feeds:1,files:1,emoticons:1,errors:1,gallery:1,guestbook:1,categories:1,comments:1,contact:1,pages:1,news:1,newsletter:1,search:1,system:0,polls:1,access:0');
INSERT INTO `{pre}categories` VALUES ('', 'Erste Kategorie', 'Dies ist die erste Kategorie', 'news');
INSERT INTO `{pre}categories` VALUES ('', 'Erste Kategorie', '', 'Dies ist die erste Kategorie', 'news');
INSERT INTO `{pre}emoticons` VALUES ('', ':D', 'Very Happy', '1.gif'), ('', ':)', 'Smile', '2.gif'), ('', ':(', 'Sad', '3.gif'), ('', ':o', 'Surprised', '4.gif'), ('', ':shocked:', 'Shocked', '5.gif'), ('', ':?', 'Confused', '6.gif'), ('', ':8)', 'Cool', '7.gif'), ('', ':lol:', 'Laughing', '8.gif'), ('', ':x', 'Mad', '9.gif'), ('', ':P', 'Razz', '10.gif'), ('', ':oops:', 'Embarassed', '11.gif'), ('', ':cry:', 'Crying', '12.gif'), ('', ':evil:', 'Evil', '13.gif'), ('', ':twisted:', 'Twisted Evil', '14.gif'), ('', ':roll:', 'Rolling Eyes', '15.gif'), ('', ':wink:', 'Wink', '16.gif'), ('', ':!:', 'Exclamation', '17.gif'), ('', ':?:', 'Question', '18.gif'), ('', ':idea:', 'Idea', '19.gif'), ('', ':arrow:', 'Arrow', '20.gif'), ('', ':|', 'Neutral', '21.gif'), ('', ':mrgreen:', 'Mr. Green', '22.gif');
\ No newline at end of file
......@@ -20,8 +20,6 @@ $tpl->assign('requirements', $requirements);
$defaults = array(
'includes/config.php',
'modules/contact/config.php',
'modules/newsletter/config.php',
'modules/access/module.xml',
'modules/categories/module.xml',
'modules/comments/module.xml',
......@@ -40,6 +38,7 @@ $defaults = array(
'modules/system/module.xml',
'modules/users/module.xml',
'cache/',
'uploads/categories/',
'uploads/emoticons/',
'uploads/files/',
'uploads/gallery/',
......
......@@ -44,7 +44,7 @@ if (is_writable($path)) {
// Konfigurationsdatei in ein Array schreiben
$config = file($path);
$entries_to_change = array(
'define(\'CONFIG_VERSION\', \'' . CONFIG_VERSION . '\');' => 'define(\'CONFIG_VERSION\', \'4.0b9 SVN\');',
'define(\'CONFIG_VERSION\', \'' . CONFIG_VERSION . '\');' => 'define(\'CONFIG_VERSION\', \'4.0b9\');',
);
foreach ($config as $c_key => $c_value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment