forked from rupl/drush_make_generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajax.php
40 lines (29 loc) · 850 Bytes
/
ajax.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
<?php
include('_lib.php');
// collect variables and validate if necessary
$ask = (isset($_REQUEST['ask'])) ? $_REQUEST['ask'] : FALSE;
$v = (isset($_REQUEST['v']) && is_numeric($_REQUEST['v'])) ? $_REQUEST['v'] : $version;
$output = '';
if ($ask){
switch ($ask) {
case 'all':
$output = formMakefile($v);
break;
case 'libraries':
$output = formDownload('libraries',array('unique'=>'library'));
break;
case 'themes':
$output = formDownload('themes',array('unique'=>'theme'));
break;
case 'modules':
$output = formDownload('modules',array('unique'=>'module'));
break;
case 'includes':
$output = formDownload('includes',array('unique'=>'include'));
break;
default:
$output = 'ERROR :/';
break;
}
print $output;
}