Project

General

Profile

« Previous | Next » 

Revision 242

Added by stefan over 18 years ago

Moved page_link function to class wb and changed page_link() in functions.php to use the wb class method

View differences:

class.frontend.php
131 131
			$this->page = $get_page->fetchRow();
132 132
			// Check if the page language is also the selected language. If not, send headers again.
133 133
			if ($this->page['language']!=LANGUAGE) {
134
				require_once(WB_PATH.'/framework/functions.php');
135 134
				header('Location: '.$this->page_link($this->page['link']).'?lang='.$this->page['language']);
136 135
				exit();
137 136
			}
......
249 248
		}
250 249
	}
251 250
	
252
	function page_link($link){
253
		// Check for :// in the link (used in URL's) as well as mailto:
254
		if(strstr($link, '://') == '' AND substr($link, 0, 7) != 'mailto:') {
255
			return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
256
		} else {
257
			return $link;
258
		}
259
	}
260
	
261 251
	function preprocess(&$content) {
262 252
		global $database;
263 253
		// Replace [wblink--PAGE_ID--] with real link

Also available in: Unified diff