Skip to content

Commit

Permalink
ModuleCategory - update
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed Sep 7, 2014
1 parent 08d7554 commit 3a67f0d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions classes/modules/category/Category.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function InitConfigMainPreview() {
}

/**
* @param $aFile
* @param array $aFile
*
* @return bool
*/
Expand All @@ -57,7 +57,7 @@ public function UploadCategoryAvatar($aFile) {
}

/**
* @param $oCategory
* @param object $oCategory
*
* @return bool
*/
Expand All @@ -67,19 +67,30 @@ public function DeleteCategoryAvatar($oCategory) {
if ($sUrl = $oCategory->getAvatar()) {
return $this->Img_Delete($this->Uploader_Url2Dir($sUrl));
}
return true;
}

/**
* @param $aBlogId
* @param array $aBlogsId
*
* @return mixed
* @return array
*/
public function GetCategoriesByBlogId($aBlogId) {
public function GetCategoriesByBlogId($aBlogsId) {

$aBlogId = $this->_entitiesId($aBlogId);
return $this->oMapper->GetCategoriesByBlogId($aBlogId);
$aBlogsId = $this->_entitiesId($aBlogsId);
if ($aBlogsId) {
$aResult = $this->oMapper->GetCategoriesByBlogId($aBlogsId);
} else {
$aResult = array();
}
return $aResult;
}

/**
* @param array $aUrls
*
* @return array
*/
public function GetCategoriesByUrl($aUrls) {

$sCacheKey = 'categories_by_url_' . serialize($aUrls);
Expand All @@ -95,6 +106,12 @@ public function GetCategoriesByUrl($aUrls) {
return $aCategories;
}

/**
* @param $oEntity1
* @param $oEntity2
*
* @return int
*/
public function _sortByTmpOrders($oEntity1, $oEntity2) {

if ($oEntity1->getProp('_order') == $oEntity2->getProp('_order')) {
Expand Down
Binary file added config/logo200x200.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a67f0d

Please sign in to comment.