]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #4396. No revert, remove.
authorSem <sembrestels@riseup.net>
Thu, 17 May 2012 11:48:57 +0000 (13:48 +0200)
committerSem <sembrestels@riseup.net>
Thu, 17 May 2012 11:48:57 +0000 (13:48 +0200)
actions/avatar/remove.php [moved from actions/avatar/revert.php with 70% similarity]
engine/lib/users.php
languages/en.php
views/default/core/avatar/upload.php

similarity index 70%
rename from actions/avatar/revert.php
rename to actions/avatar/remove.php
index bc84e9298b421c695630e47a7d857b70edeefe0d..cd38e456a541578ad9362150327106f8e919b56a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Avatar revert action
+ * Avatar remove action
  */
 
 $guid = get_input('guid');
@@ -14,21 +14,21 @@ if ($user) {
                $file->setFilename("profile/{$guid}{$name}.jpg");
                $filepath = $file->getFilenameOnFilestore();
                if (!$file->delete()) {
-                       elgg_log("Avatar file revert failed. Remove $filepath manually, please.", 'WARNING');
+                       elgg_log("Avatar file remove failed. Remove $filepath manually, please.", 'WARNING');
                }
        }
        
-       // Revert crop coords
+       // Remove crop coords
        unset($user->x1);
        unset($user->x2);
        unset($user->y1);
        unset($user->y2);
        
-       // Revert icon
+       // Remove icon
        unset($user->icontime);
-       system_message(elgg_echo('avatar:revert:success'));
+       system_message(elgg_echo('avatar:remove:success'));
 } else {
-       register_error(elgg_echo('avatar:revert:fail'));
+       register_error(elgg_echo('avatar:remove:fail'));
 }
 
 forward(REFERER);
index e209f2c388788f4df5c009cc006022eca3d5bce2..7d427e74343e5b7cfd915b9b2cd7293d63b57278 100644 (file)
@@ -1556,7 +1556,7 @@ function users_init() {
        elgg_register_action('friends/remove');
        elgg_register_action('avatar/upload');
        elgg_register_action('avatar/crop');
-       elgg_register_action('avatar/revert');
+       elgg_register_action('avatar/remove');
        elgg_register_action('profile/edit');
 
        elgg_register_action('friends/collections/add');
index 7b51b0c7d58a7060bc2f27c75606db7b250d89a5..4fa7506e80c49df721a6989ef25b48b55226d9e6 100644 (file)
@@ -367,7 +367,7 @@ $english = array(
        'avatar:preview' => 'Preview',
        'avatar:upload' => 'Upload a new avatar',
        'avatar:current' => 'Current avatar',
-       'avatar:revert' => 'Revert your avatar to the default icon',
+       'avatar:remove' => 'Remove your avatar and set the default icon',
        'avatar:crop:title' => 'Avatar cropping tool',
        'avatar:upload:instructions' => "Your avatar is displayed throughout the site. You can change it as often as you'd like. (File formats accepted: GIF, JPG or PNG)",
        'avatar:create:instructions' => 'Click and drag a square below to match how you want your avatar cropped. A preview will appear in the box on the right. When you are happy with the preview, click \'Create your avatar\'. This cropped version will be used throughout the site as your avatar.',
@@ -376,8 +376,8 @@ $english = array(
        'avatar:resize:fail' => 'Resize of the avatar failed',
        'avatar:crop:success' => 'Cropping the avatar succeeded',
        'avatar:crop:fail' => 'Avatar cropping failed',
-       'avatar:revert:success' => 'Reverting the avatar succeeded',
-       'avatar:revert:fail' => 'Avatar revert failed',
+       'avatar:remove:success' => 'Removing the avatar succeeded',
+       'avatar:remove:fail' => 'Avatar remove failed',
 
        'profile:edit' => 'Edit profile',
        'profile:aboutme' => "About me",
@@ -861,6 +861,7 @@ $english = array(
        'new' => 'New',
        'add' => 'Add',
        'create' => 'Create',
+       'remove' => 'Remove',
        'revert' => 'Revert',
 
        'site' => 'Site',
index 29aa59c9caff3f1eac35cd24535924c109273244..6f9124192c353c5d6a600c54ecdb8b53244ea4b2 100644 (file)
@@ -12,12 +12,12 @@ $user_avatar = elgg_view('output/img', array(
 
 $current_label = elgg_echo('avatar:current');
 
-$revert_button = '';
+$remove_button = '';
 if ($vars['entity']->icontime) {
-       $revert_button = elgg_view('output/url', array(
-               'text' => elgg_echo('revert'),
-               'title' => elgg_echo('avatar:revert'),
-               'href' => 'action/avatar/revert?guid=' . elgg_get_page_owner_guid(),
+       $remove_button = elgg_view('output/url', array(
+               'text' => elgg_echo('remove'),
+               'title' => elgg_echo('avatar:remove'),
+               'href' => 'action/avatar/remove?guid=' . elgg_get_page_owner_guid(),
                'is_action' => true,
                'class' => 'elgg-button elgg-button-cancel mll',
        ));
@@ -39,7 +39,7 @@ $image = <<<HTML
        <label>$current_label</label><br />
        $user_avatar
 </div>
-$revert_button
+$remove_button
 HTML;
 
 $body = <<<HTML