Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
495d5c08
Commit
495d5c08
authored
May 02, 2016
by
Robert Lyon
Committed by
Gerrit Code Review
May 02, 2016
Browse files
Merge "Bug 1575955: fixing function signatures for PHP7" into 15.10_STABLE
parents
220c14f2
ad873b1e
Changes
16
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/annotation/blocktype/annotation/lib.php
View file @
495d5c08
...
...
@@ -242,7 +242,7 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
return
$elements
;
}
public
static
function
delete_instance
(
$instance
)
{
public
static
function
delete_instance
(
BlockInstance
$instance
)
{
$configdata
=
$instance
->
get
(
'configdata'
);
if
(
!
empty
(
$configdata
))
{
$artefactid
=
$configdata
[
'artefactid'
];
...
...
htdocs/artefact/annotation/lib.php
View file @
495d5c08
...
...
@@ -509,7 +509,7 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
*
* @param array $artefactids is a list of artefactids representing the annotationfeedback artefacts.
*/
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
@@ -1052,7 +1052,7 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
}
}
public
function
render_self
()
{
public
function
render_self
(
$options
)
{
return
clean_html
(
$this
->
get
(
'description'
));
}
...
...
htdocs/artefact/blog/lib.php
View file @
495d5c08
...
...
@@ -743,7 +743,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
db_commit
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
htdocs/artefact/comment/lib.php
View file @
495d5c08
...
...
@@ -278,7 +278,7 @@ class ArtefactTypeComment extends ArtefactType {
db_commit
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
@@ -882,7 +882,7 @@ class ArtefactTypeComment extends ArtefactType {
$data
->
pagination_js
=
$pagination
[
'javascript'
];
}
public
function
render_self
()
{
public
function
render_self
(
$options
)
{
return
clean_html
(
$this
->
get
(
'description'
));
}
...
...
@@ -1088,7 +1088,7 @@ class ArtefactTypeComment extends ArtefactType {
);
}
public
static
function
save_config_options
(
$form
,
$values
)
{
public
static
function
save_config_options
(
Pieform
$form
,
$values
)
{
foreach
(
array
(
'commentratings'
)
as
$settingname
)
{
set_config_plugin
(
'artefact'
,
'comment'
,
$settingname
,
$values
[
$settingname
]);
}
...
...
htdocs/artefact/file/lib.php
View file @
495d5c08
...
...
@@ -1377,7 +1377,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
parent
::
delete
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
global
$USER
;
require_once
(
'group.php'
);
...
...
@@ -1754,7 +1754,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
}
}
public
static
function
save_config_options
(
$form
,
$values
)
{
public
static
function
save_config_options
(
Pieform
$form
,
$values
)
{
global
$USER
;
$updatingquota
=
false
;
...
...
@@ -2314,7 +2314,7 @@ class ArtefactTypeImage extends ArtefactTypeFile {
parent
::
delete
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
@@ -2369,7 +2369,7 @@ class ArtefactTypeProfileIcon extends ArtefactTypeImage {
}
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
global
$USER
;
parent
::
bulk_delete
(
$artefactids
);
if
(
in_array
(
$USER
->
get
(
'profileicon'
),
$artefactids
))
{
...
...
htdocs/artefact/internal/blocktype/profileinfo/lib.php
View file @
495d5c08
...
...
@@ -218,7 +218,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
return
$values
;
}
public
static
function
delete_instance
(
$instance
)
{
public
static
function
delete_instance
(
BlockInstance
$instance
)
{
require_once
(
'embeddedimage.php'
);
EmbeddedImage
::
delete_embedded_images
(
'introtext'
,
$instance
->
get
(
'id'
));
}
...
...
htdocs/artefact/internal/blocktype/textbox/lib.php
View file @
495d5c08
...
...
@@ -409,7 +409,7 @@ EOF;
return
$elements
;
}
public
static
function
delete_instance
(
$instance
)
{
public
static
function
delete_instance
(
BlockInstance
$instance
)
{
require_once
(
'embeddedimage.php'
);
$configdata
=
$instance
->
get
(
'configdata'
);
if
(
!
empty
(
$configdata
))
{
...
...
htdocs/artefact/internal/lib.php
View file @
495d5c08
...
...
@@ -641,7 +641,7 @@ class ArtefactTypeProfile extends ArtefactType {
return
$form
;
}
public
function
save_config_options
(
$form
,
$values
)
{
public
function
save_config_options
(
Pieform
$form
,
$values
)
{
$mandatory
=
array_merge
(
array_keys
(
self
::
get_always_mandatory_fields
()),
$values
[
'mandatory'
]);
set_config_plugin
(
'artefact'
,
'internal'
,
'profilemandatory'
,
join
(
','
,
$mandatory
));
$searchable
=
array_merge
(
array_keys
(
self
::
get_always_searchable_fields
()),
$values
[
'searchable'
]);
...
...
@@ -677,7 +677,7 @@ class ArtefactTypeProfileField extends ArtefactTypeProfile {
/**
* Render the import entry request for profile fields
*/
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
clean_html
(
$entry_content
[
'title'
]);
}
}
...
...
@@ -759,7 +759,7 @@ class ArtefactTypeEmail extends ArtefactTypeProfileField {
parent
::
delete
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
@@ -832,7 +832,7 @@ class ArtefactTypeCountry extends ArtefactTypeProfileField {
/**
* Render the import entry request for country fields
*/
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
$countries
=
getoptions_country
();
return
(
isset
(
$countries
[
$entry_content
[
'title'
]])
?
$countries
[
$entry_content
[
'title'
]]
:
''
);
}
...
...
@@ -1001,7 +1001,7 @@ class ArtefactTypeSocialprofile extends ArtefactTypeProfileField {
/**
* Render the import entry request for social profile fields
*/
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
$html
=
'<strong>'
.
$entry_content
[
'description'
]
.
':</strong> '
.
$entry_content
[
'title'
];
return
clean_html
(
$html
);
}
...
...
htdocs/artefact/plans/lib.php
View file @
495d5c08
...
...
@@ -419,7 +419,7 @@ class ArtefactTypeTask extends ArtefactType {
db_commit
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
htdocs/artefact/resume/lib.php
View file @
495d5c08
...
...
@@ -265,7 +265,7 @@ class ArtefactTypeResume extends ArtefactType {
/**
* Render the import entry request for resume fields
*/
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
clean_html
(
$entry_content
[
'description'
]);
}
}
...
...
@@ -482,7 +482,7 @@ class ArtefactTypePersonalinformation extends ArtefactTypeResume {
return
array
(
'html'
=>
self
::
render_fields
(
$this
,
$options
),
'javascript'
=>
''
);
}
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
self
::
render_fields
(
null
,
array
(),
$entry_content
);
}
...
...
@@ -495,7 +495,7 @@ class ArtefactTypePersonalinformation extends ArtefactTypeResume {
db_commit
();
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
if
(
empty
(
$artefactids
))
{
return
;
}
...
...
@@ -933,7 +933,7 @@ abstract class ArtefactTypeResumeComposite extends ArtefactTypeResume implements
return
$content
;
}
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
$smarty
=
smarty_core
();
$fields
=
array
();
foreach
(
$renderfields
as
$field
)
{
...
...
@@ -1308,7 +1308,7 @@ class ArtefactTypeEmploymenthistory extends ArtefactTypeResumeComposite {
);
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
ArtefactTypeResumeComposite
::
bulk_delete_composite
(
$artefactids
,
'employmenthistory'
);
}
...
...
@@ -1349,7 +1349,7 @@ class ArtefactTypeEmploymenthistory extends ArtefactTypeResumeComposite {
);
}
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
parent
::
render_import_entry_request
(
$entry_content
,
array_keys
(
self
::
get_addform_elements
()));
}
...
...
@@ -1492,7 +1492,7 @@ function formatQualification(name, type, institution) {
EOF;
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
ArtefactTypeResumeComposite
::
bulk_delete_composite
(
$artefactids
,
'educationhistory'
);
}
...
...
@@ -1533,7 +1533,7 @@ EOF;
);
}
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
parent
::
render_import_entry_request
(
$entry_content
,
array_keys
(
self
::
get_addform_elements
()));
}
...
...
@@ -1607,7 +1607,7 @@ class ArtefactTypeCertification extends ArtefactTypeResumeComposite {
);
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
ArtefactTypeResumeComposite
::
bulk_delete_composite
(
$artefactids
,
'certification'
);
}
...
...
@@ -1646,7 +1646,7 @@ class ArtefactTypeCertification extends ArtefactTypeResumeComposite {
);
}
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
parent
::
render_import_entry_request
(
$entry_content
,
array_keys
(
self
::
get_addform_elements
()));
}
...
...
@@ -1735,7 +1735,7 @@ class ArtefactTypeBook extends ArtefactTypeResumeComposite {
);
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
ArtefactTypeResumeComposite
::
bulk_delete_composite
(
$artefactids
,
'book'
);
}
/**
...
...
@@ -1773,7 +1773,7 @@ class ArtefactTypeBook extends ArtefactTypeResumeComposite {
);
}
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
parent
::
render_import_entry_request
(
$entry_content
,
array_keys
(
self
::
get_addform_elements
()));
}
...
...
@@ -1853,7 +1853,7 @@ class ArtefactTypeMembership extends ArtefactTypeResumeComposite {
);
}
public
static
function
bulk_delete
(
$artefactids
)
{
public
static
function
bulk_delete
(
$artefactids
,
$log
=
false
)
{
ArtefactTypeResumeComposite
::
bulk_delete_composite
(
$artefactids
,
'membership'
);
}
...
...
@@ -1893,7 +1893,7 @@ class ArtefactTypeMembership extends ArtefactTypeResumeComposite {
);
}
public
static
function
render_import_entry_request
(
$entry_content
)
{
public
static
function
render_import_entry_request
(
$entry_content
,
$renderfields
=
array
()
)
{
return
parent
::
render_import_entry_request
(
$entry_content
,
array_keys
(
self
::
get_addform_elements
()));
}
...
...
htdocs/auth/internal/lib.php
View file @
495d5c08
...
...
@@ -305,7 +305,7 @@ class PluginAuthInternal extends PluginAuth {
return
false
;
}
public
static
function
get_instance_config_options
()
{
public
static
function
get_instance_config_options
(
$institution
,
$instance
=
0
)
{
return
array
();
}
}
htdocs/auth/lib.php
View file @
495d5c08
...
...
@@ -2667,10 +2667,12 @@ class PluginAuth extends Plugin {
* contain any elements called "plugintype", "pluginname", "name", or "submit".
*
* The form definition itself should NOT contain a successcallback, validatecallback, or jsform setting.
* @param array $institution
* @param int $instance
*
* @return array
*/
public
static
function
get_instance_config_options
()
{
public
static
function
get_instance_config_options
(
$institution
,
$instance
=
0
)
{
throw
new
SystemException
(
'This plugin claims to have instance config but does not define a '
.
'get_instance_config_options() method. Most likely it is still using the get_config_options() '
.
'method for this purpose. Please ask the developer to upgrade the plugin.'
);
...
...
htdocs/auth/none/lib.php
View file @
495d5c08
...
...
@@ -87,7 +87,7 @@ class PluginAuthNone extends PluginAuth {
return
false
;
}
public
static
function
get_instance_config_options
()
{
public
static
function
get_instance_config_options
(
$institution
,
$instance
=
0
)
{
return
array
();
}
}
htdocs/auth/webservice/lib.php
View file @
495d5c08
...
...
@@ -83,7 +83,7 @@ class PluginAuthWebservice extends PluginAuth {
return
false
;
}
public
static
function
get_instance_config_options
()
{
public
static
function
get_instance_config_options
(
$institution
,
$instance
=
0
)
{
return
array
();
}
...
...
htdocs/blocktype/text/lib.php
View file @
495d5c08
...
...
@@ -90,7 +90,7 @@ class PluginBlocktypeText extends MaharaCoreBlocktype {
return
$values
;
}
public
static
function
delete_instance
(
$instance
)
{
public
static
function
delete_instance
(
BlockInstance
$instance
)
{
require_once
(
'embeddedimage.php'
);
EmbeddedImage
::
delete_embedded_images
(
'text'
,
$instance
->
get
(
'id'
));
}
...
...
@@ -206,7 +206,7 @@ class PluginBlocktypeText extends MaharaCoreBlocktype {
* @param $form the pieform to send the ok-message to
* @param array $values
*/
public
static
function
save_config_options
(
$form
,
$values
)
{
public
static
function
save_config_options
(
Pieform
$form
,
$values
)
{
global
$SESSION
;
if
(
!
array_key_exists
(
'convertcheckbox'
,
$values
)
||
!
$values
[
'convertcheckbox'
])
{
return
;
...
...
htdocs/lib/xmldb/classes/generators/XMLDBGenerator.class.php
View file @
495d5c08
...
...
@@ -1101,7 +1101,7 @@ class XMLDBgenerator {
/**
* Returns the code (array of statements) needed to execute extra statements on field rename
*/
function
getRenameFieldExtraSQL
(
$xmldb_table
,
$xmldb_field
)
{
function
getRenameFieldExtraSQL
(
$xmldb_table
,
$xmldb_field
,
$newname
)
{
return
array
(
'Code for field rename goes to getRenameFieldExtraSQL(). Can be disabled with rename_column_extra_code=false;'
);
}
...
...
@@ -1123,7 +1123,7 @@ class XMLDBgenerator {
/**
* Returns the code (array of statements) needed to execute extra statements on table rename
*/
function
getRenameTableExtraSQL
(
$xmldb_table
)
{
function
getRenameTableExtraSQL
(
$xmldb_table
,
$newname
)
{
return
array
(
'Code for table rename goes to getRenameTableExtraSQL(). Can be disabled with rename_table_extra_code=false;'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment