aboutsummaryrefslogtreecommitdiffstats
path: root/mod/appman.php
blob: 48389a6376dc322bc5ce0667b22bdef52f420fe0 (plain) (blame)
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
<?php /** @file */

require_once('include/apps.php');

function appman_post(&$a) {

	if(! local_user())
		return;

	$papp = app_decode($_POST['papp']);

	if(! is_array($papp)) {
		notice( t('Malformed app.') . EOL);
		return;
	}

	if($_POST['install']) {
		app_install(local_user(),$papp);
	}

	if($_POST['delete']) {
		app_destroy(local_user(),$papp);
	}


}