]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
stub out facebook app and delete profile
authorEvan Prodromou <evan@prodromou.name>
Fri, 12 Dec 2008 04:46:00 +0000 (23:46 -0500)
committerEvan Prodromou <evan@prodromou.name>
Fri, 12 Dec 2008 04:46:00 +0000 (23:46 -0500)
darcs-hash:20081212044600-84dde-b9fa8240a83457f9ed41c0bcdac4b20aff1f8aed.gz

README
actions/deleteprofile.php
actions/othersettings.php

diff --git a/README b/README
index 6c73a327ac77d5bedf9bf74ab9d730b33e63f38e..a3ea5fa585cd79817146224e5828b903af7a98ab 100644 (file)
--- a/README
+++ b/README
@@ -117,6 +117,10 @@ This is a minor feature and security improvement version from version
 - Code cleanup: checkboxes have proper <label> elements
 - Code cleanup: consolidated various notice-listing code in one place
 - Better support for unsubscribing from a remote user
+- Stump of experimental Facebook application (not ready for use! code
+  review only!)
+- Stump of experimental user account deletion (not ready for use! code
+  review only!)
 
 Prerequisites
 =============
index 9823900c5f2e3db7ef1339cc800844987ebcb060..418ac998d0671fc5c0d502c596aab3ed41f4ab6f 100644 (file)
@@ -22,6 +22,8 @@ if (!defined('LACONICA')) { exit(1); }
 class DeleteprofileAction extends Action {
     function handle($args) {
         parent::handle($args);
+        $this->server_error(_('Code not yet ready.'));
+        return;
         if ('POST' === $_SERVER['REQUEST_METHOD']) {
             $this->handle_post();
         }
index d956320d898ae2061c51d1cadd0dfdcbedd5f61f..eccf90e91b3a0d7122036d468873e6ec29523f7c 100644 (file)
@@ -29,9 +29,9 @@ class OthersettingsAction extends SettingsAction {
 
        function show_form($msg=NULL, $success=false) {
                $user = common_current_user();
-               
+
                $this->form_header(_('Other Settings'), $msg, $success);
-               
+
                common_element('h2', NULL, _('URL Auto-shortening'));
                common_element_start('form', array('method' => 'post',
                                                                                   'id' => 'othersettings',
@@ -50,15 +50,15 @@ class OthersettingsAction extends SettingsAction {
                        'snipr.com' => 'snipr.com',
                        'metamark.net' => 'metamark.net'
                );
-               
+
                common_dropdown('urlshorteningservice', _('Service'), $services, _('Automatic shortening service to use.'), FALSE, $user->urlshorteningservice);
-               
+
                common_submit('save', _('Save'));
-               
+
                common_element_end('form');
 
-               common_element('h2', NULL, _('Delete my account'));
-               $this->show_delete_form();
+//             common_element('h2', NULL, _('Delete my account'));
+//             $this->show_delete_form();
 
                common_show_footer();
        }
@@ -104,34 +104,32 @@ class OthersettingsAction extends SettingsAction {
                common_element_end('li');
        }
 
-       function show_delete_form() {
-               $user = common_current_user();
-        $notices = DB_DataObject::factory('notice');
-        $notices->profile_id = $user->id;
-        $notice_count = (int) $notices->count();
-
-               common_element_start('form', array('method' => 'POST',
-                                                                                  'id' => 'delete',
-                                                                                  'action' =>
-                                                                                  common_local_url('deleteprofile')));
-
-               common_hidden('token', common_session_token());
-        common_element('p', null, "You can copy your notices and contacts by saving the two links below before deleting your account. Be careful, this operation cannot be undone.");
-
-
-               $this->show_feeds_list(array(0=>array('href'=>common_local_url('userrss', array('limit' => $notice_count, 'nickname' => $user->nickname)), 
-                                                                                         'type' => 'rss',
-                                                                                         'version' => 'RSS 1.0',
-                                                                                         'item' => 'notices'),
-                                                                        1=>array('href'=>common_local_url('foaf',array('nickname' => $user->nickname)),
-                                                                                         'type' => 'rdf',
-                                                                                         'version' => 'FOAF',
-                                                                                         'item' => 'foaf')));
-
-               common_submit('deleteaccount', _('Delete my account'));
-               common_element_end('form');
-       }
-
+//     function show_delete_form() {
+//             $user = common_current_user();
+//      $notices = DB_DataObject::factory('notice');
+//      $notices->profile_id = $user->id;
+//      $notice_count = (int) $notices->count();
+//
+//             common_element_start('form', array('method' => 'POST',
+//                                                                                'id' => 'delete',
+//                                                                                'action' =>
+//                                                                                common_local_url('deleteprofile')));
+//
+//             common_hidden('token', common_session_token());
+//      common_element('p', null, "You can copy your notices and contacts by saving the two links below before deleting your account. Be careful, this operation cannot be undone.");
+//
+//             $this->show_feeds_list(array(0=>array('href'=>common_local_url('userrss', array('limit' => $notice_count, 'nickname' => $user->nickname)),
+//                                                                                       'type' => 'rss',
+//                                                                                       'version' => 'RSS 1.0',
+//                                                                                       'item' => 'notices'),
+//                                                                      1=>array('href'=>common_local_url('foaf',array('nickname' => $user->nickname)),
+//                                                                                       'type' => 'rdf',
+//                                                                                       'version' => 'FOAF',
+//                                                                                       'item' => 'foaf')));
+//
+//             common_submit('deleteaccount', _('Delete my account'));
+//             common_element_end('form');
+//     }
 
        function handle_post() {
 
@@ -152,12 +150,12 @@ class OthersettingsAction extends SettingsAction {
        function save_preferences() {
 
                $urlshorteningservice = $this->trimmed('urlshorteningservice');
-               
+
                if (!is_null($urlshorteningservice) && strlen($urlshorteningservice) > 50) {
                        $this->show_form(_('URL shortening service is too long (max 50 chars).'));
                        return;
                }
-               
+
                $user = common_current_user();
 
                assert(!is_null($user)); # should already be checked