Skip to content

Commit fd46ab8

Browse files
committed
New generate page for Environment distro file
1 parent 69a6a33 commit fd46ab8

2 files changed

Lines changed: 23 additions & 26 deletions

File tree

generate/environment.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010
// get translation file
1111
$translation = new Translation($lang);
1212

13-
// make troubleshooting page
14-
//$source = CONTENTDIR."/api_$lang/troubleshooting/";
15-
//$path = REFERENCEDIR . ($lang == 'en' ? '' : "/$lang") . "/troubleshooting/";
16-
//make_necessary_directories($path."images/file");
17-
//$page = new Page("Troubleshooting", "Troubleshooting", "Troubleshooting");
18-
//$page->content(file_get_contents($source."index.html"));
19-
//$page->language($lang);
20-
//writeFile('reference/'.($lang=='en'?'':"$lang/").'troubleshooting/index.html', $page->out());
21-
//copydirr($source.'/images', $path.'/images');
22-
2313
// make overview page
2414
$source = CONTENTDIR."/api_$lang/environment/";
2515
$path = REFERENCEDIR . ($lang == 'en' ? '' : "/$lang") . "/environment/";
@@ -30,19 +20,6 @@
3020
writeFile('reference/'.($lang=='en'?'':"$lang/").'environment/index.html', $page->out());
3121
copydirr($source.'/images', $path.'/images');
3222

33-
// make export page
34-
//$page = new Page("Environment (IDE)", "Environment", "Environment");
35-
//$page->content(file_get_contents($source."export.html"));
36-
//$page->language($lang);
37-
//writeFile('reference/'.($lang=='en'?'':"$lang/").'environment/export.html', $page->out());
38-
39-
// make platforms page
40-
//$page = new Page("Environment (IDE)", "Environment", "Environment");
41-
//$page->content(file_get_contents($source."platforms.html"));
42-
//$page->language($lang);
43-
//writeFile('reference/'.($lang=='en'?'':"$lang/").'environment/platforms.html', $page->out());
44-
45-
4623
$benchmark_end = microtime_float();
4724
$execution_time = round($benchmark_end - $benchmark_start, 4);
4825

generate/environment_local.php

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
<?
2-
2+
/**
33
require('../config.php');
44
require('lib/Translation.class.php');
55
$benchmark_start = microtime_float();
6-
$source = CONTENTDIR."/api_$lang/environment/";
7-
$path = DISTDIR."/environment/";
86
97
// 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+
*/
23+
require('../config.php');
24+
require('lib/Translation.class.php');
25+
$benchmark_start = microtime_float();
26+
1027
//$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en';
1128
$lang = 'en';
1229
echo "language selected";
1330

31+
$source = CONTENTDIR."/api_$lang/environment/";
32+
$path = DISTDIR."/environment/";
33+
1434
// get translation file
1535
$translation = new Translation($lang);
1636

0 commit comments

Comments
 (0)