Skip to content

Commit

Permalink
MDL-32117 equella: various E_STRICT fixes
Browse files Browse the repository at this point in the history
* Make send_file compatible with its parent
* mktime -> time()
* callback.php: fix pass by reference warnings
  • Loading branch information
danpoltawski committed Jun 4, 2012
1 parent e88aa1e commit 130b3f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion repository/equella/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
require_login();
$json = required_param('tlelinks', PARAM_RAW);

$info = array_pop(json_decode($json));
$decodedinfo = json_decode($json);
$info = array_pop($decodedinfo);
$url = clean_param($info->url, PARAM_URL);
$thumbnail = clean_param($info->thumbnail, PARAM_URL);
$filename = clean_param($info->name, PARAM_FILE);
Expand Down
4 changes: 2 additions & 2 deletions repository/equella/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function get_file_by_reference($reference) {
*
* @param stored_file $stored_file
*/
public function send_file($stored_file) {
public function send_file($stored_file, $lifetime=86400 , $filter=0, $forcedownload=false, array $options = null) {
$reference = base64_decode($stored_file->get_reference());
$url = $this->appendtoken($reference);
header('Location: ' . $url);
Expand Down Expand Up @@ -218,7 +218,7 @@ public static function get_instance_option_names() {
* @return string
*/
function getssotoken_raw($username, $shareid, $sharedsecret) {
$time = mktime() . '000';
$time = time() . '000';
return urlencode($username)
. ':'
. $shareid
Expand Down

0 comments on commit 130b3f8

Please sign in to comment.