getCAPTCHA() 공개 정적인 메소드

Returns a new or the current CAPTCHA string.
public static getCAPTCHA ( boolean $new = false ) : string
$new boolean If true, a new CAPTCHA is created and returned. The current, to-be-confirmed string otherwise.
리턴 string A CAPTCHA string.
예제 #1
0
 public function validate(&$vars, $canAutoFill = false)
 {
     global $conf;
     if (!parent::validate($vars, $canAutoFill)) {
         if (!$GLOBALS['registry']->getAuth() && !empty($conf['guests']['captcha'])) {
             $vars->remove('captcha');
             $this->removeVariable($varname = 'captcha');
             $this->insertVariableBefore('newcomment', _("Spam protection"), 'captcha', 'figlet', true, null, null, array(Whups::getCAPTCHA(true), $conf['guests']['figlet_font']));
         }
         return false;
     }
     return true;
 }