forked from TwistedInteractive/importcsv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.driver.php
More file actions
43 lines (38 loc) · 955 Bytes
/
extension.driver.php
File metadata and controls
43 lines (38 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
require_once(TOOLKIT.'/class.author.php');
Class extension_importcsv extends Extension
{
// About this extension:
public function about()
{
return array(
'name' => 'Import/export CSV',
'version' => '0.3',
'release-date' => '2011-12-15',
'author' => array(
'name' => 'Giel Berkers',
'website' => 'http://www.gielberkers.com',
'email' => 'info@gielberkers.com'),
'description' => 'Import a CSV file to create new entries for a certain section, or export an existing section to a CSV file'
);
}
public function fetchNavigation() {
if(Administration::instance()->Author()->isDeveloper())
{
return array(
array(
'location' => 'System',
'name' => __('Import / Export CSV'),
'link' => '/'
)
);
}
}
public function update($previousVersion = false)
{
if(file_exists(TMP.'/importcsv.csv'))
{
@unlink(TMP.'/importcsv.csv');
}
}
}