Project

General

Profile

« Previous | Next » 

Revision 1760

Added by Dietmar about 12 years ago

! fallback changes in wysiwyg Revision 1754
because it's required that section_id is the PRIMARY KEY
Fallback will be done in upgrade-script until the final version
! build in extra input seo title in page settings
! beginning rebranding wb_theme

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
18 Sep-2012 Build 1760 Dietmar Woellbrink (Luisehahne)
17
! fallback changes in wysiwyg Revision 1754
18
  because it's required that section_id is the PRIMARY KEY
19
  Fallback will be done in upgrade-script until the final version  
20
! build in extra input seo title in page settings
21
! beginning rebranding wb_theme
16 22
17 Sep-2012 Build 1759 Dietmar Woellbrink (Luisehahne)
17 23
! during Reformat/rebuild all existing access files in upgrade-script
18 24
  root_parent will be set to page_id
branches/2.8.x/wb/upgrade-script.php
489 489
		$sql .= 'WHERE `name`=\'no_results\'';
490 490
	    echo ($database->query($sql)) ? ' $OK<br />' : ' $FAIL<br />';
491 491
	}
492

  
492 493
	/**********************************************************
493
 *  - Add field "redirect_type" to table "mod_menu_link"
494
 *  has to be moved later to upgrade.php in modul menu_link, because modul can be removed
495
 */
494
     *  - Add field "redirect_type" to table "mod_menu_link"
495
     *  has to be moved later to upgrade.php in modul menu_link, because modul can be removed
496
     */
496 497
	$table_name = TABLE_PREFIX.'mod_menu_link';
497 498
	$field_name = 'redirect_type';
498 499
	$description = "INT NOT NULL DEFAULT '301' AFTER `target_page_id`";
