Skip to content

Commit

Permalink
Fix PHP8 deprecation errors (optional params before required ones) #5…
Browse files Browse the repository at this point in the history
…72906
  • Loading branch information
sammarshallou committed Aug 18, 2022
1 parent 8ea3529 commit 9b3f0d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion atomlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function atom_end_tag($tag, $level = 0, $endline = true) {


// Return the start tag, the contents and the end tag.
function atom_full_tag($tag, $level = 0, $endline = true, $content, $attributes = null) {
function atom_full_tag($tag, $level, $endline, $content, $attributes = null) {
global $CFG;
$st = atom_start_tag($tag, $level, $endline, $attributes);
if ($content === false) {
Expand Down
2 changes: 1 addition & 1 deletion externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public static function get_blog_posts2_parameters(): external_function_parameter
* @param string $username - used to ensure user posts only
* @return array of posts
*/
public static function get_blog_posts($blogid, $bcontextid, $selected, $inccomments = false, $username) {
public static function get_blog_posts($blogid, $bcontextid, $selected, $inccomments, $username) {
return self::get_blog_posts2($blogid, $bcontextid, $selected, $inccomments, self::convert_username($username));
}

Expand Down
12 changes: 6 additions & 6 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ function oublog_edit_post($post, $cm) {
* @param string $sqlorder port sorting
* @return mixed all data to print a list of blog posts
*/
function oublog_get_posts($oublog, $context, $offset = 0, $cm, $groupid, $individualid = -1,
function oublog_get_posts($oublog, $context, $offset, $cm, $groupid, $individualid = -1,
$userid = null, $tag = '', $canaudit = false, $ignoreprivate = null, $masterblog = null, $paginglimit = null, $sqlorder = '') {
global $CFG, $USER, $DB;
$params = array();
Expand Down Expand Up @@ -1144,7 +1144,7 @@ function oublog_get_tags($oublog, $groupid, $cm, $oubloginstanceid=null, $indivi
* @param object $masterblog
* @return array Tag cloud HTML, current filter tag
*/
function oublog_get_tag_cloud($baseurl, $oublog, $groupid, $cm, $oubloginstanceid=null, $individualid=-1, $tagorder,
function oublog_get_tag_cloud($baseurl, $oublog, $groupid, $cm, $oubloginstanceid, $individualid, $tagorder,
$masterblog = null, $limit = null) {
global $PAGE;
$cloud = '';
Expand Down Expand Up @@ -3401,7 +3401,7 @@ function oublog_can_grade($course, $oublog, $cm, $groupid=0) {
* @param bool $showuseridentityfields show user identity fields.
* @return array user participation
*/
function oublog_get_participation($oublog, $context, $groupid = 0, $cm,
function oublog_get_participation($oublog, $context, $groupid, $cm,
$course, $start = null, $end = null, $sort = 'u.firstname,u.lastname', $masterblog = null, $cmmaster = null,
$coursemaster = null, $showuseridentityfields = false) {
global $DB;
Expand Down Expand Up @@ -3589,7 +3589,7 @@ function oublog_load_user_identity_data($context, $users) {
* @return array user participation
*/
function oublog_get_user_participation($oublog, $context,
$userid, $groupid = 0, $cm, $course, $start = null, $end = null,
$userid, $groupid, $cm, $course, $start = null, $end = null,
$getposts = true, $getcomments = true, $limitfrom = null, $limitnum = null, $getgrades = false,
$masterblog = null, $cmmaster = null, $coursemaster = null) {
global $DB;
Expand Down Expand Up @@ -4504,7 +4504,7 @@ function oublog_stats_output_commentpoststats($oublog, $cm, $renderer = null, $a
* @param object $coursemaster
* @param bool $ajax true to return data object rather than html
*/
function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $course, $currentindividual, $globalindividual = null,
function oublog_stats_output_myparticipation($oublog, $cm, $renderer, $course, $currentindividual, $globalindividual = null,
$masterblog = null, $cmmaster = null, $coursemaster = null) {
global $PAGE, $DB, $USER, $OUTPUT;
if (!isloggedin()) {// My participation is only visible to actual users.
Expand Down Expand Up @@ -4620,7 +4620,7 @@ function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $co
* @param object $masterblog
* @param bool $ return data object rather than html
*/
function oublog_stats_output_participation($oublog, $cm, $renderer = null, $course, $allposts = false, $curindividual = -1, $globalindividual = null,
function oublog_stats_output_participation($oublog, $cm, $renderer, $course, $allposts = false, $curindividual = -1, $globalindividual = null,
$masterblog = null) {
global $PAGE, $DB, $USER, $OUTPUT;
if (!$renderer) {
Expand Down
2 changes: 1 addition & 1 deletion participation_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class oublog_participation_table extends flexible_table {
public $extraheaders;
private $hasgrades;

public function __construct($cm, $course, $oublog, $groupid = 0,
public function __construct($cm, $course, $oublog, $groupid,
$groupname, $hasgrades) {

$this->cm = $cm;
Expand Down

0 comments on commit 9b3f0d3

Please sign in to comment.