@@ -12,6 +12,13 @@ discard block |
||
12 | 12 | |
13 | 13 | class PictureModel extends PictureCoreModel |
14 | 14 | { |
15 | + /** |
|
16 | + * @param string $iProfileId |
|
17 | + * @param string $sTitle |
|
18 | + * @param string $sDescription |
|
19 | + * @param string $sThumb |
|
20 | + * @param string $sCreatedDate |
|
21 | + */ |
|
15 | 22 | public function addAlbum($iProfileId, $sTitle, $sDescription, $sThumb, $sCreatedDate, $iApproved = 1) |
16 | 23 | { |
17 | 24 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('AlbumsPictures') . '(profileId, name, description, thumb, createdDate, approved) |
@@ -27,6 +34,13 @@ discard block |
||
27 | 34 | return $rStmt->execute(); |
28 | 35 | } |
29 | 36 | |
37 | + /** |
|
38 | + * @param string $iProfileId |
|
39 | + * @param integer $iAlbumId |
|
40 | + * @param string $sTitle |
|
41 | + * @param string $sFile |
|
42 | + * @param string $sCreatedDate |
|
43 | + */ |
|
30 | 44 | public function addPhoto($iProfileId, $iAlbumId, $sTitle, $sDescription, $sFile, $sCreatedDate, $iApproved = 1) |
31 | 45 | { |
32 | 46 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Pictures') . '(profileId, albumId, title, description, file, createdDate, approved) |
@@ -52,6 +66,9 @@ discard block |
||
52 | 66 | return $rStmt->execute(); |
53 | 67 | } |
54 | 68 | |
69 | + /** |
|
70 | + * @param string $iProfileId |
|
71 | + */ |
|
55 | 72 | public function getAlbumsName($iProfileId) |
56 | 73 | { |
57 | 74 | $this->cache->start(self::CACHE_GROUP, 'albumName' . $iProfileId, static::CACHE_TIME); |
@@ -69,6 +86,13 @@ discard block |
||
69 | 86 | return $oData; |
70 | 87 | } |
71 | 88 | |
89 | + /** |
|
90 | + * @param string $iProfileId |
|
91 | + * @param string $iAlbumId |
|
92 | + * @param string $iPictureId |
|
93 | + * @param integer $iOffset |
|
94 | + * @param integer $iLimit |
|
95 | + */ |
|
72 | 96 | public function photo($iProfileId, $iAlbumId, $iPictureId = null, $iApproved = 1, $iOffset, $iLimit) |
73 | 97 | { |
74 | 98 | $this->cache->start(self::CACHE_GROUP, 'photo' . $iProfileId . $iAlbumId . $iPictureId . $iApproved . $iOffset . $iLimit, static::CACHE_TIME); |
@@ -135,6 +159,13 @@ discard block |
||
135 | 159 | return $iData; |
136 | 160 | } |
137 | 161 | |
162 | + /** |
|
163 | + * @param string $iProfileId |
|
164 | + * @param integer $iAlbumId |
|
165 | + * @param string $sTitle |
|
166 | + * @param string $sDescription |
|
167 | + * @param string $sUpdatedDate |
|
168 | + */ |
|
138 | 169 | public function updateAlbum($iProfileId, $iAlbumId, $sTitle, $sDescription, $sUpdatedDate) |
139 | 170 | { |
140 | 171 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('AlbumsPictures') . |
@@ -149,6 +180,14 @@ discard block |
||
149 | 180 | return $rStmt->execute(); |
150 | 181 | } |
151 | 182 | |
183 | + /** |
|
184 | + * @param string $iProfileId |
|
185 | + * @param integer $iAlbumId |
|
186 | + * @param integer $iPictureId |
|
187 | + * @param string $sTitle |
|
188 | + * @param string $sDescription |
|
189 | + * @param string $sUpdatedDate |
|
190 | + */ |
|
152 | 191 | public function updatePhoto($iProfileId, $iAlbumId, $iPictureId, $sTitle, $sDescription, $sUpdatedDate) |
153 | 192 | { |
154 | 193 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Pictures') . |
@@ -12,6 +12,10 @@ discard block |
||
12 | 12 | |
13 | 13 | class VideoModel extends VideoCoreModel |
14 | 14 | { |
15 | + /** |
|
16 | + * @param string $sTitle |
|
17 | + * @param string $sThumb |
|
18 | + */ |
|
15 | 19 | public function addAlbum($iProfileId, $sTitle, $sDescription, $sThumb, $sCreatedDate, $iApproved = 1) |
16 | 20 | { |
17 | 21 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('AlbumsVideos') . '(profileId, name, description, thumb, createdDate, approved) |
@@ -27,6 +31,14 @@ discard block |
||
27 | 31 | return $rStmt->execute(); |
28 | 32 | } |
29 | 33 | |
34 | + /** |
|
35 | + * @param string $iProfileId |
|
36 | + * @param integer $iAlbumId |
|
37 | + * @param string $sTitle |
|
38 | + * @param string $sFile |
|
39 | + * @param string $sThumb |
|
40 | + * @param string $sCreatedDate |
|
41 | + */ |
|
30 | 42 | public function addVideo($iProfileId, $iAlbumId, $sTitle, $sDescription, $sFile, $sThumb, $sDuration, $sCreatedDate, $iApproved = 1) |
31 | 43 | { |
32 | 44 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Videos') . '(profileId, albumId, title, description, file, thumb, duration, createdDate, approved) |
@@ -54,6 +66,9 @@ discard block |
||
54 | 66 | return $rStmt->execute(); |
55 | 67 | } |
56 | 68 | |
69 | + /** |
|
70 | + * @param string $iProfileId |
|
71 | + */ |
|
57 | 72 | public function getAlbumsName($iProfileId) |
58 | 73 | { |
59 | 74 | $this->cache->start(self::CACHE_GROUP, 'albumName' . $iProfileId, static::CACHE_TIME); |
@@ -71,6 +86,13 @@ discard block |
||
71 | 86 | return $oData; |
72 | 87 | } |
73 | 88 | |
89 | + /** |
|
90 | + * @param string $iProfileId |
|
91 | + * @param string $iAlbumId |
|
92 | + * @param string $iVideoId |
|
93 | + * @param integer $iOffset |
|
94 | + * @param integer $iLimit |
|
95 | + */ |
|
74 | 96 | public function video($iProfileId, $iAlbumId, $iVideoId = null, $iApproved = 1, $iOffset, $iLimit) |
75 | 97 | { |
76 | 98 | $this->cache->start(self::CACHE_GROUP, 'video' . $iProfileId . $iAlbumId . $iVideoId . $iApproved . $iOffset . $iLimit, static::CACHE_TIME); |
@@ -137,6 +159,10 @@ discard block |
||
137 | 159 | return $iData; |
138 | 160 | } |
139 | 161 | |
162 | + /** |
|
163 | + * @param integer $iAlbumId |
|
164 | + * @param string $sTitle |
|
165 | + */ |
|
140 | 166 | public function updateAlbum($iProfileId, $iAlbumId, $sTitle, $sDescription, $sUpdatedDate) |
141 | 167 | { |
142 | 168 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('AlbumsVideos') . 'SET name =:name, description =:description, updatedDate =:updatedDate |
@@ -151,6 +177,14 @@ discard block |
||
151 | 177 | return $rStmt->execute(); |
152 | 178 | } |
153 | 179 | |
180 | + /** |
|
181 | + * @param string $iProfileId |
|
182 | + * @param integer $iAlbumId |
|
183 | + * @param integer $iVideoId |
|
184 | + * @param string $sTitle |
|
185 | + * @param string $sDescription |
|
186 | + * @param string $sUpdatedDate |
|
187 | + */ |
|
154 | 188 | public function updateVideo($iProfileId, $iAlbumId, $iVideoId, $sTitle, $sDescription, $sUpdatedDate) |
155 | 189 | { |
156 | 190 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Videos') . 'SET title =:title, description =:description, updatedDate =:updatedDate |
@@ -72,6 +72,9 @@ discard block |
||
72 | 72 | $this->bIsGoogleClosure = (bool)Config::getInstance()->values['cache']['enable.js.closure_compiler_service']; |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @param string $sPhp |
|
77 | + */ |
|
75 | 78 | public function parsePhp($sPhp) |
76 | 79 | { |
77 | 80 | $sPhp = preg_replace('#/\*.*+\*#', '', $sPhp); # Removing PHP comments |
@@ -80,6 +83,9 @@ discard block |
||
80 | 83 | return $sPhp; |
81 | 84 | } |
82 | 85 | |
86 | + /** |
|
87 | + * @return string |
|
88 | + */ |
|
83 | 89 | public function parseHtml($sHtml) |
84 | 90 | { |
85 | 91 | preg_match_all('!(<(?:code|pre).*>[^<]+</(?:code|pre)>)!', $sHtml, $aPre); # Exclude pre or code tags |
@@ -98,6 +104,9 @@ discard block |
||
98 | 104 | return $sHtml; |
99 | 105 | } |
100 | 106 | |
107 | + /** |
|
108 | + * @param string $sContent |
|
109 | + */ |
|
101 | 110 | public function parseCss($sContent) |
102 | 111 | { |
103 | 112 | if ($this->bJavaCompiler) { |
@@ -149,6 +158,9 @@ discard block |
||
149 | 158 | return $sCssMinified; |
150 | 159 | } |
151 | 160 | |
161 | + /** |
|
162 | + * @param string $sContent |
|
163 | + */ |
|
152 | 164 | public function parseJs($sContent) |
153 | 165 | { |
154 | 166 | if ($this->bJavaCompiler) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | /** |
139 | 139 | * Check if file exists. |
140 | 140 | * |
141 | - * @param array|string $mFile |
|
141 | + * @param string $mFile |
|
142 | 142 | * |
143 | 143 | * @return boolean TRUE if file exists, FALSE otherwise. |
144 | 144 | */ |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | * @param string $sFrom File or directory. |
341 | 341 | * @param string $sTo File or directory. |
342 | 342 | * |
343 | - * @return integer|boolean Returns the last line on success, and FALSE on failure. |
|
343 | + * @return string|false Returns the last line on success, and FALSE on failure. |
|
344 | 344 | */ |
345 | 345 | public function systemCopy($sFrom, $sTo) |
346 | 346 | { |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | * @param string $sFrom File or directory. |
391 | 391 | * @param string $sTo File or directory. |
392 | 392 | * |
393 | - * @return integer|boolean Returns the last line on success, and FALSE on failure. |
|
393 | + * @return string|false Returns the last line on success, and FALSE on failure. |
|
394 | 394 | */ |
395 | 395 | public function systemRename($sFrom, $sTo) |
396 | 396 | { |
@@ -135,6 +135,9 @@ discard block |
||
135 | 135 | return $valid; |
136 | 136 | } |
137 | 137 | |
138 | + /** |
|
139 | + * @param string $id |
|
140 | + */ |
|
138 | 141 | private static function recover($id) |
139 | 142 | { |
140 | 143 | if (!empty($_SESSION['pfbc'][$id]['form'])) { |
@@ -158,6 +161,9 @@ discard block |
||
158 | 161 | } |
159 | 162 | } |
160 | 163 | |
164 | + /** |
|
165 | + * @param string $id |
|
166 | + */ |
|
161 | 167 | public static function setSessionValue($id, $element, $value) |
162 | 168 | { |
163 | 169 | $_SESSION['pfbc'][$id]['values'][$element] = $value; |
@@ -166,6 +172,7 @@ discard block |
||
166 | 172 | /** |
167 | 173 | * Validation errors are saved in the session after the form submission, and will be displayed to the user |
168 | 174 | * when redirected back to the form. |
175 | + * @param string $id |
|
169 | 176 | */ |
170 | 177 | public static function setError($id, $messages, $element = '') |
171 | 178 | { |
@@ -204,6 +211,9 @@ discard block |
||
204 | 211 | } |
205 | 212 | } |
206 | 213 | |
214 | + /** |
|
215 | + * @param string $id |
|
216 | + */ |
|
207 | 217 | public static function setSuccess($id, $message, $element = '') |
208 | 218 | { |
209 | 219 | return (new Design)->setFlashMsg($message, Design::SUCCESS_TYPE); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * |
273 | 273 | * @param string $sStatement |
274 | 274 | * |
275 | - * @return mixed |
|
275 | + * @return string |
|
276 | 276 | */ |
277 | 277 | public function queryFetchColAssoc($sStatement) |
278 | 278 | { |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | /** |
319 | 319 | * Count the number of requests. |
320 | 320 | * |
321 | - * @return float number |
|
321 | + * @return integer number |
|
322 | 322 | */ |
323 | 323 | public static function queryCount() |
324 | 324 | { |
@@ -106,6 +106,9 @@ |
||
106 | 106 | var $_fd; |
107 | 107 | var $_length; |
108 | 108 | |
109 | + /** |
|
110 | + * @param string $filename |
|
111 | + */ |
|
109 | 112 | public function __construct($filename) |
110 | 113 | { |
111 | 114 | if (file_exists($filename)) { |
@@ -227,7 +227,6 @@ |
||
227 | 227 | /** |
228 | 228 | * Language helper function. |
229 | 229 | * |
230 | - * @param string $sVar [, string $... ] |
|
231 | 230 | * |
232 | 231 | * @return string Returns the text with gettext function or language in an array (this depends on whether a key language was found in the language table). |
233 | 232 | */ |
@@ -88,7 +88,7 @@ |
||
88 | 88 | /** |
89 | 89 | * @param string $sUrl |
90 | 90 | * |
91 | - * @return string|bool The embed URL if id is valid, false otherwise. |
|
91 | + * @return false|string The embed URL if id is valid, false otherwise. |
|
92 | 92 | */ |
93 | 93 | public function getEmbedUrl($sUrl) |
94 | 94 | { |