Skip to content

Commit

Permalink
Blog: Personal blog DB error #813986
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason.Platts authored and sammarshallou committed Sep 9, 2024
1 parent deab2ae commit a796664
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,10 @@ function oublog_get_post($postid, $canaudit=false) {
WHERE c.postid = ? ";

if (!$canaudit) {
$sql .= "AND c.deletedby IS NULL ";
$sql .= " AND c.deletedby IS NULL ";
}

$sql .= "ORDER BY c.timeposted ASC ";
$sql .= " ORDER BY c.timeposted ASC ";

$rs = $DB->get_recordset_sql($sql, array($postid));
foreach ($rs as $comment) {
Expand Down Expand Up @@ -3701,7 +3701,7 @@ function oublog_stats_output_visitstats($oublog, $cm, $renderer = null, $ajax =
$params = array($oublog->id, $filtertime);
if ($oublog->global || ($oublog->maxvisibility == OUBLOG_VISIBILITY_PUBLIC && !isloggedin())) {
// Only include visible posts on global blogs and public blogs when not logged in.
$sql .= 'AND p.visibility >= ? ';
$sql .= ' AND p.visibility >= ? ';
if (!isloggedin()) {
$params[] = OUBLOG_VISIBILITY_PUBLIC;
} else {
Expand Down
5 changes: 5 additions & 0 deletions tests/behat/personalblog.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Feature: Test Post and Comment on Personal OUBlog
And I am using the OU theme
And I am on site homepage
And I follow "Personal Blogs"
And I click on "Settings" "link"
And I expand all fieldsets
When I set the following fields to these values:
| statblockon | 0 |
And I press "Save and display"
And I follow "Blog options"
Then I should see "Blog name"
And I should see "Summary"
Expand Down

0 comments on commit a796664

Please sign in to comment.