aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-07-29 11:34:38 +0200
committerkondou <kondou@ts.unde.re>2013-08-25 21:04:04 +0200
commitfac671b14ed06233d37ad38194ebf9a99118644a (patch)
treedb99cca8e2ee41b79b444b44f8a429bf8fe32b8a /core
parent4a08f7d710ced1c564e05471e1f873ecfb9ca161 (diff)
downloadnextcloud-server-fac671b14ed06233d37ad38194ebf9a99118644a.tar.gz
nextcloud-server-fac671b14ed06233d37ad38194ebf9a99118644a.zip
Modularize get(), async getAvatar, avatars @ usermgmt
And other small improvements
Diffstat (limited to 'core')
-rw-r--r--core/ajax/getavatar.php14
-rw-r--r--core/css/styles.css1
-rw-r--r--core/routes.php3
3 files changed, 18 insertions, 0 deletions
diff --git a/core/ajax/getavatar.php b/core/ajax/getavatar.php
new file mode 100644
index 00000000000..66bab0230a6
--- /dev/null
+++ b/core/ajax/getavatar.php
@@ -0,0 +1,14 @@
+<?php
+
+OC_JSON::checkLoggedIn();
+OC_JSON::callCheck();
+
+if(isset($_POST['user'])) {
+ if(isset($_POST['size'])) {
+ OC_JSON::success(array('data' => \OC_Avatar::get($_POST['user'], $_POST['size'])));
+ } else {
+ OC_JSON::success(array('data' => \OC_Avatar::get($_POST['user'])));
+ }
+} else {
+ OC_JSON::error();
+}
diff --git a/core/css/styles.css b/core/css/styles.css
index 1e7098d16a2..367f3f7ca41 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -592,6 +592,7 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; }
.hidden { display:none; }
.bold { font-weight:bold; }
.center { text-align:center; }
+.inlineblock { display: inline-block; }
#notification-container { position: fixed; top: 0px; width: 100%; text-align: center; z-index: 101; line-height: 1.2;}
#notification, #update-notification { z-index:101; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position: relative; top:0; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; -moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
diff --git a/core/routes.php b/core/routes.php
index dd8222d4378..309ed7484d9 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -36,6 +36,9 @@ $this->create('core_ajax_vcategories_favorites', '/core/ajax/vcategories/favorit
->actionInclude('core/ajax/vcategories/favorites.php');
$this->create('core_ajax_vcategories_edit', '/core/ajax/vcategories/edit.php')
->actionInclude('core/ajax/vcategories/edit.php');
+// Avatars
+$this->create('core_ajax_getavatar', '/core/ajax/getavatar.php')
+ ->actionInclude('core/ajax/getavatar.php');
// oC JS config
$this->create('js_config', '/core/js/config.js')
->actionInclude('core/js/config.php');