@@ -16,6 +16,9 @@ discard block |
||
16 | 16 | |
17 | 17 | const CACHE_GROUP = 'db/sys/core/like'; |
18 | 18 | |
19 | + /** |
|
20 | + * @param string $sKey |
|
21 | + */ |
|
19 | 22 | public function select($sKey) |
20 | 23 | { |
21 | 24 | $this->cache->start(self::CACHE_GROUP, 'select' . $sKey, 3600 * 168); |
@@ -32,6 +35,9 @@ discard block |
||
32 | 35 | return $oData; |
33 | 36 | } |
34 | 37 | |
38 | + /** |
|
39 | + * @param string $sKey |
|
40 | + */ |
|
35 | 41 | public function update($sKey, $fLastIp) |
36 | 42 | { |
37 | 43 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Likes') . 'SET votes = votes + 1 , lastVote = NOW() , lastIp =:lastIp WHERE keyId =:key'); |
@@ -40,6 +46,9 @@ discard block |
||
40 | 46 | return $rStmt->execute(); |
41 | 47 | } |
42 | 48 | |
49 | + /** |
|
50 | + * @param string $sKey |
|
51 | + */ |
|
43 | 52 | public function insert($sKey, $fLastIp) |
44 | 53 | { |
45 | 54 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Likes') . 'SET keyId =:key ,votes=1 , lastVote = NOW(), lastIp =:lastIp'); |
@@ -17,6 +17,10 @@ discard block |
||
17 | 17 | |
18 | 18 | const CACHE_GROUP = 'db/sys/core/rating', CACHE_TIME = 604800; |
19 | 19 | |
20 | + /** |
|
21 | + * @param integer $iId |
|
22 | + * @param string $sTable |
|
23 | + */ |
|
20 | 24 | public function getVote($iId, $sTable) |
21 | 25 | { |
22 | 26 | $this->cache->start(self::CACHE_GROUP, 'getVote' . $iId . $sTable, static:: |
@@ -40,6 +44,10 @@ discard block |
||
40 | 44 | return $iData; |
41 | 45 | } |
42 | 46 | |
47 | + /** |
|
48 | + * @param integer $iId |
|
49 | + * @param string $sTable |
|
50 | + */ |
|
43 | 51 | public function getScore($iId, $sTable) |
44 | 52 | { |
45 | 53 | $this->cache->start(self::CACHE_GROUP, 'getScore' . $iId . $sTable, static:: |
@@ -63,6 +71,10 @@ discard block |
||
63 | 71 | return $fData; |
64 | 72 | } |
65 | 73 | |
74 | + /** |
|
75 | + * @param integer $iId |
|
76 | + * @param string $sTable |
|
77 | + */ |
|
66 | 78 | public function updateVotes($iId, $sTable) |
67 | 79 | { |
68 | 80 | |
@@ -75,6 +87,11 @@ discard block |
||
75 | 87 | return $rStmt->execute(); |
76 | 88 | } |
77 | 89 | |
90 | + /** |
|
91 | + * @param double $fScore |
|
92 | + * @param integer $iId |
|
93 | + * @param string $sTable |
|
94 | + */ |
|
78 | 95 | public function updateScore($fScore, $iId, $sTable) |
79 | 96 | { |
80 | 97 | $sTable = Various::checkTable($sTable); |
@@ -58,6 +58,9 @@ discard block |
||
58 | 58 | $this->_sRoutePath = PH7_PATH_APP_CONFIG . 'routes/' . $this->_sDefLangRoute . '.xml'; |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param string $sModsDirModFolder |
|
63 | + */ |
|
61 | 64 | public function setPath($sModsDirModFolder) |
62 | 65 | { |
63 | 66 | $this->_sModsDirModFolder = $sModsDirModFolder; |
@@ -275,7 +278,7 @@ discard block |
||
275 | 278 | * Note: This method is valid only for public methods, it is not necessary to check the private methods. |
276 | 279 | * @param string $sSwitch The check constant. |
277 | 280 | * |
278 | - * @return string Returns the constant if it is correct, otherwise an error message with exit() function. |
|
281 | + * @return integer|null Returns the constant if it is correct, otherwise an error message with exit() function. |
|
279 | 282 | */ |
280 | 283 | private function _checkParam($sSwitch) |
281 | 284 | { |
@@ -13,6 +13,11 @@ discard block |
||
13 | 13 | class ForumModel extends ForumCoreModel |
14 | 14 | { |
15 | 15 | |
16 | + /** |
|
17 | + * @param string $iCategoryId |
|
18 | + * @param integer $iOffset |
|
19 | + * @param integer $iLimit |
|
20 | + */ |
|
16 | 21 | public function getCategory($iCategoryId = null, $iOffset = null, $iLimit = null) |
17 | 22 | { |
18 | 23 | $bIsLimit = isset($iOffset, $iLimit); |
@@ -32,6 +37,14 @@ discard block |
||
32 | 37 | return (!empty($iCategoryId)) ? $rStmt->fetch(\PDO::FETCH_OBJ) : $rStmt->fetchAll(\PDO::FETCH_OBJ); |
33 | 38 | } |
34 | 39 | |
40 | + /** |
|
41 | + * @param string $sForumName |
|
42 | + * @param null|string $sTopicSubject |
|
43 | + * @param null|string $iProfileId |
|
44 | + * @param integer $iApproved |
|
45 | + * @param integer $iOffset |
|
46 | + * @param integer $iLimit |
|
47 | + */ |
|
35 | 48 | public function getTopic($sForumName, $iForumId, $sTopicSubject, $iTopicId, $iProfileId, $iApproved, $iOffset, $iLimit) |
36 | 49 | { |
37 | 50 | $iOffset = (int)$iOffset; |
@@ -68,6 +81,9 @@ discard block |
||
68 | 81 | return $rStmt->execute(); |
69 | 82 | } |
70 | 83 | |
84 | + /** |
|
85 | + * @param string $sCreatedDate |
|
86 | + */ |
|
71 | 87 | public function addForum($iCategoryId, $sTitle, $sDescription, $sCreatedDate) |
72 | 88 | { |
73 | 89 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Forums') . '(categoryId, name, description, createdDate) |
@@ -80,6 +96,10 @@ discard block |
||
80 | 96 | return $rStmt->execute(); |
81 | 97 | } |
82 | 98 | |
99 | + /** |
|
100 | + * @param integer $iProfileId |
|
101 | + * @param string $sCreatedDate |
|
102 | + */ |
|
83 | 103 | public function addTopic($iProfileId, $iForumId, $sTitle, $sMessage, $sCreatedDate) |
84 | 104 | { |
85 | 105 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('ForumsTopics') . '(profileId, forumId, title, message, createdDate) |
@@ -93,6 +113,10 @@ discard block |
||
93 | 113 | return $rStmt->execute(); |
94 | 114 | } |
95 | 115 | |
116 | + /** |
|
117 | + * @param integer $iProfileId |
|
118 | + * @param string $sCreatedDate |
|
119 | + */ |
|
96 | 120 | public function addMessage($iProfileId, $iTopicId, $sMessage, $sCreatedDate) |
97 | 121 | { |
98 | 122 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('ForumsMessages') . '(profileId, topicId, message, createdDate) |
@@ -115,6 +139,9 @@ discard block |
||
115 | 139 | return $rStmt->execute(); |
116 | 140 | } |
117 | 141 | |
142 | + /** |
|
143 | + * @param string $sUpdatedDate |
|
144 | + */ |
|
118 | 145 | public function updateForum($iForumId, $iCategoryId, $sName, $sDescription, $sUpdatedDate) |
119 | 146 | { |
120 | 147 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Forums') . |
@@ -128,6 +155,10 @@ discard block |
||
128 | 155 | return $rStmt->execute(); |
129 | 156 | } |
130 | 157 | |
158 | + /** |
|
159 | + * @param string $iProfileId |
|
160 | + * @param string $sUpdatedDate |
|
161 | + */ |
|
131 | 162 | public function updateTopic($iProfileId, $iTopicId, $sTitle, $sMessage, $sUpdatedDate) |
132 | 163 | { |
133 | 164 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('ForumsTopics') . |
@@ -141,6 +172,10 @@ discard block |
||
141 | 172 | return $rStmt->execute(); |
142 | 173 | } |
143 | 174 | |
175 | + /** |
|
176 | + * @param string $iProfileId |
|
177 | + * @param string $sUpdatedDate |
|
178 | + */ |
|
144 | 179 | public function updateMessage($iProfileId, $iMessageId, $sMessage, $sUpdatedDate) |
145 | 180 | { |
146 | 181 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('ForumsMessages') . |
@@ -280,6 +315,11 @@ discard block |
||
280 | 315 | return $mData; |
281 | 316 | } |
282 | 317 | |
318 | + /** |
|
319 | + * @param integer $iApproved |
|
320 | + * @param integer $iOffset |
|
321 | + * @param integer $iLimit |
|
322 | + */ |
|
283 | 323 | public function getPostByProfile($iProfileId, $iApproved, $iOffset, $iLimit) |
284 | 324 | { |
285 | 325 | $iOffset = (int)$iOffset; |
@@ -70,6 +70,9 @@ discard block |
||
70 | 70 | $this->_bIsGoogleClosure = (bool)Config::getInstance()->values['cache']['enable.js.closure_compiler_service']; |
71 | 71 | } |
72 | 72 | |
73 | + /** |
|
74 | + * @param string $sPhp |
|
75 | + */ |
|
73 | 76 | public function parsePhp($sPhp) |
74 | 77 | { |
75 | 78 | $sPhp = preg_replace('#/\*.*+\*#', '', $sPhp); # Removing PHP comments |
@@ -92,6 +95,9 @@ discard block |
||
92 | 95 | return $sHtml; |
93 | 96 | } |
94 | 97 | |
98 | + /** |
|
99 | + * @param string $sContent |
|
100 | + */ |
|
95 | 101 | public function parseCss($sContent) |
96 | 102 | { |
97 | 103 | if ($this->_bJavaCompiler) { |
@@ -143,6 +149,9 @@ discard block |
||
143 | 149 | return $sCssMinified; |
144 | 150 | } |
145 | 151 | |
152 | + /** |
|
153 | + * @param string $sContent |
|
154 | + */ |
|
146 | 155 | public function parseJs($sContent) |
147 | 156 | { |
148 | 157 | if ($this->_bJavaCompiler) { |
@@ -128,6 +128,9 @@ discard block |
||
128 | 128 | return $valid; |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param string $id |
|
133 | + */ |
|
131 | 134 | private static function recover($id) |
132 | 135 | { |
133 | 136 | if (!empty($_SESSION['pfbc'][$id]['form'])) |
@@ -151,6 +154,9 @@ discard block |
||
151 | 154 | unset($_SESSION['pfbc'][$id]['errors']); |
152 | 155 | } |
153 | 156 | |
157 | + /** |
|
158 | + * @param string $id |
|
159 | + */ |
|
154 | 160 | public static function setSessionValue($id, $element, $value) |
155 | 161 | { |
156 | 162 | $_SESSION['pfbc'][$id]['values'][$element] = $value; |
@@ -159,6 +165,9 @@ discard block |
||
159 | 165 | /*This method parses the form's width property into a numeric width value and a width suffix - either px or %. |
160 | 166 | These values are used by the form's concrete view class.*/ |
161 | 167 | |
168 | + /** |
|
169 | + * @param string $id |
|
170 | + */ |
|
162 | 171 | public static function setError($id, $messages, $element = '') |
163 | 172 | { |
164 | 173 | if (!is_array($messages)) |
@@ -186,6 +195,9 @@ discard block |
||
186 | 195 | $form->error->renderAjaxErrorResponse(); |
187 | 196 | } |
188 | 197 | |
198 | + /** |
|
199 | + * @param string $id |
|
200 | + */ |
|
189 | 201 | public static function setSuccess($id, $message, $element = '') |
190 | 202 | { |
191 | 203 | return (new Design)->setFlashMsg($message, Design::SUCCESS_TYPE); |
@@ -18,7 +18,6 @@ |
||
18 | 18 | /** |
19 | 19 | * Emit a signal. |
20 | 20 | * |
21 | - * @param mixed $mVar [, string $... ] |
|
22 | 21 | * @return string |
23 | 22 | */ |
24 | 23 | public static function emit() |