Revision 40
Added by stefan about 19 years ago
class.wb.php | ||
---|---|---|
30 | 30 |
This class is the basis for admin and frontend classes. |
31 | 31 |
|
32 | 32 |
*/ |
33 |
if(!defined('WB_URL')) { |
|
34 |
header('Location: ../index.php'); |
|
35 |
} |
|
36 | 33 |
|
37 |
|
|
38 | 34 |
class wb |
39 | 35 |
{ |
40 | 36 |
function wb() { |
... | ... | |
74 | 70 |
} |
75 | 71 |
|
76 | 72 |
// Modified addslashes function which takes into account magic_quotes |
77 |
function addslashes($input) { |
|
73 |
function add_slashes($input) { |
|
74 |
return addslashes($input); |
|
78 | 75 |
if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) { |
79 | 76 |
return $input; |
80 | 77 |
} |
81 |
$output = stripslashes($input);
|
|
78 |
$output = addslashes($input);
|
|
82 | 79 |
return $output; |
83 | 80 |
} |
84 | 81 |
|
85 | 82 |
// Ditto for stripslashes |
86 |
function stripslashes($input) { |
|
83 |
function strip_slashes($input) {
|
|
87 | 84 |
if ( !get_magic_quotes_gpc() || ( !is_string($input) ) ) { |
88 | 85 |
return $input; |
89 | 86 |
} |
... | ... | |
154 | 151 |
|
155 | 152 |
// Get the current users display name |
156 | 153 |
function get_display_name() { |
157 |
return $this->stripslashes($_SESSION['DISPLAY_NAME']); |
|
154 |
return $this->strip_slashes($_SESSION['DISPLAY_NAME']);
|
|
158 | 155 |
} |
159 | 156 |
|
160 | 157 |
// Get the current users email address |
Also available in: Unified diff
Change addslashes,stripslashes to (wb class) method calls add_slashes,strip_slashes