Commit b3b1a5ee authored by Nigel McNie's avatar Nigel McNie
Browse files

Rename the exporttime field from export_time so it's consistent with our naming scheme.

parent d1fa552d
......@@ -36,11 +36,6 @@ class PluginExportHtml extends PluginExport {
*/
protected $zipfile;
/**
* The time the export occured
*/
protected $export_time;
/**
* The name of the directory under which all the other directories and
* files will be placed in the export
......@@ -63,7 +58,7 @@ class PluginExportHtml extends PluginExport {
}
}
$this->zipfile = 'mahara-export-html-user'
. $this->get('user')->get('id') . '-' . $this->export_time . '.zip';
. $this->get('user')->get('id') . '-' . $this->exporttime . '.zip';
}
public static function get_title() {
......@@ -141,7 +136,7 @@ class PluginExportHtml extends PluginExport {
$smarty = smarty_core();
$smarty->assign('user', $this->get('user'));
$smarty->assign('rootpath', $rootpath);
$smarty->assign('export_time', $this->export_time);
$smarty->assign('export_time', $this->exporttime);
$smarty->assign('sitename', get_config('sitename'));
return $smarty;
......
......@@ -91,7 +91,7 @@ class PluginExportLeap extends PluginExport {
throw new SystemException("Couldn't create the temporary export directory $this->exportdir");
}
$this->zipfile = 'mahara-export-leap-user'
. $this->get('user')->get('id') . '-' . $this->export_time . '.zip';
. $this->get('user')->get('id') . '-' . $this->exporttime . '.zip';
// some plugins might want to do their own special thing
foreach (plugins_installed('artefact', true) as $plugin) {
$plugin = $plugin->name;
......@@ -181,8 +181,8 @@ class PluginExportLeap extends PluginExport {
$this->smarty->assign('userid', $this->get('user')->get('id'));
$this->smarty->assign('name', full_name($this->get('user')));
$this->smarty->assign('email', $this->get('user')->get('email'));
$this->smarty->assign('export_time', $this->export_time);
$this->smarty->assign('export_time_rfc3339', PluginExportLeap::format_rfc3339_date($this->export_time));
$this->smarty->assign('export_time', $this->exporttime);
$this->smarty->assign('export_time_rfc3339', PluginExportLeap::format_rfc3339_date($this->exporttime));
require(get_config('docroot') . 'export/leap/version.php');
$this->smarty->assign('leap_export_version', $config->version);
$this->xml .= $this->smarty->fetch('export:leap:header.tpl');
......
......@@ -118,7 +118,7 @@ abstract class PluginExport extends Plugin {
*
* Technically, this is the time at which the export object was created.
*/
protected $export_time;
protected $exporttime;
/**
* Establishes exactly what views and artefacts are to be exported, and
......@@ -143,7 +143,7 @@ abstract class PluginExport extends Plugin {
* - ArtefactType subclasses
*/
public function __construct(User $user, $views, $artefacts) {
$this->export_time = time();
$this->exporttime = time();
$this->user = $user;
$vaextra = '';
......@@ -218,7 +218,7 @@ abstract class PluginExport extends Plugin {
$this->exportdir = get_config('dataroot')
. 'export/temporary/'
. $this->user->get('id') . '/'
. time() . '/';
. $this->exporttime . '/';
if (!check_dir_exists($this->exportdir)) {
throw new SystemException("Couldn't create the temporary export directory $this->exportdir");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment