Project

General

Profile

« Previous | Next » 

Revision 1767

Added by Dietmar about 12 years ago

! change page_extended to extended settings under page language

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
22 Sep-2012 Build 1767 Dietmar Woellbrink (Luisehahne)
17
! change page_extended to extended settings under page language
16 18
22 Sep-2012 Build 1766 Dietmar Woellbrink (Luisehahne)
17 19
! typofix in EN language,
18 20
! empty seo_title will set to menu_title
branches/2.8.x/wb/admin/skel/themes/htt/settings.htt
14 14
		</div>
15 15
		<br />
16 16
	</fieldset>
17
	<fieldset>
17

  
18
	<fieldset class="tab-generell">
18 19
		<legend>{HEADING_GENERAL_SETTINGS}</legend>
19 20
		<div class="mbox sub-row">
20 21
			<label class="setting_name">{TEXT_WEBSITE_TITLE}:</label>
......
69 70
			</span>
70 71
		</div>
71 72
<!-- BEGIN show_checkbox_1_block -->
72

  
73 73
		<div class="mbox sub-row">
74 74
			<label class="setting_name">{TEXT_PAGE_LANGUAGES}:</label>
75 75
			<span>
......
81 81
                <label for="page_languages_false">{TEXT_DISABLED}</label>
82 82
			</span>
83 83
		</div>
84
		<div class="mbox sub-row">
85
	 		<label class="setting_name">{TEXT_PAGE_EXTENDED}:</label>
86
			<span>
87
				<input class="radio" type="radio" name="page_extended" id="page_extended_true" value="true"{PAGE_EXTENDED_ENABLED} />
88
                <label for="page_extended_true">{TEXT_ENABLED}</label>
89
			</span>
90
			<span>
91
				<input class="radio" type="radio" name="page_extended" id="page_extended_false" value="false"{PAGE_EXTENDED_DISABLED} />
92
                <label for="page_extended_false">{TEXT_DISABLED}</label>
93
			</span>
94
		</div>
84 95

  
85 96
		<div class="mbox sub-row">
86 97
			<label class="setting_name">{TEXT_MULTIPLE_MENUS}:</label>
......
93 104
		<label for="multiple_menus_false">{TEXT_DISABLED}</label>
94 105
			</span>
95 106
		</div>
107
<!-- END show_checkbox_1_block -->
96 108

  
97
<!-- END show_checkbox_1_block -->
98 109
		<div class="mbox sub-row">
99 110
		<label class="setting_name">{TEXT_HOME_FOLDERS}:</label>
100 111
			<span>
......
586 597
                <label for="dev_infos_false">{TEXT_DISABLED}</label>
587 598
			</span>
588 599
		</div>
589
		<div class="mbox sub-row">
590
	 		<label class="setting_name">{TEXT_PAGE_EXTENDED}:</label>
591
			<span>
592
				<input class="radio" type="radio" name="page_extended" id="page_extended_true" value="true"{PAGE_EXTENDED_ENABLED} />
593
                <label for="page_extended_true">{TEXT_ENABLED}</label>
594
			</span>
595
			<span>
596
				<input class="radio" type="radio" name="page_extended" id="page_extended_false" value="false"{PAGE_EXTENDED_DISABLED} />
597
                <label for="page_extended_false">{TEXT_DISABLED}</label>
598
			</span>
599
		</div>
600 600

  
601 601
		<div class="mbox sub-row">
602 602
	 		<label class="setting_name">{TEXT_PAGES_DIRECTORY}:</label>
......
605 605
			</div>
606 606
		</div>
607 607

  
608
		<div class="mbox sub-row hide">
609
	 		<label for="rebuild_access_files" class="setting_name">{TEXT_REBUILD_ACCESS_FILES}:</label>
610
			<div class="input" >
611
				<input type="checkbox" name="rebuild_access_files" id="rebuild_access_files" value="true" />
612
                {HELP_REBUILD_ACCESS_FILES}
613
			</div>
614
		</div>
615

  
608 616
		<div class="mbox sub-row">
617
	 		<label class="setting_name">{TEXT_MODULES_DIRECTORY}:</label>
618
			<div class="input" >
619
				<input type="text" name="modules_upgrade_list" value="{MODULES_UPGRADE_LIST}" />
