mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-51239 core_blog: coding style fixes
This commit is contained in:
parent
c18acb8997
commit
0e32a56591
8 changed files with 88 additions and 84 deletions
|
@ -112,7 +112,7 @@ class blog_entry implements renderable {
|
|||
|
||||
$this->renderable = new StdClass();
|
||||
|
||||
$this->renderable->user = $DB->get_record('user', array('id'=>$this->userid));
|
||||
$this->renderable->user = $DB->get_record('user', array('id' => $this->userid));
|
||||
|
||||
// Entry comments.
|
||||
if (!empty($CFG->usecomments) and $CFG->blogusecomments) {
|
||||
|
@ -163,7 +163,7 @@ class blog_entry implements renderable {
|
|||
$associations[$key]->contextlevel = $context->contextlevel;
|
||||
|
||||
// Course associations.
|
||||
if ($context->contextlevel == CONTEXT_COURSE) {
|
||||
if ($context->contextlevel == CONTEXT_COURSE) {
|
||||
// TODO: performance!!!!
|
||||
$instancename = $DB->get_field('course', 'shortname', array('id' => $context->instanceid));
|
||||
|
||||
|
@ -174,7 +174,7 @@ class blog_entry implements renderable {
|
|||
}
|
||||
|
||||
// Mod associations.
|
||||
if ($context->contextlevel == CONTEXT_MODULE) {
|
||||
if ($context->contextlevel == CONTEXT_MODULE) {
|
||||
|
||||
// Getting the activity type and the activity instance id.
|
||||
$sql = 'SELECT cm.instance, m.name FROM {course_modules} cm
|
||||
|
@ -653,7 +653,7 @@ class blog_listing {
|
|||
$assocexists = $DB->record_exists('blog_association', array());
|
||||
|
||||
// Begin permission sql clause.
|
||||
$permissionsql = '(p.userid = ? ';
|
||||
$permissionsql = '(p.userid = ? ';
|
||||
$params[] = $userid;
|
||||
|
||||
if ($CFG->bloglevel >= BLOG_SITE_LEVEL) { // Add permission to view site-level entries.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue