Skip to content
GitLab
Menu
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
6cd67623
Commit
6cd67623
authored
Sep 02, 2008
by
Richard Mansfield
Browse files
Remove pass by reference at call time in artefact chooser
parent
640cdce0
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/blocktype/filedownload/lib.php
View file @
6cd67623
...
...
@@ -126,7 +126,7 @@ class PluginBlocktypeFiledownload extends PluginBlocktype {
* artefactchooser element data before it's templated
*/
public
static
function
artefactchooser_get_element_data
(
$artefact
)
{
return
ArtefactTypeFileBase
::
artefactchooser_get_file_data
(
&
$artefact
);
return
ArtefactTypeFileBase
::
artefactchooser_get_file_data
(
$artefact
);
}
}
...
...
htdocs/artefact/file/blocktype/folder/lib.php
View file @
6cd67623
...
...
@@ -105,7 +105,7 @@ class PluginBlocktypeFolder extends PluginBlocktype {
* artefactchooser element data before it's templated
*/
public
static
function
artefactchooser_get_element_data
(
$artefact
)
{
$folderdata
=
ArtefactTypeFileBase
::
artefactchooser_folder_data
(
&
$artefact
);
$folderdata
=
ArtefactTypeFileBase
::
artefactchooser_folder_data
(
$artefact
);
$artefact
->
icon
=
call_static_method
(
generate_artefact_class_name
(
$artefact
->
artefacttype
),
'get_icon'
,
array
(
'id'
=>
$artefact
->
id
));
$artefact
->
hovertitle
=
$artefact
->
description
;
...
...
htdocs/artefact/file/blocktype/image/lib.php
View file @
6cd67623
...
...
@@ -126,7 +126,7 @@ class PluginBlocktypeImage extends PluginBlocktype {
* artefactchooser element data before it's templated
*/
public
static
function
artefactchooser_get_element_data
(
$artefact
)
{
return
ArtefactTypeFileBase
::
artefactchooser_get_file_data
(
&
$artefact
);
return
ArtefactTypeFileBase
::
artefactchooser_get_file_data
(
$artefact
);
}
}
...
...
htdocs/artefact/file/lib.php
View file @
6cd67623
...
...
@@ -598,7 +598,7 @@ JAVASCRIPT;
}
}
$folderdata
=
self
::
artefactchooser_folder_data
(
&
$artefact
);
$folderdata
=
self
::
artefactchooser_folder_data
(
$artefact
);
if
(
$artefact
->
artefacttype
==
'profileicon'
)
{
$artefact
->
description
=
str_shorten
(
$artefact
->
title
,
30
);
...
...
@@ -611,7 +611,7 @@ JAVASCRIPT;
return
$artefact
;
}
public
static
function
artefactchooser_folder_data
(
$artefact
)
{
public
static
function
artefactchooser_folder_data
(
&
$artefact
)
{
// Grab data about all folders the artefact owner has, so we
// can make full paths to them, and show the artefact owner if
// it's a group or institution.
...
...
@@ -644,7 +644,7 @@ JAVASCRIPT;
* Works out a full path to a folder, given an ID. Implemented this way so
* only one query is made.
*/
public
static
function
get_full_path
(
$id
,
$folderdata
)
{
public
static
function
get_full_path
(
$id
,
&
$folderdata
)
{
$path
=
''
;
while
(
!
empty
(
$id
))
{
$path
=
$folderdata
[
$id
]
->
title
.
'/'
.
$path
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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