620
			</div>
621
		</div>
622

  
623
		<div class="mbox sub-row">
609 624
	 		<label class="setting_name">{TEXT_PAGE_ICON_DIR}:</label>
610 625
			<div class="input" >
611 626
			<input type="text" id="page_icon_dir" name="page_icon_dir" value="{PAGE_ICON_DIR}" />
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1766');
54
if(!defined('REVISION')) define('REVISION', '1767');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/admin/settings/save.php
24 24
// Print admin header
25 25
require('../../config.php');
26 26
require_once(WB_PATH.'/framework/class.admin.php');
27
require_once(WB_PATH.'/framework/functions.php');
27 28

  
28 29
// suppress to print the header, so no new FTAN will be set
29 30
if($advanced == '')
......
154 155
}
155 156

  
156 157
$allow_tags_in_fields = array('website_header', 'website_footer','website_signature');
157
$allow_empty_values = array('website_header','website_footer','pages_directory','page_spacer','website_signature,page_icon_dir');
158
$allow_empty_values = array('website_header','website_footer','pages_directory','page_spacer','website_signature,page_icon_dir','modules_upgrade_list');
158 159
$disallow_in_fields = array('pages_directory', 'media_directory','wb_version');
159 160

  
161
$bRebuildAccessFiles = ( (isset( $_POST['rebuild_access_files']) && ( $_POST['rebuild_access_files'] == true )) ? true : false ) ;
162

  
160 163
// Query current settings in the db, then loop through them and update the db with the new value
161 164
$settings = array();
162 165
$old_settings = array();
......
168 171
	$passed = false;
169 172
	while($setting = $res_settings->fetchRow())
