Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix pass-by-reference calls. Closes #69

  • Loading branch information...
commit a92e684fe0903bb469f24807c8f0fda3132066b0 1 parent 7dca069
@stas stas authored
View
12 activity/activity.class.php
@@ -65,8 +65,8 @@ function activity_for_assignment( $assignment, $type = "add" ){
groups_record_activity(
array(
- 'action' => apply_filters( 'courseware_assignment_activity_action', $activity_action, $assignment->ID, $assignment->post_content, &$assignment ),
- 'content' => apply_filters( 'courseware_assignment_activity_content', $activity_content, $assignment->ID, $assignment->post_content, &$assignment ),
+ 'action' => apply_filters( 'courseware_assignment_activity_action', $activity_action, $assignment->ID, $assignment->post_content, $assignment ),
+ 'content' => apply_filters( 'courseware_assignment_activity_content', $activity_content, $assignment->ID, $assignment->post_content, $assignment ),
'primary_link' => apply_filters( 'courseware_assignment_activity_primary_link', "{$primary_link}#post-{$assignment->ID}" ),
'type' => "assignment_$type",
'item_id' => $bp->groups->current_group->id
@@ -95,8 +95,8 @@ function activity_for_lecture( $lecture, $type = "add" ){
groups_record_activity(
array(
- 'action' => apply_filters( 'courseware_course_activity_action', $activity_action, $lecture->ID, $lecture->post_content, &$lecture ),
- 'content' => apply_filters( 'courseware_course_activity_content', $activity_content, $lecture->ID, $lecture->post_content, &$lecture ),
+ 'action' => apply_filters( 'courseware_course_activity_action', $activity_action, $lecture->ID, $lecture->post_content, $lecture ),
+ 'content' => apply_filters( 'courseware_course_activity_content', $activity_content, $lecture->ID, $lecture->post_content, $lecture ),
'primary_link' => apply_filters( 'courseware_course_activity_primary_link', "{$primary_link}#post-{$lecture->ID}" ),
'type' => "lecture_$type",
'item_id' => $bp->groups->current_group->id
@@ -130,8 +130,8 @@ function activity_for_response( $response_data, $type = "add" ){
groups_record_activity(
array(
- 'action' => apply_filters( 'courseware_response_activity_action', $activity_action, $response->ID, $response->post_content, &$response ),
- 'content' => apply_filters( 'courseware_response_activity_content', $activity_content, $response->ID, $response->post_content, &$response ),
+ 'action' => apply_filters( 'courseware_response_activity_action', $activity_action, $response->ID, $response->post_content, $response ),
+ 'content' => apply_filters( 'courseware_response_activity_content', $activity_content, $response->ID, $response->post_content, $response ),
'primary_link' => apply_filters( 'courseware_response_activity_primary_link', "{$primary_link}#post-{$response->ID}" ),
'type' => "response_$type",
'item_id' => $bp->groups->current_group->id
View
3  courses/courses.class.php
@@ -325,7 +325,8 @@ function single_course_screen( $vars ) {
$vars['trail'] = array(
$course->post_title => $course->permalink
);
- return apply_filters( 'courseware_course', &$vars );
+ $vars = apply_filters( 'courseware_course', $vars );
+ return $vars;
}
/**
View
6 groups/groups.class.php
@@ -126,7 +126,7 @@ function screen_handler() {
* Courseware action to manage group navigation options
*/
function nav_options() {
- apply_filters( 'courseware_group_nav_options', &$this->nav_options );
+ $this->nav_options = apply_filters( 'courseware_group_nav_options', $this->nav_options );
$this->load_template( array(
'name' => '_nav',
'nav_options' => $this->nav_options,
@@ -165,9 +165,9 @@ function load_template( $vars = '' ) {
//Exclude internal templates like navigation, starts with an underscore
if( substr( $vars['name'], 0, 1) != '_' )
- apply_filters( 'courseware_group_template', &$vars );
+ $vars = apply_filters( 'courseware_group_template', $vars );
else
- apply_filters( 'courseware_template_vars', &$vars );
+ $vars = apply_filters( 'courseware_template_vars', $vars );
if( file_exists( $templates_path . $vars['name']. '.php' ) ) {
ob_start();
Please sign in to comment.
Something went wrong with that request. Please try again.