forked from chadopp/mythepisode
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.php
49 lines (45 loc) · 1.78 KB
/
init.php
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
44
45
46
47
48
<?php
/**
* Initialization routines for the episode module
*
* @url $URL$
* @date $Date$
* @version $Revision$
* @author $Author$
* @license GPL
*
/**/
// If mythepisode is enabled, add it to the list.
if (tmpl == 'default') {
$rootDir = getcwd();
$dataDir = "$rootDir/data";
$epDir = "$dataDir/episode";
$configFile = "$epDir/config.ini";
$tvwishHide = 0;
$links = "";
if (file_exists($configFile)) {
$config = parse_ini_file($configFile, 1);
$tvwishHide = (empty($config['tvwishHide'])) ? '0' : $config['tvwishHide'];
}
if ($tvwishHide) {
$links = array( 'show' => t('TV Shows'),
'previous_recordings' => t('Previous Recordings')
);
} else {
$links = array( 'show' => t('TV Shows'),
'previous_recordings' => t('Previous Recordings'),
'tvwish_list' => t('TVwish')
);
}
$Modules['episode'] = array('path' => 'episode',
'sort' => 3,
'name' => t('TV Episodes'),
'links' => $links
);
$Settings['episode'] = array('name' => t('Mythepisode'),
'choices' => array('settings' => t('Settings'),
'override' => t('Override'),
),
'default' => 'settings',
);
};