@@ -12,6 +12,11 @@ discard block |
||
12 | 12 | class NoteModel extends NoteCoreModel |
13 | 13 | { |
14 | 14 | |
15 | + /** |
|
16 | + * @param string $iNoteId |
|
17 | + * @param integer $iOffset |
|
18 | + * @param integer $iLimit |
|
19 | + */ |
|
15 | 20 | public function getCategory($iNoteId = null, $iOffset, $iLimit, $bCount = false) |
16 | 21 | { |
17 | 22 | $this->cache->start(self::CACHE_GROUP, 'category' . $iNoteId . $iOffset . $iLimit . $bCount, static::CACHE_TIME); |
@@ -67,6 +72,9 @@ discard block |
||
67 | 72 | return $oData; |
68 | 73 | } |
69 | 74 | |
75 | + /** |
|
76 | + * @param integer $iProfileId |
|
77 | + */ |
|
70 | 78 | public function addCategory($iCategoryId, $iNoteId, $iProfileId) |
71 | 79 | { |
72 | 80 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('NotesCategories') . '(categoryId, noteId, profileId) VALUES(:categoryId, :noteId, :profileId)'); |
@@ -77,6 +85,9 @@ discard block |
||
77 | 85 | Db::free($rStmt); |
78 | 86 | } |
79 | 87 | |
88 | + /** |
|
89 | + * @param string $iProfileId |
|
90 | + */ |
|
80 | 91 | public function readPost($sPostId, $iProfileId, $iApproved = 1) |
81 | 92 | { |
82 | 93 | $this->cache->start(self::CACHE_GROUP, 'readPost' . $sPostId . $iProfileId . $iApproved, static::CACHE_TIME); |
@@ -279,6 +290,10 @@ discard block |
||
279 | 290 | return $sData; |
280 | 291 | } |
281 | 292 | |
293 | + /** |
|
294 | + * @param string $sPostId |
|
295 | + * @param integer $iProfileId |
|
296 | + */ |
|
282 | 297 | public function postIdExists($sPostId, $iProfileId) |
283 | 298 | { |
284 | 299 | $this->cache->start(self::CACHE_GROUP, 'postIdExists' . $sPostId . $iProfileId, static::CACHE_TIME); |
@@ -329,6 +344,9 @@ discard block |
||
329 | 344 | $this->updatePost('thumb', null, $iNoteId, $iProfileId); |
330 | 345 | } |
331 | 346 | |
347 | + /** |
|
348 | + * @param string $sSection |
|
349 | + */ |
|
332 | 350 | public function updatePost($sSection, $sValue, $iNoteId, $iProfileId) |
333 | 351 | { |
334 | 352 | $rStmt = Db::getInstance()->prepare('UPDATE'.Db::prefix('Notes').'SET ' . $sSection . ' = :value WHERE noteId = :noteId AND profileId = :profileId'); |
@@ -7,11 +7,10 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Config\Config, |
|
12 | -PH7\Framework\Session\Session, |
|
13 | -PH7\Framework\Mvc\Request\Http, |
|
14 | -PH7\Framework\Mvc\Router\Uri; |
|
10 | +use PH7\Framework\Config\Config; |
|
11 | +use PH7\Framework\Session\Session; |
|
12 | +use PH7\Framework\Mvc\Request\Http; |
|
13 | +use PH7\Framework\Mvc\Router\Uri; |
|
15 | 14 | |
16 | 15 | class PictureForm |
17 | 16 | { |
@@ -8,14 +8,13 @@ |
||
8 | 8 | namespace PH7; |
9 | 9 | defined('PH7') or exit('Restricted access'); |
10 | 10 | |
11 | -use |
|
12 | -PH7\Framework\Mvc\Model\Engine\Db, |
|
13 | -PH7\Framework\Image\Image, |
|
14 | -PH7\Framework\Security\Moderation\Filter, |
|
15 | -PH7\Framework\Util\Various, |
|
16 | -PH7\Framework\Mvc\Model\DbConfig, |
|
17 | -PH7\Framework\Mvc\Router\Uri, |
|
18 | -PH7\Framework\Url\Header; |
|
11 | +use PH7\Framework\Mvc\Model\Engine\Db; |
|
12 | +use PH7\Framework\Image\Image; |
|
13 | +use PH7\Framework\Security\Moderation\Filter; |
|
14 | +use PH7\Framework\Util\Various; |
|
15 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
16 | +use PH7\Framework\Mvc\Router\Uri; |
|
17 | +use PH7\Framework\Url\Header; |
|
19 | 18 | |
20 | 19 | class AlbumFormProcess extends Form |
21 | 20 | { |
@@ -11,13 +11,12 @@ |
||
11 | 11 | namespace PH7; |
12 | 12 | defined('PH7') or exit('Restricted access'); |
13 | 13 | |
14 | -use |
|
15 | -PH7\Framework\Image\Image, |
|
16 | -PH7\Framework\Security\Moderation\Filter, |
|
17 | -PH7\Framework\Util\Various, |
|
18 | -PH7\Framework\Mvc\Model\DbConfig, |
|
19 | -PH7\Framework\Mvc\Router\Uri, |
|
20 | -PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Image\Image; |
|
15 | +use PH7\Framework\Security\Moderation\Filter; |
|
16 | +use PH7\Framework\Util\Various; |
|
17 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
18 | +use PH7\Framework\Mvc\Router\Uri; |
|
19 | +use PH7\Framework\Url\Header; |
|
21 | 20 | |
22 | 21 | class PictureFormProcess extends Form |
23 | 22 | { |
@@ -12,6 +12,11 @@ discard block |
||
12 | 12 | class PictureModel extends PictureCoreModel |
13 | 13 | { |
14 | 14 | |
15 | + /** |
|
16 | + * @param string $iProfileId |
|
17 | + * @param string $sThumb |
|
18 | + * @param string $sCreatedDate |
|
19 | + */ |
|
15 | 20 | public function addAlbum($iProfileId, $sTitle, $sDescription, $sThumb, $sCreatedDate, $iApproved = 1) |
16 | 21 | { |
17 | 22 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('AlbumsPictures') . '(profileId, name, description, thumb, createdDate, approved) |
@@ -26,6 +31,12 @@ discard block |
||
26 | 31 | return $rStmt->execute(); |
27 | 32 | } |
28 | 33 | |
34 | + /** |
|
35 | + * @param string $iProfileId |
|
36 | + * @param integer $iAlbumId |
|
37 | + * @param string $sFile |
|
38 | + * @param string $sCreatedDate |
|
39 | + */ |
|
29 | 40 | public function addPhoto($iProfileId, $iAlbumId, $sTitle, $sDescription, $sFile, $sCreatedDate, $iApproved = 1) |
30 | 41 | { |
31 | 42 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Pictures') . '(profileId, albumId, title, description, file, createdDate, approved) |
@@ -49,6 +60,9 @@ discard block |
||
49 | 60 | return $rStmt->execute(); |
50 | 61 | } |
51 | 62 | |
63 | + /** |
|
64 | + * @param string $iProfileId |
|
65 | + */ |
|
52 | 66 | public function getAlbumsName($iProfileId) |
53 | 67 | { |
54 | 68 | $this->cache->start(self::CACHE_GROUP, 'albumName' . $iProfileId, static::CACHE_TIME); |
@@ -66,6 +80,13 @@ discard block |
||
66 | 80 | return $oData; |
67 | 81 | } |
68 | 82 | |
83 | + /** |
|
84 | + * @param string $iProfileId |
|
85 | + * @param string $iAlbumId |
|
86 | + * @param string $iPictureId |
|
87 | + * @param integer $iOffset |
|
88 | + * @param integer $iLimit |
|
89 | + */ |
|
69 | 90 | public function photo($iProfileId, $iAlbumId, $iPictureId = null, $iApproved = 1, $iOffset, $iLimit) |
70 | 91 | { |
71 | 92 | $this->cache->start(self::CACHE_GROUP, 'photo' . $iProfileId . $iAlbumId . $iPictureId . $iApproved . $iOffset . $iLimit, static::CACHE_TIME); |
@@ -132,6 +153,11 @@ discard block |
||
132 | 153 | return $iData; |
133 | 154 | } |
134 | 155 | |
156 | + /** |
|
157 | + * @param string $iProfileId |
|
158 | + * @param integer $iAlbumId |
|
159 | + * @param string $sUpdatedDate |
|
160 | + */ |
|
135 | 161 | public function updateAlbum($iProfileId, $iAlbumId, $sTitle, $sDescription, $sUpdatedDate) |
136 | 162 | { |
137 | 163 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('AlbumsPictures') . |
@@ -145,6 +171,12 @@ discard block |
||
145 | 171 | return $rStmt->execute(); |
146 | 172 | } |
147 | 173 | |
174 | + /** |
|
175 | + * @param string $iProfileId |
|
176 | + * @param integer $iAlbumId |
|
177 | + * @param integer $iPictureId |
|
178 | + * @param string $sUpdatedDate |
|
179 | + */ |
|
148 | 180 | public function updatePhoto($iProfileId, $iAlbumId, $iPictureId, $sTitle, $sDescription, $sUpdatedDate) |
149 | 181 | { |
150 | 182 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Pictures') . |
@@ -9,10 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | namespace PH7; |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Navigation\Page, |
|
14 | -PH7\Framework\Url\Header, |
|
15 | -PH7\Framework\Mvc\Router\Uri; |
|
12 | +use PH7\Framework\Navigation\Page; |
|
13 | +use PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
16 | 15 | |
17 | 16 | class AdminController extends Controller |
18 | 17 | { |
@@ -8,10 +8,9 @@ |
||
8 | 8 | |
9 | 9 | namespace PH7; |
10 | 10 | |
11 | -use |
|
12 | -PH7\Framework\Url\Header, |
|
13 | -PH7\Framework\Parse\Url, |
|
14 | -RobThree\Auth\TwoFactorAuth as Authenticator; |
|
11 | +use PH7\Framework\Url\Header; |
|
12 | +use PH7\Framework\Parse\Url; |
|
13 | +use RobThree\Auth\TwoFactorAuth as Authenticator; |
|
15 | 14 | |
16 | 15 | class MainController extends Controller |
17 | 16 | { |
@@ -7,10 +7,9 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Module\Various as SysMod, |
|
12 | -PH7\Framework\Mvc\Router\Uri, |
|
13 | -PH7\Framework\Url\Header; |
|
10 | +use PH7\Framework\Module\Various as SysMod; |
|
11 | +use PH7\Framework\Mvc\Router\Uri; |
|
12 | +use PH7\Framework\Url\Header; |
|
14 | 13 | |
15 | 14 | class AccountController extends Controller |
16 | 15 | { |
@@ -7,10 +7,9 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Mvc\Model\DbConfig, |
|
12 | -PH7\Framework\Navigation\Page, |
|
13 | -PH7\Framework\Geo\Map\Map; |
|
10 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
11 | +use PH7\Framework\Navigation\Page; |
|
12 | +use PH7\Framework\Geo\Map\Map; |
|
14 | 13 | |
15 | 14 | class CountryController extends Controller |
16 | 15 | { |