Lines Matching full:if
9 if(!defined('DOKU_INC')) die();
17 * @param string or array $ip - Do nothing about the IP address if empty
18 * @param string or array $email - Do nothing about the e-mail address if empty
19 * @param string or array $username - Do nothing about the user name if empty
20 …* @param string $wildcards - Specify the wildcards if necessary. Create the string of wildcards d…
25 if ($ip == null and $email == null and $username == null) return array();
36 if ($wildcards != null) $data .= '&' . preg_replace('/[^a-z0-9&=]+/', '', $wildcards);
40 if ($this->ch) {
56 * @param string $ip - Do nothing about the IP address if empty
57 * @param string $email - Do nothing about the e-mail address if empty
58 * @param string $username - Do nothing about the user name if empty
59 …If true, this function returns the frequency score itself. If false, it checks whether or not the…
60 …nf "freqBorder" will be used if empty or minus value. If $returnvalue is TRUE, the $border will b…
61 …if $returnvalue is false) or array (otherwise) - The boolean will be TRUE if the user is regarded …
67 if ($ip == null and $email == null and $username == null) return FALSE;
69 if ($border === null or $border < 0) $border = $this->getConf('freqBorder');
70 if ($border == 0 and $returnvalue == FALSE) return FALSE;
71 if ($this->whitelists and $returnvalue == FALSE) return FALSE;
76 …if (isset($resultarray['ip']['frequency'])) $ipfreq = $resultarray['ip']['frequency']; else $ipfre…
77 …if (isset($resultarray['email']['frequency'])) $emailfreq = $resultarray['email']['frequency']; el…
78 …if (isset($resultarray['username']['frequency'])) $namefreq = $resultarray['username']['frequency'…
79 …if (isset($resultarray['ip']['confidence'])) $ipconf = $resultarray['ip']['confidence']; else $ipc…
80 …if (isset($resultarray['email']['confidence'])) $emailconf = $resultarray['email']['confidence']; …
81 …if (isset($resultarray['username']['confidence'])) $nameconf = $resultarray['username']['confidenc…
83 … if ($returnvalue) return array('ip' => $ipfreq, 'email' => $emailfreq, 'username' => $namefreq);
85 if ($ipfreq >= $border or $emailfreq >= $border or $namefreq >= $border) {
87 if ($logfilename == '') return TRUE;
88 if ($loghandle = fopen($logfilename, 'a')) {
90 …if ($ip != '') $logcontent .= "IP: " . $ip .", frequency " . $ipfreq . ", confidence " . $ipconf .…
91 …if ($email != '') $logcontent .= "E-mail Address: " . $email .", frequency " . $emailfreq . ", con…
92 …if ($username != '') $logcontent .= "User Name: " . $username .", frequency " . $namefreq . ", con…
104 * @param string $ip - Do nothing about the IP address if empty
105 * @param string $email - Do nothing about the e-mail address if empty
106 * @param string $username - Do nothing about the user name if empty
107 …If true, this function returns the confidence score itself. If false, it checks whether or not th…
108 …nfidenceBorder" will be used if empty or minus value. If $returnvalue is TRUE, the $border will b…
109 …if $returnvalue is false) or array (otherwise) - The boolean will be TRUE if the user is regarded …
115 if ($ip == null and $email == null and $username == null) return FALSE;
117 if ($border === null or $border < 0) $border = $this->getConf('confidenceBorder');
118 if ($border == 0 and $returnvalue == FALSE) return FALSE;
119 if ($this->whitelists and $returnvalue == FALSE) return FALSE;
124 …if (isset($resultarray['ip']['confidence'])) $ipconf = $resultarray['ip']['confidence']; else $ipc…
125 …if (isset($resultarray['email']['confidence'])) $emailconf = $resultarray['email']['confidence']; …
126 …if (isset($resultarray['username']['confidence'])) $nameconf = $resultarray['username']['confidenc…
127 …if (isset($resultarray['ip']['frequency'])) $ipfreq = $resultarray['ip']['frequency']; else $ipfre…
128 …if (isset($resultarray['email']['frequency'])) $emailfreq = $resultarray['email']['frequency']; el…
129 …if (isset($resultarray['username']['frequency'])) $namefreq = $resultarray['username']['frequency'…
131 … if ($returnvalue) return array('ip' => $ipconf, 'email' => $emailconf, 'username' => $nameconf);
133 if ($ipconf >= $border or $emailconf >= $border or $nameconf >= $border) {
135 if ($logfilename == '') return TRUE;
136 if ($loghandle = fopen($logfilename, 'a')) {
138 …if ($ip != '') $logcontent .= "IP: " . $ip .", frequency " . $ipfreq . ", confidence " . $ipconf .…
139 …if ($email != '') $logcontent .= "E-mail Address: " . $email .", frequency " . $emailfreq . ", con…
140 …if ($username != '') $logcontent .= "User Name: " . $username .", frequency " . $namefreq . ", con…
153 * @param string $ip - Remote IP address will be used if empty
154 … value $freqborder - The conf "freqBorder" will be used if empty or minus value. Don't check if 0.
155 … $confborder - The conf "confidenceBorder" will be used if empty or minus value. Don't check if 0.
156 …* @return boolean - TRUE if the function freqcheck, confcheck, or both is(are) TRUE, FALSE otherwi…
159 if ($ip == '') $ip = $_SERVER['REMOTE_ADDR'];
165 if ($freqcheck or $confcheck) return TRUE; else return FALSE;
176 …=> [TRUE if succeeded, or FALSE if failed], 'message' => [a message that indicates whether or not …
179 …if ($ip == null or $email == null or $username == null) return array('succeeded' => FALSE, 'messag…
181 … if ($api == '') return array('succeeded' => FALSE, 'message' => $this->getLang('lackingAPI'));
195 if ($this->ch) {
204 …if ($detail['http_code'] == '200') return array('succeeded' => TRUE, 'message' => $this->getLang('…
215 * @return boolean - TRUE if he is in the whitelist(s), FALSE otherwise
228 if ($checking == '') continue;
230 if (preg_match($prefix, $ip)) return TRUE;
243 if ($checking == '') continue;
245 if (preg_match($prefix, $username)) return TRUE;
265 if ($checking == '') continue;
267 if (preg_match($prefix, $ascii)) return TRUE;
268 if (preg_match($prefix, $utf8)) return TRUE;
272 if ($this->getConf('skipMgAndSp') == 'mg' && auth_ismanager()) return TRUE;
273 if ($this->getConf('skipMgAndSp') == 'sp' && auth_isadmin()) return TRUE;
274 if ($this->getConf('skipMgAndSp') == 'user' && $_SERVER['REMOTE_USER']) return TRUE;
277 …if(auth_isMember($this->getConf('userWhitelist'), $_SERVER['REMOTE_USER'], (array) $USERINFO['grps…