diff options
-rw-r--r-- | core/avatar/controller.php | 2 | ||||
-rw-r--r-- | lib/cleanupavatarjob.php | 13 | ||||
-rw-r--r-- | settings/js/personal.js | 8 | ||||
-rw-r--r-- | settings/personal.php | 2 |
4 files changed, 7 insertions, 18 deletions
diff --git a/core/avatar/controller.php b/core/avatar/controller.php index c889385c21d..8492ee909c6 100644 --- a/core/avatar/controller.php +++ b/core/avatar/controller.php @@ -91,7 +91,7 @@ class OC_Core_Avatar_Controller { // TODO deliver actual size here as well, so Jcrop can do its magic and we have the actual coordinates here again // TODO or don't have a size parameter and only resize client sided (looks promising) // - // TODO make a cronjob that cleans up the tmpavatar after it's older than 2 hours, should be run every hour + // TODO move the tmpavatar to the cache instead, so it's cleaned up after some time $user = OC_User::getUser(); $view = new \OC\Files\View('/'.$user); diff --git a/lib/cleanupavatarjob.php b/lib/cleanupavatarjob.php deleted file mode 100644 index 16bf263d211..00000000000 --- a/lib/cleanupavatarjob.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -class CleanUpAvatarJob extends \OC\BackgroundJob\TimedJob { - - public function __construct () { - $this->setInterval(7200); // 2 hours - } - - public function run ($argument) { - // TODO $view - // TODO remove ALL the tmpavatars - } -} diff --git a/settings/js/personal.js b/settings/js/personal.js index 5d9219dd7e5..e873eb1336e 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -45,7 +45,7 @@ function changeDisplayName(){ } function selectAvatar (path) { - $.post(OC.router_base_url+'/avatar/', {path: path}, avatarResponseHandler); + $.post(OC.Router.generate('core_avatar_post'), {path: path}, avatarResponseHandler); } function updateAvatar () { @@ -74,7 +74,7 @@ function showAvatarCropper() { onSelect: saveCoords, aspectRatio: 1 }); - }).attr('src', OC.router_base_url+'/avatartmp/512'); + }).attr('src', OC.Router.generate('core_avatar_get_tmp', {size: 512})); } function sendCropData() { @@ -86,7 +86,7 @@ function sendCropData() { w: cropperdata.w, h: cropperdata.h }; - $.post(OC.router_base_url+'/avatar/cropped', {crop: data}, avatarResponseHandler); + $.post(OC.Router.generate('core_avatar_post_cropped'), {crop: data}, avatarResponseHandler); } function saveCoords(c) { @@ -214,7 +214,7 @@ $(document).ready(function(){ $('#removeavatar').click(function(){ $.ajax({ type: 'DELETE', - url: OC.router_base_url+'/avatar/', + url: OC.Router.generate('core_avatar_delete'), success: function(msg) { updateAvatar(); } diff --git a/settings/personal.php b/settings/personal.php index b0d62645d5a..c54fad28e1f 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -18,6 +18,8 @@ OC_Util::addStyle( '3rdparty', 'chosen' ); \OC_Util::addScript('files', 'jquery.fileupload'); \OC_Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop.min'); \OC_Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop.min'); +//OC_Util::addScript('3rdparty', 'md5/md5.min'); +//OC_Util::addScript('core', 'placeholder'); OC_App::setActiveNavigationEntry( 'personal' ); $storageInfo=OC_Helper::getStorageInfo('/'); |