Skip to content

Commit ab0686d

Browse files
committed
New generate page for Environment distro file
1 parent 629663f commit ab0686d

1 file changed

Lines changed: 4 additions & 38 deletions

File tree

generate/environment_local.php

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,21 @@
11
<?
2-
/**
3-
require('../config.php');
4-
require('lib/Translation.class.php');
5-
$benchmark_start = microtime_float();
6-
7-
// arguments
8-
$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en';
9-
10-
// get translation file
11-
$translation = new Translation($lang);
12-
13-
// make overview page
14-
$source = CONTENTDIR."/api_$lang/environment/";
15-
$path = REFERENCEDIR . ($lang == 'en' ? '' : "/$lang") . "/environment/";
16-
make_necessary_directories($path."images/file");
17-
$page = new Page("Environment (IDE)", "Environment", "Environment");
18-
$page->content(file_get_contents($source."index.html"));
19-
$page->language($lang);
20-
writeFile('reference/'.($lang=='en'?'':"$lang/").'environment/index.html', $page->out());
21-
copydirr($source.'/images', $path.'/images');
22-
*/
232
require('../config.php');
243
require('lib/Translation.class.php');
254
$benchmark_start = microtime_float();
265

27-
//$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en';
28-
$lang = 'en';
6+
$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en';
7+
//$lang = 'en';
298
echo "Language selected";
309

3110
$source = CONTENTDIR."/api_$lang/environment/";
3211
$path = DISTDIR."/environment/";
3312

3413
// get translation file
35-
$translation = new Translation($lang);
36-
37-
// make directories if they are not already there
38-
if (!is_dir($path)) {
39-
//mkdir($path, '0775');
40-
echo "Environment folder created";
41-
42-
}
43-
44-
if (!is_dir($path.'images/')) {
45-
//mkdir($path.'images/', '0775');
46-
echo "Image folder created";
47-
48-
}
14+
$translation = new Translation($lang);
4915

5016
// make page
5117

52-
//make_necessary_directories($path."images/file");
18+
make_necessary_directories($path."images/file");
5319
$page = new LocalPage('Environment (IDE)', 'Environment', 'Environment', '../');
5420
$page->content(file_get_contents($source.'index.html'));
5521
$page->language($lang);

0 commit comments

Comments
 (0)