Project

General

Profile

« Previous | Next » 

Revision 666

Added by thorn almost 17 years ago

fck_wbmodules.php: foreign privates pages in dropdown, fixed.
Fixed an E_NOTICE-warning.

View differences:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.7.0 -------------------------------------
14 14
03-Feb-2008 Thomas Hornik
15
#	out-of-date default page isn't shown anymore, instead shows next public page.
15
#	out-of-date default page isn't shown anymore, instead shows next public page.
16
#	fck_wbmodules.php: foreign privates pages in dropdown, fixed.
16 17
03-Feb-2008 Matthias Gallas
17 18
+	added kewyword id to all new files
18 19
02-Feb-2008 Christian Sommer
trunk/wb/modules/fckeditor/fckeditor/editor/plugins/WBModules/fck_wbmodules.php
14 14

  
15 15
// Function to generate page list
16 16
function gen_page_list($parent) {
17
	global $template, $database;
18
	$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'");
19
	while($page = $get_pages->fetchRow()) {
17
	global $template, $database, $admin;
18
	$get_pages = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'");
19
	while($page = $get_pages->fetchRow()) {
20
		if(!$admin->page_is_visible($page))
21
			continue;
20 22
		$title = stripslashes($page['menu_title']);
21 23
		// Add leading -'s so we can tell what level a page is at
22 24
		$leading_dashes = '';
......
44 46
// Get pages and put them into the pages list
45 47
$template->set_block('main_block', 'page_list_block', 'page_list');
46 48
$database = new database();
47
$get_pages = $database->query("SELECT page_id,menu_title,link FROM ".TABLE_PREFIX."pages WHERE parent = '0'");
48
if($get_pages > 0) {
49
$get_pages = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '0'");
50
if($get_pages->numRows() > 0) {
49 51
	// Loop through pages
50
	while($page = $get_pages->fetchRow()) {
52
	while($page = $get_pages->fetchRow()) {
53
		if(!$admin->page_is_visible($page))
54
			continue;
51 55
		$title = stripslashes($page['menu_title']);
52 56
		$template->set_var('TITLE', $title);
53 57
		$template->set_var('LINK', '[wblink'.$page['page_id'].']');

Also available in: Unified diff