aboutsummaryrefslogtreecommitdiff
path: root/actions/avatar/revert.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-05-17 13:48:57 +0200
committerSem <sembrestels@riseup.net>2012-05-17 13:48:57 +0200
commitf848e3ada3e29c17cc5028d7d9edad8035706334 (patch)
tree29056a1b1a37d4eb3e43c877464fa360cfc716f1 /actions/avatar/revert.php
parent3643efd144c3a9190018100665d02ec798989bfd (diff)
downloadelgg-f848e3ada3e29c17cc5028d7d9edad8035706334.tar.gz
elgg-f848e3ada3e29c17cc5028d7d9edad8035706334.tar.bz2
Refs #4396. No revert, remove.
Diffstat (limited to 'actions/avatar/revert.php')
-rw-r--r--actions/avatar/revert.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/actions/avatar/revert.php b/actions/avatar/revert.php
deleted file mode 100644
index bc84e9298..000000000
--- a/actions/avatar/revert.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * Avatar revert action
- */
-
-$guid = get_input('guid');
-$user = get_entity($guid);
-if ($user) {
- // Delete all icons from diskspace
- $icon_sizes = elgg_get_config('icon_sizes');
- foreach ($icon_sizes as $name => $size_info) {
- $file = new ElggFile();
- $file->owner_guid = $guid;
- $file->setFilename("profile/{$guid}{$name}.jpg");
- $filepath = $file->getFilenameOnFilestore();
- if (!$file->delete()) {
- elgg_log("Avatar file revert failed. Remove $filepath manually, please.", 'WARNING');
- }
- }
-
- // Revert crop coords
- unset($user->x1);
- unset($user->x2);
- unset($user->y1);
- unset($user->y2);
-
- // Revert icon
- unset($user->icontime);
- system_message(elgg_echo('avatar:revert:success'));
-} else {
- register_error(elgg_echo('avatar:revert:fail'));
-}
-
-forward(REFERER);