@@ 49-59 (lines=11) @@ | ||
46 | $this->random_id = $this->validIDs[$this->random_id]; |
|
47 | } |
|
48 | ||
49 | public function get_question() |
|
50 | { |
|
51 | $dataset = DataSetFactory::getDataSetByName('profiles'); |
|
52 | $datatable = $dataset['captcha']; |
|
53 | $data = $datatable->read(new \Data\Filter('id eq '.$this->random_id), array('question')); |
|
54 | if($data === false) |
|
55 | { |
|
56 | return false; |
|
57 | } |
|
58 | return $data[0]['question']; |
|
59 | } |
|
60 | ||
61 | public function get_hint() |
|
62 | { |
|
@@ 61-71 (lines=11) @@ | ||
58 | return $data[0]['question']; |
|
59 | } |
|
60 | ||
61 | public function get_hint() |
|
62 | { |
|
63 | $dataset = DataSetFactory::getDataSetByName('profiles'); |
|
64 | $datatable = $dataset['captcha']; |
|
65 | $data = $datatable->read(new \Data\Filter('id eq '.$this->random_id), array('hint')); |
|
66 | if($data === false) |
|
67 | { |
|
68 | return false; |
|
69 | } |
|
70 | return $data[0]['hint']; |
|
71 | } |
|
72 | ||
73 | private function get_answer() |
|
74 | { |
|
@@ 73-83 (lines=11) @@ | ||
70 | return $data[0]['hint']; |
|
71 | } |
|
72 | ||
73 | private function get_answer() |
|
74 | { |
|
75 | $dataset = DataSetFactory::getDataSetByName('profiles'); |
|
76 | $datatable = $dataset['captcha']; |
|
77 | $data = $datatable->read(new \Data\Filter('id eq '.$this->random_id), array('answer')); |
|
78 | if($data === false) |
|
79 | { |
|
80 | return false; |
|
81 | } |
|
82 | return $data[0]['answer']; |
|
83 | } |
|
84 | ||
85 | public function is_answer_right($answer) |
|
86 | { |