Revision 36
Added by stefan about 19 years ago
class.frontend.php | ||
---|---|---|
72 | 72 |
$content = fread($handle, filesize($filename)); |
73 | 73 |
fclose($handle); |
74 | 74 |
$this->preprocess($content); |
75 |
echo stripslashes($content); |
|
75 |
echo $this->stripslashes($content);
|
|
76 | 76 |
return false; |
77 | 77 |
} |
78 | 78 |
} |
... | ... | |
140 | 140 |
define('PAGE_ID', $this->page['page_id']); |
141 | 141 |
$this->page_id=$this->page['page_id']; |
142 | 142 |
// Page Title |
143 |
define('PAGE_TITLE', stripslashes($this->page['page_title'])); |
|
143 |
define('PAGE_TITLE', $this->stripslashes($this->page['page_title']));
|
|
144 | 144 |
$this->page_title=PAGE_TITLE; |
145 | 145 |
// Menu Title |
146 |
$menu_title = stripslashes($this->page['menu_title']); |
|
146 |
$menu_title = $this->stripslashes($this->page['menu_title']);
|
|
147 | 147 |
if($menu_title != '') { |
148 | 148 |
define('MENU_TITLE', $menu_title); |
149 | 149 |
} else { |
... | ... | |
252 | 252 |
while($setting = $get_settings->fetchRow()) { |
253 | 253 |
switch($setting['name']) { |
254 | 254 |
case 'title': |
255 |
define('WEBSITE_TITLE', stripslashes($setting['value'])); |
|
255 |
define('WEBSITE_TITLE', $this->stripslashes($setting['value']));
|
|
256 | 256 |
$this->website_title=WEBSITE_TITLE; |
257 | 257 |
break; |
258 | 258 |
case 'description': |
259 | 259 |
if($page_description != '') { |
260 | 260 |
define('WEBSITE_DESCRIPTION', $page_description); |
261 | 261 |
} else { |
262 |
define('WEBSITE_DESCRIPTION', stripslashes($setting['value'])); |
|
262 |
define('WEBSITE_DESCRIPTION', $this->stripslashes($setting['value']));
|
|
263 | 263 |
} |
264 | 264 |
$this->website_description=WEBSITE_DESCRIPTION; |
265 | 265 |
break; |
266 | 266 |
case 'keywords': |
267 | 267 |
if($page_keywords != '') { |
268 |
define('WEBSITE_KEYWORDS', stripslashes($setting['value']).' '.$page_keywords); |
|
268 |
define('WEBSITE_KEYWORDS', $this->stripslashes($setting['value']).' '.$page_keywords);
|
|
269 | 269 |
} else { |
270 |
define('WEBSITE_KEYWORDS', stripslashes($setting['value'])); |
|
270 |
define('WEBSITE_KEYWORDS', $this->stripslashes($setting['value']));
|
|
271 | 271 |
} |
272 | 272 |
$this->website_keywords=WEBSITE_KEYWORDS; |
273 | 273 |
break; |
274 | 274 |
case 'header': |
275 |
define('WEBSITE_HEADER', stripslashes($setting['value'])); |
|
275 |
define('WEBSITE_HEADER', $this->stripslashes($setting['value']));
|
|
276 | 276 |
$this->website_header=WEBSITE_HEADER; |
277 | 277 |
break; |
278 | 278 |
case 'footer': |
279 |
define('WEBSITE_FOOTER', stripslashes($setting['value'])); |
|
279 |
define('WEBSITE_FOOTER', $this->stripslashes($setting['value']));
|
|
280 | 280 |
$this->website_footer=WEBSITE_FOOTER; |
281 | 281 |
break; |
282 | 282 |
} |
... | ... | |
390 | 390 |
$link = $this->page_link($page['link']); |
391 | 391 |
} |
392 | 392 |
// Create values |
393 |
$values = array($class,'<a href="'.$link.'" target="'.$page['target'].'" '.$class.'>', '</a>', stripslashes($page['menu_title']), stripslashes($page['page_title']));
|
|
393 |
$values = array($class,'<a href="'.$link.'" target="'.$page['target'].'" '.$class.'>', '</a>', $this->stripslashes($page['menu_title']), $this->stripslashes($page['page_title']));
|
|
394 | 394 |
// Replace vars with value and print |
395 | 395 |
echo "\n".str_replace($vars, $values, $this->menu_item_template); |
396 | 396 |
// Generate sub-menu |
Also available in: Unified diff
Created new stripslashes method in class wb. Changed stripslashes() calls to method calls.