Project

General

Profile

« Previous | Next » 

Revision 555

Added by Matthias almost 17 years ago

Revoked parts of changeset [547] and again introduced changeset [540]

View differences:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.7.0 -------------------------------------
14 14
18-Jan-2008 Matthias Gallas
15
!	Revoked parts of changeset 547 and again introduced changeset 540
15 16
+	Added keywords to new files
16 17
18-Jan-2008 Thomas Hornik
17 18
+	added new module-based search-function
trunk/wb/admin/pages/settings2.php
123 123
// Work-out what the link should be
124 124
if($parent == '0') {
125 125
	$link = '/'.page_filename($menu_title);
126
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'.php'; 
126
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION; 
127 127
} else {
128 128
	$parent_section = '';
129 129
	$parent_titles = array_reverse(get_parent_titles($parent));
......
132 132
	}
133 133
	if($parent_section == '/') { $parent_section = ''; }
134 134
	$link = '/'.$parent_section.page_filename($menu_title);
135
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).'.php';  
135
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;  
136 136
}
137 137

  
138 138
// Check if a page with same page filename exists
......
168 168
	// First check if we need to create a new file
169 169
	if($old_link != $link) {
170 170
		// Delete old file
171
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.'.php';
171
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
172 172
		if(file_exists($old_filename)) {
173 173
			unlink($old_filename);
174 174
		}
......
194 194
					// Update level and link
195 195
					$database->query("UPDATE ".TABLE_PREFIX."pages SET link = '$new_sub_link', level = '$new_sub_level' WHERE page_id = '".$sub['page_id']."' LIMIT 1");
196 196
					// Re-write the access file for this page
197
					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php';
197
					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION;
198 198
					if(file_exists($old_subpage_file)) {
199 199
						unlink($old_subpage_file);
200 200
					}
201
					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php', $sub['page_id'], $new_sub_level);
201
					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION, $sub['page_id'], $new_sub_level);
202 202
				}
203 203
			}
204 204
		}
trunk/wb/admin/pages/add.php
68 68
// Work-out what the link and page filename should be
69 69
if($parent == '0') {
70 70
	$link = '/'.page_filename($title);
71
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).'.php';
71
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).PAGE_EXTENSION;
72 72
} else {
73 73
	$parent_section = '';
74 74
	$parent_titles = array_reverse(get_parent_titles($parent));
......
77 77
	}
78 78
	if($parent_section == '/') { $parent_section = ''; }
79 79
	$link = '/'.$parent_section.page_filename($title);
80
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($title).'.php';
80
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($title).PAGE_EXTENSION;
81 81
	make_dir(WB_PATH.PAGES_DIRECTORY.'/'.$parent_section);
82 82
}
83 83

  
84 84
// Check if a page with same page filename exists
85 85
$get_same_page = $database->query("SELECT page_id FROM ".TABLE_PREFIX."pages WHERE link = '$link'");
86
if($get_same_page->numRows() > 0 OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'.php') OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'/')) {
86
if($get_same_page->numRows() > 0 OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION) OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'/')) {
87 87
	$admin->print_error($MESSAGE['PAGES']['PAGE_EXISTS']);
88 88
}
89 89

  
trunk/wb/framework/class.admin.php
116 116
			// extract page link from the database
117 117
			$result = @$database->query("SELECT link FROM " .TABLE_PREFIX ."pages WHERE page_id = '" .(int) $_GET['page_id'] ."'");
118 118
			$row = @$result->fetchRow();
119
			if($row) $view_url .= PAGES_DIRECTORY .$row['link']. '.php';
119
			if($row) $view_url .= PAGES_DIRECTORY .$row['link']. PAGE_EXTENSION;
120 120
		}
121 121

  
122 122
		// Create the menu
trunk/wb/framework/class.wb.php
153 153
	function page_link($link){
154 154
		// Check for :// in the link (used in URL's) as well as mailto:
155 155
		if(strstr($link, '://') == '' AND substr($link, 0, 7) != 'mailto:') {
156
			return WB_URL.PAGES_DIRECTORY.$link.'.php';
156
			return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
157 157
		} else {
158 158
			return $link;
159 159
		}
trunk/wb/framework/class.frontend.php
206 206
				// Check if the user is authenticated
207 207
				if($this->is_authenticated() == false) {
208 208
					// User needs to login first
209
					header("Location: ".WB_URL."/account/login".PAGE_EXTENSION.'?redirect='.$this->link);
209
					header("Location: ".WB_URL."/account/login.php?redirect=".$this->link);
210 210
					exit(0);
211 211
				} else {
212 212
					// User isnt allowed on this page so tell them
trunk/wb/index.php
70 70
			$res=$query_link->fetchRow();
71 71
			$target_page_link = $res['link'];
72 72
			// redirect
73
			header('Location: '.WB_URL.PAGES_DIRECTORY.$target_page_link.'.php');
73
			header('Location: '.WB_URL.PAGES_DIRECTORY.$target_page_link.PAGE_EXTENSION);
74 74
			exit;
75 75
		}
76 76
	}

Also available in: Unified diff