Project

General

Profile

« Previous | Next » 

Revision 38

Added by stefan about 19 years ago

Reworked search.php, fixed typo in media/browse.html.

View differences:

class.wb.php
36 36

  
37 37

  
38 38
class wb
39
{
40
	function wb() {
41
	}
42

  
39
{
40

  
43 41
	// Check whether we should show a page or not (for front-end)
44 42
	function show_page($page) {
45 43
		// First check if the page is set to private
......
72 70
			return false;
73 71
		}
74 72
	}
73

  
74
	// Modified addslashes function which takes into account magic_quotes
75
	function addslashes($input) {
76
		if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) {
77
			return $input;
78
		}
79
		$output = stripslashes($input);
80
		return $output;
81
	}
75 82

  
83
	// Ditto for stripslashes
76 84
	function stripslashes($input) {
77 85
		if ( !get_magic_quotes_gpc() || ( !is_string($input) ) ) {
78 86
			return $input;
......
81 89
		return $output;
82 90
	}
83 91

  
92
	// Escape backslashes for use with mySQL LIKE strings
93
	function escape_backslashes($input) {
94
		return str_replace("\\","\\\\",$output);
95
	}
96

  
84 97
	// Get POST data
85 98
	function get_post($field) {
86 99
		if(isset($_POST[$field])) {

Also available in: Unified diff