Skip to content

Commit

Permalink
refs #1067 : bugfix - category entry number was incorrect.
Browse files Browse the repository at this point in the history
 -
  • Loading branch information
inureyes committed Jan 21, 2015
1 parent 3fa9c50 commit 518f5cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions library/model/blog.category.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function modifyCategory($blogid, $id, $name, $bodyid) {
$pool = DBModel::getInstance();
$pool->reset("Categories");
$pool->setAlias("Categories","c");
$pool->extend("Categories p","left",array("c.parent","eq","p.id"));
$pool->extend("Categories p","left",array(array("c.parent","eq","p.id")));
$pool->setQualifier("c.blogid","eq",$blogid);
$pool->setQualifier("c.id","eq",$id);

Expand Down Expand Up @@ -561,7 +561,7 @@ function moveCategory($blogid, $id, $direction) {
$nextPriority = '';
$pool->reset("Categories");
$pool->setAlias("Categories","c");
$pool->extend("Categories p","left",array("p.id","eq","c.parent"));
$pool->extend("Categories p","left",array(array("p.id","eq","c.parent")));
$pool->setQualifier("c.id","eq",$id);
$pool->setQualifier("c.blogid","eq",$blogid);
$row = $pool->getRow("p.id AS parentId, p.priority AS parentPriority, p.parent AS parentParent, c.priority AS myPriority, c.parent AS myParent");
Expand Down
6 changes: 3 additions & 3 deletions library/view/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ function printTreeView($tree, $selected, $embedJava = false, $xhtml=false) {
echo ' <a href="'.$ctx->getProperty('uri.default').'/atom" class="categoryFeed"><span class="text">ATOM</span></a>'.CRLF;
echo "<a href=\"", htmlspecialchars($tree['link']), '" class="categoryItem">', htmlspecialchars($tree['label']);
if ($skin['showValue'])
echo " <span class=\"c_cnt\">({$tree['value']})</span>";
echo " <span class=\"c_cnt\">{$tree['value']}</span>";
echo "</a>".CRLF;
if (sizeof($tree['children']) > 0) {
echo '<ul>'.CRLF;
Expand All @@ -635,7 +635,7 @@ function printTreeView($tree, $selected, $embedJava = false, $xhtml=false) {
echo ' <a href="'.$child['atomlink'].'" class="categoryFeed"><span class="text">ATOM</span></a>'.CRLF;
echo "<a href=\"", htmlspecialchars($child['link']), '" class="categoryItem">', htmlspecialchars($child['label']);
if ($skin['showValue'])
echo " <span class=\"c_cnt\">({$child['value']})</span>";
echo " <span class=\"c_cnt\">{$child['value']}</span>";
echo "</a>".CRLF;

if (sizeof($child['children']) > 0) {
Expand All @@ -653,7 +653,7 @@ function printTreeView($tree, $selected, $embedJava = false, $xhtml=false) {
echo '<a href="'.$leaf['atomlink'].'" class="categoryFeed"><span class="text">ATOM</span></a>'.CRLF;
echo "<a href=\"", htmlspecialchars($leaf['link']), '" class="categoryItem">', htmlspecialchars($leaf['label']);
if ($skin['showValue'])
echo " <span class=\"c_cnt\">({$child['value']})</span>";
echo " <span class=\"c_cnt\">{$leaf['value']}</span>";
echo "</a>".CRLF;
echo "</li>".CRLF;
}
Expand Down

0 comments on commit 518f5cd

Please sign in to comment.