170 173
	{
171
		$old_settings[$setting['name']] = $setting['value'];
172 174
		$setting_name = $setting['name'];
175
		$old_settings[$setting_name] = $setting['value'];
173 176
		$value = $admin->get_post($setting_name);
174 177
		$value = isset($_POST[$setting_name]) ? $value : $old_settings[$setting_name] ;
175 178
		switch ($setting_name) {
......
184 187
			case 'string_file_mode':
185 188
				$value=$file_mode;
186 189
	 			$passed = true;
187
			break;
190
    			break;
188 191
			case 'sec_anchor':
189 192
				$value=(($value=='') ? 'section_' : $value);
190 193
	 			$passed = true;
194
				break;
191 195
			case 'pages_directory':
196
                $bNewPageFile = ( ( $value!= $old_settings['pages_directory'] ) ? true :  false );
197
	 			$passed = $bNewPageFile;
198
                $sGetId = '&amp;id='.$bNewPageFile;
199
//                if(!is_dir(WB_PATH.$value) && is_writable(WB_PATH)) {
200
//                    $passed = make_dir(WB_PATH.$value);
201
//                }
202
                $value  = (($passed == true) ? $value : $old_settings['pages_directory']);
203
                $sPageDirectory = $value;
192 204
				break;
193 205
			case 'wbmailer_smtp_auth':
194 206
				// $value = isset($_POST[$setting_name]) ? $_POST[$setting_name] : '' ;
......
200 212
				break;
201 213
		}
202 214

  
215

  
203 216
	    if (!in_array($setting_name, $allow_tags_in_fields))
204 217
	    {
205 218
	        $value = strip_tags($value);
......
212 225
	        $sql .= 'SET `value` = \''.$value.'\' ';
213 226
	        $sql .= 'WHERE `name` != \'wb_version\' ';
214 227
	        $sql .= 'AND `name` = \''.$setting_name.'\' ';
215

  
216 228
	        if (!$database->query($sql))
217 229
	        {
218 230
				if($database->is_error()) {
......
221 233
	        }
222 234
		}
223 235
	}
236

  
237
    if(($bRebuildAccessFiles==true) && ($_POST['modules_upgrade_list']!='') && ($sPageDirectory==$old_settings['pages_directory']) ) {
238
        rebuild_all_accessfiles();
239
        $aModuleList = ( explode(',', $_POST['modules_upgrade_list']));
240
        upgrade_modules($aModuleList);
241
    }
242

  
224 243
}
225 244

  
226 245
// Query current search settings in the db, then loop through them and update the db with the new value
branches/2.8.x/wb/admin/settings/languages/EN.php
7 7

  
8 8
$TEXT['WEBSITE_SIGNATURE'] = 'Contact Signature';
9 9
$TEXT['PAGE_EXTENDED'] = 'Extended Pagesettings';
10
$TEXT['CONFIRMED_REGISTRATION'] = 'Activation-Mail';
10
$TEXT['CONFIRMED_REGISTRATION'] = 'Register with Activation-Mail';
11
$TEXT['REBUILD_ACCESS_FILES'] = 'Rebuild Accessfiles';
12
$TEXT['MODULES_DIRECTORY'] = 'Modules for upgrade';
11 13
$HELP['ACTIVATION_MAIL'] = 'Registration per Activation-Mail (Enabled) or Directregistration (Disabled)';
14
$HELP['REBUILD_ACCESS_FILES'] = '- Modules listet in the next field, will be upgraded too, (Comma separate list)';
15
//
branches/2.8.x/wb/admin/settings/languages/DE.php
8 8

  
9 9
$TEXT['WEBSITE_SIGNATURE'] = 'Kontakt Signature';
10 10
$TEXT['PAGE_EXTENDED'] = 'Erweiterte Seiteneinstellungen';
11
$TEXT['CONFIRMED_REGISTRATION'] = 'Aktivierungs-Mail';
11
$TEXT['CONFIRMED_REGISTRATION'] = 'Registrierung mit Aktivierungs-Mail';
12
$TEXT['REBUILD_ACCESS_FILES'] = 'Zugriffsdateien aktualiseren';
13
$TEXT['MODULES_DIRECTORY'] = 'Module für Aktualisierung';
12 14
$HELP['ACTIVATION_MAIL'] = 'Registrierung per Aktivierungs-Mail (Eingeschaltet) oder Direktregistrierung (Ausgeschaltet)';
15
$HELP['REBUILD_ACCESS_FILES'] = '- Aktualisiert auch nachfolgend eingetragene geprüfte Module, (Komma getrennte Liste)';
16
//
branches/2.8.x/wb/admin/settings/index.php
28 28
$cfg = array(
29 29
	'website_signature' => defined('WEBSITE_SIGNATURE') ? WEBSITE_SIGNATURE : '',
30 30
	'confirmed_registration' => (defined('CONFIRMED_REGISTRATION') ? CONFIRMED_REGISTRATION : '0'),
31
	'modules_upgrade_list' => (defined('MODULES_UPGRADE_LIST') ? MODULES_UPGRADE_LIST : ''),
31 32
	);
32 33
db_update_key_value( 'settings', $cfg );
33 34

  
......
40 41

  
41 42
// Setup template object, parse vars to it, then parse it
42 43
// Create new template object
43
$template = new Template(dirname($admin->correct_theme_source('settings.htt')));
44
$template = new Template(dirname($admin->correct_theme_source('settings.htt')),'keep');
44 45
// $template->debug = true;
45 46
$template->set_file('page',        'settings.htt');
46 47
$template->set_block('page',       'main_block', 'main');
......
70 71
$template->set_block('main_block', 'show_search_block',           'show_search');
71 72
$template->set_block('main_block', 'show_redirect_timer_block',   'show_redirect_timer');
72 73
/*-- insert all needed vars from language files ----------------------------------------*/
73
	$template->set_var($mLang->getLangArray());
74
$template->set_var($mLang->getLangArray());
74 75

  
75 76
// Query current settings in the db, then loop through them and print them
76 77
$query = "SELECT * FROM ".TABLE_PREFIX."settings";
......
783 784

  
784 785
	$template->set_var(array(
785 786
						'PAGES_DIRECTORY' => PAGES_DIRECTORY,
787
						'MODULES_DIRECTORY' => MODULES_UPGRADE_LIST,
786 788
						'PAGE_ICON_DIR'   => PAGE_ICON_DIR,
787 789
						'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
788 790
						'PAGE_EXTENSION' => PAGE_EXTENSION,
......
951 953
// Parse template objects output
952 954
$template->parse('main', 'main_block', false);
953 955
$template->pparse('output', 'page');
954

  
956
unset($template);
955 957
$admin->print_footer();

Also available in: Unified diff