......
514 515
	echo ($database->field_modify($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
515 516

  
516 517
	/**********************************************************
517
 *  - Add field "page_icon" to table "pages"
518
 */
518
     *  - Add field "page_icon" to table "pages"
519
     */
519 520
	$table_name = TABLE_PREFIX.'pages';
520 521
	$field_name = 'page_icon';
521 522
	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `page_title`";
......
528 529
	}
529 530

  
530 531
	/**********************************************************
531
	 *  - Add field "tooltip" to table "pages"
532
 */
533
	$table_name = TABLE_PREFIX.'pages';
534
	$field_name = 'tooltip';
535
	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `page_icon`";
536
	if(!$database->field_exists($table_name,$field_name)) {
537
		echo "Adding field tooltip to pages table";
538
		echo ($database->field_add($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
539
	} else {
540
	echo "Modify field tooltip to pages table";
541
	echo ($database->field_modify($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
542
	}
543

  
544
	/**********************************************************
545 532
	 *  - Add field "page_code" to table "pages"
546 533
	 */
547 534
	$table_name = TABLE_PREFIX.'pages';
......
556 543
	}
557 544

  
558 545
	/**********************************************************
559
 *  - Add field "menu_icon_0" to table "pages"
560
 */
546
     *  - Add field "menu_icon_0" to table "pages"
547
     */
561 548
	$table_name = TABLE_PREFIX.'pages';
562 549
	$field_name = 'menu_icon_0';
563 550
	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `menu_title`";
......
571 558

  
572 559
	/**********************************************************
573 560
	 *  - Add field "menu_icon_1" to table "pages"
574
 */
561
     */
575 562
	$table_name = TABLE_PREFIX.'pages';
576 563
	$field_name = 'menu_icon_1';
577 564
	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `menu_icon_0`";
......
585 572

  
586 573
	/**********************************************************
587 574
	 *  - Add field "tooltip" to table "pages"
588
 */
575
     */
589 576
	$table_name = TABLE_PREFIX.'pages';
590 577
	$field_name = 'tooltip';
591 578
	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `menu_icon_1`";
......
599 586

  
600 587
	/**********************************************************
601 588
	 *  - Add field "admin_groups" to table "pages"
602
 */
589
     */
603 590
	$table_name = TABLE_PREFIX.'pages';
604 591
	$field_name = 'admin_groups';
605 592
	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '1'";
......
633 620
	echo "Modify field viewing_users to pages table";
634 621
	echo ($database->field_modify($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
635 622

  
623

  
624
/**
625
 * This part with changing in mod_wysiwyg will be removed in the final version
626
 * special workout for the tester
627
 */
636 628
	/**********************************************************
637 629
	 *  - Remove/add PRIMARY KEY from/to "section_id" from table "mod_wysiwygs"
638 630
	 */
639 631
	$sTable = TABLE_PREFIX.'mod_wysiwyg';
640 632
	$field_name = 'wysiwyg_id';
641
	if(!$database->field_exists($sTable,$field_name)) {
633
	if($database->field_exists($sTable,$field_name)) {
642 634
    	echo "Remove PRIMARY KEY from table mod_wysiwygs";
643
        $sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` DROP PRIMARY KEY';
635
//ALTER TABLE `wb283_mod_wysiwyg` DROP `wysiwyg_id`
636
        $sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` DROP `wysiwyg_id`';
644 637
        echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
645 638

  
646
    	echo "add new PRIMARY KEY to table mod_wysiwygs";
647
        $sql = 'ALTER TABLE `'.$sTable.'`  ADD `wysiwyg_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST';
648
        echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
639
//    	echo "add new PRIMARY KEY to table mod_wysiwygs";
640
//        $sql = 'ALTER TABLE `'.$sTable.'` DROP `wysiwyg_id`';
641
//        echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
649 642
    }
643
	echo "Change PRIMARY KEY from table mod_wysiwygs";
644
    $sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` ADD PRIMARY KEY (`section_id`)';
645
    echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
646

  
647

  
650 648
}
651 649

  
652 650
/**********************************************************
......
683 681
    ///**********************************************************
684 682
    // *  - Reformat/rebuild all existing access files
685 683
    // */
686
    $msg[] = "All existing access files anew format";
684
    $msg[] = "Refresh all existing access files ";
687 685
    $sql = 'SELECT `page_id`,`root_parent`,`link`, `level` FROM `'.TABLE_PREFIX.'pages` ORDER BY `link`';
688 686
    if (($oPage = $database->query($sql)))
689 687
    {
690 688
        $x = 0;
691 689
        while (($page = $oPage->fetchRow(MYSQL_ASSOC)))
692 690
        {
693
            $sql = 'UPDATE `'.TABLE_PREFIX.'pages` '
694
                 . 'SET `root_parent`='.$page['page_id'].' WHERE page_id = '.$page['page_id'];
691
            // Work out level
692
            $level = level_count($page['page_id']);
693
            // Work out root parent
694
            $root_parent = root_parent($page['page_id']);
695
            // Work out page trail
696
            $page_trail = get_page_trail($page['page_id']);
697
            // Update page with new level and link
698
            $sql  = 'UPDATE `'.TABLE_PREFIX.'pages` SET ';
699
            $sql .= '`root_parent` = '.$root_parent.', ';
700
            $sql .= '`level` = '.$level.', ';
701
            $sql .= '`page_trail` = "'.$page_trail.'" ';
702
            $sql .= 'WHERE `page_id` = '.$page['page_id'];
703

  
695 704
            if(!$database->query($sql)) {}
696 705
            $filename = WB_PATH.PAGES_DIRECTORY.$page['link'].PAGE_EXTENSION;
697 706
            $msg = create_access_file($filename, $page['page_id'], $page['level']);
branches/2.8.x/wb/admin/skel/themes/htt/footer.htt
16 16
</tbody>
17 17
</table>
18 18
<!-- BEGIN show_debug_block -->
19
<div class="mbox dev-info">
19
<div class="mbox dev-info rounded shadow">
20 20
	<div style="text-align:left; width: auto;">
21 21
		<span class="">Memory Limit: {FILESIZE}&nbsp;|&nbsp;</span>
22 22
		<span class="">Used Memory: {MEMORY}&nbsp;|&nbsp;</span>
branches/2.8.x/wb/admin/skel/themes/htt/header.htt
35 35
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
36 36
<div class="main">
37 37

  
38
<table  class="header layout">
38
<table class="header layout">
39 39
<tr>
40 40
	<td class="logo">
41 41
		<a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
......
55 55
</tr>
56 56
</table>
57 57

  
58
<div class="table">
58
<div class="table rounded shadow">
59 59

  
60 60
	<div class="hmenu {LOGIN_DISPLAY_NONE}">
61 61
		<ul>
branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt
46 46
				<label for="menu_title">{TEXT_MENU_TITLE}:</label>
47 47
				<input type="text" id="menu_title" name="menu_title" value="{MENU_TITLE}" />
48 48
			</div>
49
			<div>
50
				<label for="seo_title">{TEXT_SEO_TITLE}:</label>
51
				<input type="text" id="seo_title" name="seo_title" value="{SEO_TITLE}" />
52
			</div>
49 53
			<div class="{PAGE_EXTENDED_HIDE}">
50 54
				<label for="menu_icon_0" {p_menu_icon0_dir} style="background-image: url({THEME_URL}/icons/help_16.png);">{TEXT_MENU_ICON_0}:</label>
51 55
					<select id="menu_icon_0" name="menu_icon_0">
branches/2.8.x/wb/admin/pages/settings.php
19 19
require_once(WB_PATH.'/framework/class.admin.php');
20 20
$admin = new admin('Pages', 'pages_settings');
21 21

  
22

  
22 23
/*-- Parent page list ------------------------------------------------------------------*/
23 24
	function parent_list($parent)
24 25
	{
......
26 27
		$sDisabled = ' disabled="disabled"';
27 28
		$sSelected  = ' selected="selected"';
28 29

  
29
		$sql = 'SELECT `page_id`, `level`, `parent`, `menu_title`, `page_title`, '
30
		$sql = 'SELECT `page_id`, `level`, `link`, `parent`, `menu_title`, `page_title`, '
30 31
		     .        '`language`, `admin_groups`, `admin_users`, `visibility`, '
31 32
		     .        '`viewing_groups`, `viewing_users` '
32 33
		     . 'FROM `'.TABLE_PREFIX.'pages` '
......
94 95
	$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$page_id;
95 96
	if( ($oPages = $database->query($sql)) ) {
96 97
		$aCurrentPage = $oPages->fetchRow(MYSQL_ASSOC);
98
		// Work-out if we should set seo_title
99
        $aCurrentPage['seo_title'] = basename($aCurrentPage['link']);
97 100
		// Work-out if we should check for existing page_code
98 101
		$field_set = isset($aCurrentPage['page_code']);
99 102
		if( !$admin->ami_group_member($aCurrentPage['admin_groups']) &&
......
130 133
			'PAGE_ID'              => $aCurrentPage['page_id'],
131 134
			'PAGE_IDKEY'           => $admin->getIDKEY($aCurrentPage['page_id']),
132 135
			'PAGE_TITLE'           => ($aCurrentPage['page_title']),
136
			'PAGE_LINK'            => ($aCurrentPage['link']),
133 137
			'MENU_TITLE'           => ($aCurrentPage['menu_title']),
138
			'SEO_TITLE'            => ($aCurrentPage['seo_title']=='') ? $aCurrentPage['menu_title'] : $aCurrentPage['seo_title'],
134 139
			'DESCRIPTION'          => ($aCurrentPage['description']),
135 140
			'KEYWORDS'             => ($aCurrentPage['keywords']),
136 141
			'MODIFIED_BY'          => $user['display_name'],
branches/2.8.x/wb/admin/pages/settings_save.php
20 20
require('../../config.php');
21 21
require_once(WB_PATH.'/framework/class.admin.php');
22 22

  
23
$lang_dir = dirname(__FILE__).'/languages/';
24
$lang = file_exists($lang_dir.LANGUAGE.'.php') ? LANGUAGE : 'EN';
25
require_once($lang_dir.$lang.'.php');
26

  
23 27
// suppress to print the header, so no new FTAN will be set
24 28
$admin = new admin('Pages', 'pages_settings',false);
25 29

  
30
$pagetree_url = ADMIN_URL.'/pages/index.php';
31

  
26 32
// Get page id
27 33
if(!isset($_POST['page_id']) || (isset($_POST['page_id']) && preg_match('/[^0-9a-z]/i',$_POST['page_id'])) )
28 34
{
......
33 39
//	$page_id = (int)$_POST['page_id']; || preg_match('/[^0-9a-f]/i',$_POST['page_id'])
34 40
	if((!($page_id = $admin->checkIDKEY('page_id')))) {
35 41
		$admin->print_header();
36
		$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/index.php');
42
		$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $pagetree_url);
37 43
	}
38 44
}
39 45

  
......
43 49
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
44 50
}
45 51
*/
46
$pagetree_url = ADMIN_URL.'/pages/index.php';
47 52
$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
48 53

  
49 54
if (!$admin->checkFTAN())
......
60 65
// Get values
61 66
$page_title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('page_title')));
62 67
$menu_title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('menu_title')));
68
$seo_title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('seo_title')));
63 69
$page_code = intval($admin->get_post('page_code')) ;
64 70
$description = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->add_slashes($admin->get_post('description'))));
65 71
$keywords = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->add_slashes($admin->get_post('keywords'))));
......
86 92
// Validate data
87 93
if($page_title == '' || substr($page_title,0,1)=='.')
88 94
{
89
	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE']);
95
	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE'],$target_url);
90 96
}
91 97
if($menu_title == '' || substr($menu_title,0,1)=='.')
92 98
{
93
	$admin->print_error($MESSAGE['PAGES_BLANK_MENU_TITLE']);
99
	$admin->print_error($MESSAGE['PAGES_BLANK_MENU_TITLE'],$target_url);
94 100
}
101
if($seo_title == '' || substr($seo_title,0,1)=='.')
102
{
103
	$admin->print_error($MESSAGE['PAGES_BLANK_SEO_TITLE'],$target_url);
104
}
95 105

  
96 106
// Get existing perms
97
$sql = 'SELECT `parent`,`link`,`position`,`admin_groups`,`admin_users` FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
107
$sql  = 'SELECT `parent`,`link`,`position`,`admin_groups`,`admin_users`,`menu_title` ';
108
$sql .= 'FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
109

  
98 110
$results = $database->query($sql);
99 111

  
100
$results_array = $results->fetchRow();
112
$results_array = $results->fetchRow(MYSQL_ASSOC);
101 113
$old_parent = $results_array['parent'];
102 114
$old_link = $results_array['link'];
103 115
$old_position = $results_array['position'];
......
154 166
{
155 167
	$level = level_count($parent)+1;
156 168
	$root_parent = root_parent($parent);
157
}
158
else {
159
//	$level = '0';
160
//	$root_parent = '0';
169
} else {
161 170
// Work out level
162 171
    $level = level_count($page_id);
163 172
// Work out root parent
164 173
    $root_parent = root_parent($page_id);
165 174
}
166 175

  
176
$link = '/'.page_filename($seo_title);
177

  
167 178
// Work-out what the link should be
168
if($parent == '0')
169
{
170
	$link = '/'.page_filename($menu_title);
171
	// rename menu titles: index && intro to prevent clashes with intro page feature and WB core file /pages/index.php
172
	if($link == '/index' || $link == '/intro')
179
if($parent == '0') {
180
    if($link == '/index' || $link == '/intro')
173 181
    {
174
		$link .= '_' .$page_id;
175
		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'_'.$page_id .PAGE_EXTENSION;
176
	} else {
177
		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION;
178
	}
182
    	$link .= '_' .$page_id;
183
    	$filename = WB_PATH.PAGES_DIRECTORY.$link .PAGE_EXTENSION;
184

  
185
    } else {
186
        $filename = WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
187
    }
179 188
} else {
180 189
	$parent_section = '';
181 190
	$parent_titles = array_reverse(get_parent_titles($parent));
191

  
182 192
	foreach($parent_titles AS $parent_title)
183 193
    {
184
		$parent_section .= page_filename($parent_title).'/';
194
		$parent_section .= '/'.page_filename($parent_title);
185 195
	}
196

  
186 197
	if($parent_section == '/')
187 198
    {
188 199
      $parent_section = '';
189 200
    }
190
	$link = '/'.$parent_section.page_filename($menu_title);
191
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;
201

  
202
	$link = $parent_section.$link;
203
    $filename = WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
192 204
}
193 205

  
194 206
// Check if a page with same page filename exists
195 207
// $database = new database();
196 208
$sql = 'SELECT `page_id`,`page_title` FROM `'.TABLE_PREFIX.'pages` WHERE `link` = "'.$link.'" AND `page_id` != '.$page_id;
209

  
197 210
$get_same_page = $database->query($sql);
198 211

  
199 212
if($get_same_page->numRows() > 0)
200 213
{
201
	$admin->print_error($MESSAGE['PAGES_PAGE_EXISTS']);
214
	$admin->print_error($MESSAGE['PAGES_PAGE_EXISTS'], $target_url);
202 215
}
203 216

  
204 217
// Update page with new order
......
233 246
     .     '`language`=\''.$language.'\', ';
234 247
if($admin->ami_group_member('1')) {
235 248
	$sql .= ''
236
	     .     '`admin_groups`=\''.$sAdminGroups.'\', '
237
	     .     '`admin_users`=\''.$sAdminUsers.'\', ';
249
	     . '`admin_groups`=\''.$sAdminGroups.'\', '
250
	     . '`admin_users`=\''.$sAdminUsers.'\', ';
238 251
}
239 252
$sql .= ''
240 253
     .     '`viewing_groups`=\''.$sViewingGroups.'\', '
......
246 259
	$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
247 260
	$admin->print_error($database->get_error(), $target_url );
248 261
}
262

  
249 263
// Clean old order if needed
250 264
if($parent != $old_parent)
251 265
{
......
257 271
// Create a new file in the /pages dir if title changed
258 272
if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/'))
259 273
{
260
	$admin->print_error($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE']);
274
	$admin->print_error($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'], $target_url);
261 275
} else {
262 276
    $old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
277

  
263 278
	// First check if we need to create a new file
264 279
	if(($old_link != $link) || (!file_exists($old_filename)))
265 280
    {
......
269 284
        {
270 285
			unlink($old_filename);
271 286
		}
287

  
272 288
		// Create access file
273 289
		create_access_file($filename,$page_id,$level);
274 290
		// Move a directory for this page
......
309 325
	}
310 326
}
311 327

  
312
// Function to fix page trail of subs
313
function fix_page_trail($parent,$root_parent)
314
{
315
	// Get objects and vars from outside this function
316
	global $admin, $template, $database, $TEXT, $MESSAGE;
317
	// Get page list from database
318
	// $database = new database();
319
	$query = "SELECT page_id FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'";
320
	$get_pages = $database->query($query);
321
	// Insert values into main page list
322
	if($get_pages->numRows() > 0)
323
    {
324
		while($page = $get_pages->fetchRow())
325
        {
326
			// Fix page trail
328
// using standard function by core,
329
function fix_page_trail($page_id) {
330
    global $database,$admin,$target_url,$MESSAGE;
331
    // Work out level
332
    $level = level_count($page_id);
333
    // Work out root parent
334
    $root_parent = root_parent($page_id);
335
    // Work out page trail
336
    $page_trail = get_page_trail($page_id);
337
    // Update page with new level and link
338
    $sql  = 'UPDATE `'.TABLE_PREFIX.'pages` SET ';
339
    $sql .= '`root_parent` = '.$root_parent.', ';
340
    $sql .= '`level` = '.$level.', ';
341
    $sql .= '`page_trail` = "'.$page_trail.'" ';
342
    $sql .= 'WHERE `page_id` = '.$page_id;
327 343

  
328
			$database->query("UPDATE ".TABLE_PREFIX."pages SET ".($root_parent != 0 ?"root_parent = '$root_parent', ":"")." page_trail = '".get_page_trail($page['page_id'])."' WHERE page_id = '".$page['page_id']."'");
329
			// Run this query on subs
330
			fix_page_trail($page['page_id'],$root_parent);
331
		}
332
	}
344
    if($database->query($sql)) {
345
    	$admin->print_success($MESSAGE['PAGES_SAVED_SETTINGS'], $target_url );
346
    } else {
347
    	$admin->print_error($database->get_error(), $target_url );
348
    }
333 349
}
334 350

  
335 351
// Fix sub-pages page trail
336
fix_page_trail($page_id,$root_parent);
352
fix_page_trail($page_id);
337 353

  
338
/* END page "access file" code */
339

  
340
//$pagetree_url = ADMIN_URL.'/pages/index.php';
341
//$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
342
// Check if there is a db error, otherwise say successful
343
if($database->is_error())
344
{
345
	$admin->print_error($database->get_error(), $target_url );
346
} else {
347
	$admin->print_success($MESSAGE['PAGES_SAVED_SETTINGS'], $target_url );
348
}
349

  
350
// Print admin footer
351 354
$admin->print_footer();
branches/2.8.x/wb/admin/pages/languages/EN.php
50 50
$TEXT['SECTION_ORGANISATION'] = 'Organisation';
51 51
$TEXT['SECTION_CONTENT']      = 'Content';
52 52
$TEXT['SECTION_SECURITY']     = 'Security';
53
$TEXT['SEO_TITLE']            = 'Seo Title';
53 54
$TEXT['PAGE_ICON']            = 'Page image';
54 55
$TEXT['PAGE_ICON_DIR']        = 'Folder Page image';
55 56
$TEXT['MENU_ICON_0']          = 'Menu image normal';
56 57
$TEXT['MENU_ICON_0_DIR']      = 'Folder Menu image normal';
57 58
$TEXT['MENU_ICON_1']          = 'Menu image hover';
58 59
$TEXT['MENU_ICON_1_DIR']      = 'Folder Menu image hover';
59
$TEXT['SEO_TITLE']            = 'Seotitle';
60 60

  
61 61
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Last modification by';
62
$MESSAGE['PAGES_BLANK_SEO_TITLE'] = 'Please enter a sro title';
62 63

  
63 64

  
64 65
$HELP['PAGE_IMAGE_DIR']  = '<p>The topical side picture path is<br /> <b>{{icon_dir}}</b>.</p>';
branches/2.8.x/wb/admin/pages/languages/DE.php
50 50
$TEXT['SECTION_ORGANISATION'] = 'Organisation';
51 51
$TEXT['SECTION_CONTENT']      = 'Inhalt';
52 52
$TEXT['SECTION_SECURITY']     = 'Sicherheit';
53
$TEXT['SEO_TITLE']            = 'Seo Titel';
53 54
$TEXT['PAGE_ICON']            = 'Seitenbild';
54 55
$TEXT['PAGE_ICON_DIR']        = 'Verzeichnis Seitenbilder';
55 56
$TEXT['MENU_ICON_0']          = 'Menübild normal';
56 57
$TEXT['MENU_ICON_0_DIR']      = 'Verzeichnis Menübild normal';
57 58
$TEXT['MENU_ICON_1']          = 'Menübild hover';
58 59
$TEXT['MENU_ICON_1_DIR']      = 'Verzeichnis Menübild hover';
59
$TEXT['SEO_TITLE']            = 'Seotitel';
60 60
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Letze Änderung durch';
61
$MESSAGE['PAGES_BLANK_SEO_TITLE'] = 'Bitte geben Sie einen Seo Titel ein';
61 62

  
62 63
$HELP['PAGE_IMAGE_DIR']  = '<p>Der aktuelle Seitenbildpfad ist<br /> <b>{{icon_dir}}</b>.</p>';
63 64
$HELP['PAGE_IMAGE_DIR'] .='<p>Als Systemadministrator können Sie das Verzeichnis für Seiten-/Menuebilder unter <i>Optionen</i> <i>Erweiterte Optionen</i> in <i>Servereinstellung</i> ändern.</p>';
branches/2.8.x/wb/admin/pages/add.php
30 30
require_once(WB_PATH.'/framework/functions.php');
31 31

  
32 32
// Get values
33
$title = $admin->get_post_escaped('title');
34
$title = htmlspecialchars($title);
33
//$title = $admin->get_post_escaped('title');
34
//$title = htmlspecialchars($title);
35
$title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('title')));
35 36
$module = preg_replace('/[^a-z0-9_-]/i', "", $admin->get_post('type')); // fix secunia 2010-93-4
36 37
$parent = intval($admin->get_post('parent')); // fix secunia 2010-91-2
37 38
$visibility = $admin->get_post('visibility');
......
69 70
// Validate data
70 71
if($title == '' || substr($title,0,1)=='.')
71 72
{
72
	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE']);
73
	$admin->print_error($title.'::'.$MESSAGE['PAGES_BLANK_PAGE_TITLE']);
73 74
}
74 75

  
75 76
// Check to see if page created has needed permissions
......
111 112
	// rename menu titles: index && intro to prevent clashes with intro page feature and WB core file /pages/index.php
112 113
	if($link == '/index' || $link == '/intro')
113 114
    {
114
		$link .= '_0';
115
		$filename = WB_PATH .PAGES_DIRECTORY .'/' .page_filename($title) .'_0' .PAGE_EXTENSION;
115
		$sTmpFile = WB_PATH .PAGES_DIRECTORY .$link.PAGE_EXTENSION;
116
		$link .= (file_exists($sTmpFile)) ? '_0' : '';
117
		$filename = WB_PATH .PAGES_DIRECTORY .$link .PAGE_EXTENSION;
116 118
	} else {
117
		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).PAGE_EXTENSION;
119
		$filename = WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
118 120
	}
121

  
119 122
} else {
120 123
	$parent_section = '';
121 124
	$parent_titles = array_reverse(get_parent_titles($parent));
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', '1759');
54
if(!defined('REVISION')) define('REVISION', '1760');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/templates/wb_theme/css/screen.css
5 5
/*  */
6 6
div.main { border :0px none #666666; margin :0px auto 1em auto; min-width :60em; max-width :90em; font-size :1.0em; padding :4px; width : 85%; overflow :hidden; }
7 7
.td { clear :both; font-size :1.0em; margin :0 auto; text-align :center; width :100%; }
8
div.main .table { background :url(../images/bgtitle.png) #ffffff repeat-x; margin :0 auto; width :100%; }
8
div.main .table { background :url(../images/bgtitle.png) #ffffff repeat-x; margin :0 auto; overflow :auto; width :100%; }
9 9
.wrapper { position :relative; display :block; overflow :auto; width :inherit; }
10 10
.content { padding :10px; text-align :left; overflow :hidden; }
11 11
img { border :none; }
......
28 28
   table td a:hover { color :#3366ff; text-decoration :underline; }
29 29
/* header horizontal navigation */  
30 30
div.hmenu { background :#486991 url(../images/menu.png) repeat-x center; line-height :32px; margin :0px auto; font-size :1em; float :left; width :100%; }
31
   div.hmenu ul { color :#ffffff; margin :0px auto; display :block; padding :0; list-style-position :outside; }
31
   div.hmenu ul { color :#ffffff; margin :0px auto; display :block; padding :0 0 0 10px; list-style-position :outside; }
32 32
	   div.hmenu * a { color :#ffffff; text-decoration :none; }
33 33
   div.hmenu ul li { color :#ffffff; display :inline; padding :10px 0px; }
34 34
   div.hmenu ul li a { color :#ffffff; display :inline; height :2em; padding :7px 5px; font-weight :bold; background :transparent; }
35 35
   div.hmenu ul li a.active,
36 36
   div.hmenu ul li a.current { color :#ffffff; background :transparent url(../images/menuo.png) repeat-x center; }
37 37
   div.hmenu ul li:hover,
38
   div.hmenu ul li a:hover { color :#ffff99; background :transparent url(../images/menuo.png) repeat-x center; }
38
   div.hmenu ul li a:hover { color :#fff; background :transparent url(../images/menuo.png) repeat-x center; }
39 39
/* */
40 40
table.footer { margin :1em auto; width :100%; }
41 41
table.footer fieldset { background :#a8bccb; margin :0.5em auto; text-align :center; }
......
189 189
table a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
190 190
table a:hover { color :#6699ff; }
191 191
a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
192
a:visited { color :#0066cc; }
192 193
a:hover { color :#6699ff; text-decoration :underline; }
193 194
/**/
194 195
.header_list_actions { text-align :left; width :150px; }
......
247 248
div.page-settings-leftcol { float :left; padding :10px 10px 10px 10px; border-right :groove 2px #a8bccb; }
248 249
	div.page-settings-leftcol div { padding :2px 0 3px 0; vertical-align :top; }
249 250
	div.page-settings-leftcol label { width :170px; vertical-align :top; }
250
div.page-settings-righttoprow { margin-left :417px; padding :5px 20px 5px 10px; }
251
div.page-settings-righttoprow { margin-left :417px; padding :10px; }
251 252
	div.page-settings-righttoprow label { width :110px; vertical-align :top; }
252 253
div.page-settings-centercol { float :left; padding :10px 20px 10px 20px; border-right :groove 2px #a8bccb; }
253 254
div.page-settings-rightcol { float :left; padding :10px 20px 10px 10px; border :none; }
......
264 265
div.page_group div { overflow: hidden; }
265 266
div.page-settings p.page_user,
266 267
div.page-settings p.page_group {  } 
267

  
268 268
/* */
269 269
.header_title, .setting_value input, .setting_value select, .setting_value textarea, .value_input input, .value_input text, .value_input select, .form_submit, .input_full { width :80%; }
270 270
.content_box { text-align :left; }
branches/2.8.x/wb/templates/wb_theme/templates/header.htt
34 34
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
35 35
<div class="main">
36 36

  
37
<table  class="header layout">
37
<table class="header layout">
38 38
<tr>
39 39
	<td class="logo">
40 40
		<a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
......
54 54
</tr>
55 55
</table>
56 56

  
57
<div class="table">
57
<div class="table rounded shadow">
58 58

  
59 59
	<div class="hmenu {LOGIN_DISPLAY_NONE}">
60 60
			<ul>
branches/2.8.x/wb/templates/wb_theme/templates/footer.htt
16 16
</tbody>
17 17
</table>
18 18
<!-- BEGIN show_debug_block -->
19
<div class="mbox dev-info">
19
<div class="mbox dev-info rounded shadow">
20 20
	<div style="text-align:left; width: auto;">
21 21
		<span class="">Memory Limit: {FILESIZE}&nbsp;|&nbsp;</span>
22 22
		<span class="">Used Memory: {MEMORY}&nbsp;|&nbsp;</span>
branches/2.8.x/wb/modules/wysiwyg/sql/mod_wysiwyg.sql
24 24

  
25 25
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_wysiwyg`;
26 26
CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_wysiwyg` (
27
  `wysiwyg_id` int(11) NOT NULL AUTO_INCREMENT,
28 27
  `section_id` int(11) NOT NULL DEFAULT '0',
29 28
  `page_id` int(11) NOT NULL DEFAULT '0',
30 29
  `content` longtext NOT NULL,
31 30
  `text` longtext NOT NULL,
32
  PRIMARY KEY (`wysiwyg_id`)
31
  PRIMARY KEY (`section_id`)
33 32
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
34 33

  
35 34
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

Also available in: Unified diff