@@ -6,7 +6,8 @@ |
||
| 6 | 6 | * @package PH7 / App / System / Module / Note / Inc / Class |
| 7 | 7 | */ |
| 8 | 8 | namespace PH7; |
| 9 | -use PH7\Framework\Util\Various, PH7\Framework\Config\Config; |
|
| 9 | +use PH7\Framework\Util\Various; |
|
| 10 | +use PH7\Framework\Config\Config; |
|
| 10 | 11 | |
| 11 | 12 | class Note extends WriteCore |
| 12 | 13 | { |
@@ -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 string $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); |
@@ -273,6 +284,10 @@ discard block |
||
| 273 | 284 | return $sData; |
| 274 | 285 | } |
| 275 | 286 | |
| 287 | + /** |
|
| 288 | + * @param string $sPostId |
|
| 289 | + * @param integer $iProfileId |
|
| 290 | + */ |
|
| 276 | 291 | public function postIdExists($sPostId, $iProfileId) |
| 277 | 292 | { |
| 278 | 293 | $this->cache->start(self::CACHE_GROUP, 'postIdExists' . $sPostId . $iProfileId, static::CACHE_TIME); |
@@ -323,6 +338,9 @@ discard block |
||
| 323 | 338 | $this->updatePost('thumb', null, $iNoteId, $iProfileId); |
| 324 | 339 | } |
| 325 | 340 | |
| 341 | + /** |
|
| 342 | + * @param string $sSection |
|
| 343 | + */ |
|
| 326 | 344 | public function updatePost($sSection, $sValue, $iNoteId, $iProfileId) |
| 327 | 345 | { |
| 328 | 346 | $rStmt = Db::getInstance()->prepare('UPDATE'.Db::prefix('Notes').'SET ' . $sSection . ' = :value WHERE noteId = :noteId AND profileId = :profileId'); |
@@ -9,7 +9,8 @@ |
||
| 9 | 9 | * @version 1.0 |
| 10 | 10 | */ |
| 11 | 11 | namespace PH7; |
| 12 | -use PH7\Framework\Url\Header, PH7\Framework\Mvc\Router\Uri; |
|
| 12 | +use PH7\Framework\Url\Header; |
|
| 13 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 13 | 14 | |
| 14 | 15 | class AdminController extends MainController |
| 15 | 16 | { |
@@ -10,9 +10,8 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | namespace PH7; |
| 12 | 12 | |
| 13 | -use |
|
| 14 | -PH7\Framework\Mvc\Model\DbConfig, |
|
| 15 | -PH7\Framework\Mail\Mail; |
|
| 13 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
| 14 | +use PH7\Framework\Mail\Mail; |
|
| 16 | 15 | |
| 17 | 16 | class MainController extends Controller |
| 18 | 17 | { |
@@ -10,7 +10,8 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | namespace PH7; |
| 12 | 12 | |
| 13 | -use PH7\Framework\Registry\Registry, PH7\Framework\Ip\Ip; |
|
| 13 | +use PH7\Framework\Registry\Registry; |
|
| 14 | +use PH7\Framework\Ip\Ip; |
|
| 14 | 15 | |
| 15 | 16 | trait Api |
| 16 | 17 | { |
@@ -6,7 +6,8 @@ |
||
| 6 | 6 | * @package PH7 / App / System / Module / Picture / Controller |
| 7 | 7 | */ |
| 8 | 8 | namespace PH7; |
| 9 | -use PH7\Framework\Security\Ban\Ban, PH7\Framework\Navigation\Page; |
|
| 9 | +use PH7\Framework\Security\Ban\Ban; |
|
| 10 | +use PH7\Framework\Navigation\Page; |
|
| 10 | 11 | |
| 11 | 12 | class MainController extends Controller |
| 12 | 13 | { |
@@ -7,10 +7,9 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | namespace PH7; |
| 9 | 9 | |
| 10 | -use |
|
| 11 | -PH7\Framework\Session\Session, |
|
| 12 | -PH7\Framework\Mvc\Request\Http, |
|
| 13 | -PH7\Framework\Mvc\Router\Uri; |
|
| 10 | +use PH7\Framework\Session\Session; |
|
| 11 | +use PH7\Framework\Mvc\Request\Http; |
|
| 12 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 14 | 13 | |
| 15 | 14 | class PictureForm |
| 16 | 15 | { |
@@ -8,13 +8,12 @@ |
||
| 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\Util\Various, |
|
| 15 | -PH7\Framework\Mvc\Model\DbConfig, |
|
| 16 | -PH7\Framework\Mvc\Router\Uri, |
|
| 17 | -PH7\Framework\Url\Header; |
|
| 11 | +use PH7\Framework\Mvc\Model\Engine\Db; |
|
| 12 | +use PH7\Framework\Image\Image; |
|
| 13 | +use PH7\Framework\Util\Various; |
|
| 14 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
| 15 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 16 | +use PH7\Framework\Url\Header; |
|
| 18 | 17 | |
| 19 | 18 | class AlbumFormProcess extends Form |
| 20 | 19 | { |
@@ -8,7 +8,8 @@ |
||
| 8 | 8 | namespace PH7; |
| 9 | 9 | defined('PH7') or exit('Restricted access'); |
| 10 | 10 | |
| 11 | -use PH7\Framework\Mvc\Router\Uri, PH7\Framework\Url\Header; |
|
| 11 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 12 | +use PH7\Framework\Url\Header; |
|
| 12 | 13 | |
| 13 | 14 | class EditAlbumFormProcess extends Form |
| 14 | 15 | { |