Skip to content

Commit

Permalink
[CS-5844] fix implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ahilles107 committed Jan 14, 2016
1 parent bc9b61c commit 7708dc9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions newscoop/library/Newscoop/Entity/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -1825,4 +1825,14 @@ public function setSectionId($sectionId)

return $this;
}

/**
* Get comments count
*
* @return integer
*/
public function getCommentsCount()
{
return $this->comments_count;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function editAction(Request $request, Publication $publication)
}

$publicationIssuesLanguages = array();
if (is_array($publication->getIssues())) {
foreach ($publication->getIssues() as $key => $issue) {
if ($publication->getIssues()->count() > 0) {
foreach ($publication->getIssues() as $issue) {
if (!in_array($issue->getLanguageCode(), $publicationIssuesLanguages)) {
$publicationIssuesLanguages[] = $issue->getLanguageCode();
}
Expand Down Expand Up @@ -191,7 +191,7 @@ private function processRequest($request, $form, $publication = null)
}

$publicationIssuesLanguages = array();
if (is_array($publication->getIssues())) {
if ($publication->getIssues()->count() > 0) {
foreach ($publication->getIssues() as $key => $issue) {
if (!array_key_exists($issue->getLanguageCode(), $publicationIssuesLanguages)) {
$publicationIssuesLanguages[$issue->getLanguageCode()] = $issue->getLanguage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function indexAction(Request $request)
}
}

// check if private plugins is writable
// check if private plugins is writable
$privatePluginsPathWritable = is_writable($pluginService->getPluginsDir().self::PRIVATE_PLUGINS_DIR);

// search for private plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\TranslatorInterface as Translator;
use Symfony\Component\Translation\Loader\YamlFileLoader;

/**
Expand Down

0 comments on commit 7708dc9

Please sign in to comment.