diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-12-08 20:04:56 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-12-08 20:05:12 +0100 |
commit | eeaf539a4414e3081b6f6652167363a3221a1973 (patch) | |
tree | 0616110c205df731c542ea600db369d842a99f9c /apps/gallery/ajax/createAlbum.php | |
parent | d4546cdf37bced97d447b5170202cbd61c39d3be (diff) | |
download | nextcloud-server-eeaf539a4414e3081b6f6652167363a3221a1973.tar.gz nextcloud-server-eeaf539a4414e3081b6f6652167363a3221a1973.zip |
Gallery: splitout model code
Diffstat (limited to 'apps/gallery/ajax/createAlbum.php')
-rw-r--r-- | apps/gallery/ajax/createAlbum.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/gallery/ajax/createAlbum.php b/apps/gallery/ajax/createAlbum.php index 610f761b72a..9413b54718a 100644 --- a/apps/gallery/ajax/createAlbum.php +++ b/apps/gallery/ajax/createAlbum.php @@ -3,8 +3,7 @@ require_once('../../../lib/base.php'); OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('gallery'); -$stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_albums ("uid_owner", "album_name") VALUES ("'.OC_User::getUser().'", "'.$_GET['album_name'].'")'); -$stmt->execute(array()); +OC_Gallery_Album::create(OC_User::getUser(), $_GET['album_name']); OC_JSON::success(array('name' => $_GET['album_name'])); |