diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2011-09-25 22:32:08 +0200 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2011-09-25 22:32:08 +0200 |
commit | bc43851d74e8fceea1c914e98a8cd571b84610d5 (patch) | |
tree | 171216b960b26719fe124db95a20520c9a3d0081 /apps/gallery/ajax/createAlbum.php | |
parent | fb01a7269304fe38369f01293f8f7fb707061363 (diff) | |
download | nextcloud-server-bc43851d74e8fceea1c914e98a8cd571b84610d5.tar.gz nextcloud-server-bc43851d74e8fceea1c914e98a8cd571b84610d5.zip |
initial commit for gallery app
Diffstat (limited to 'apps/gallery/ajax/createAlbum.php')
-rw-r--r-- | apps/gallery/ajax/createAlbum.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/gallery/ajax/createAlbum.php b/apps/gallery/ajax/createAlbum.php new file mode 100644 index 00000000000..93e3312d324 --- /dev/null +++ b/apps/gallery/ajax/createAlbum.php @@ -0,0 +1,14 @@ +<? +require_once('../../../lib/base.php'); + +if( !OC_User::isLoggedIn()){ + echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => 'You need to log in.'))); + exit(); +} + +$stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_albums ("uid_owner", "album_name") VALUES ("'.OC_User::getUser().'", "'.$_GET['album_name'].'")'); +$stmt->execute(array()); + +echo json_encode(array( 'status' => 'success', 'name' => $_GET['album_name'])); + +?> |