[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6538] trunk



Revision: 6538
          http://sourceforge.net/p/ledger-smb/code/6538
Author:   einhverfr
Date:     2014-01-19 02:16:07 +0000 (Sun, 19 Jan 2014)
Log Message:
-----------
Removing unused api's in LedgerSMB::Form.  Aside from debug which never really worked all that well, the removed apis do nothing.

Modified Paths:
--------------
    trunk/LedgerSMB/Auth.pm
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Session.pm
    trunk/t/10-form.t

Modified: trunk/LedgerSMB/Auth.pm
===================================================================
--- trunk/LedgerSMB/Auth.pm	2014-01-19 02:05:09 UTC (rev 6537)
+++ trunk/LedgerSMB/Auth.pm	2014-01-19 02:16:07 UTC (rev 6538)
@@ -18,20 +18,6 @@
 
 =over
 
-=item session_check
-
-Check whether a session exists and handle failure appropriately.
-
-Modules are free to define how failure should be addressed.
-
-=item session_create
-
-Create a session
-
-=item session_destroy
-
-Destroy a session.
-
 =item get_credentials
 
 Get credentials and return them to the application.

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2014-01-19 02:05:09 UTC (rev 6537)
+++ trunk/LedgerSMB/Form.pm	2014-01-19 02:16:07 UTC (rev 6538)
@@ -272,55 +272,7 @@
 Identical with check_form() above, but also removes the form_id from the 
 session.  This should be used when back-button actions are not valid.
 
-=item $form->debug([$file]);
 
-Outputs the sorted contents of $form.  If a filename is specified, log to it,
-otherwise output to STDOUT.
-
-=cut
-
-sub debug {
-
-    my ( $self, $file ) = @_;
-
-    if ($file) {
-        open( FH, '>', "$file" ) or die $!;
-        for ( sort keys %$self ) 
-        {   
-            $self->{$_} = "" unless defined $self->{$_};
-            print FH "$_ = $self->{$_}\n";
-        }
-        close(FH);
-    }
-    else {
-        print "\n";
-        for ( sort keys %$self ) { print "$_ = $self->{$_}\n" }
-    }
-
-}
-
-=item $form->encode_all();
-
-Does nothing and is unused.  Contains merely the comment # TODO;
-
-=cut
-
-sub encode_all {
-
-    # TODO;
-}
-
-=item $form->decode_all();
-
-Does nothing and is unused.  Contains merely the comment # TODO
-
-=cut
-
-sub decode_all {
-
-    # TODO
-}
-
 =item $form->escape($str[, $beenthere]);
 
 Returns the URI-encoded $str.  $beenthere is a boolean that when true forces a

Modified: trunk/LedgerSMB/Session.pm
===================================================================
--- trunk/LedgerSMB/Session.pm	2014-01-19 02:05:09 UTC (rev 6537)
+++ trunk/LedgerSMB/Session.pm	2014-01-19 02:16:07 UTC (rev 6538)
@@ -17,6 +17,7 @@
 
 use LedgerSMB::Sysconfig;
 use Log::Log4perl;
+use LedgerSMB::Auth;
 use strict;
 
 my $logger = Log::Log4perl->get_logger('LedgerSMB');
@@ -109,6 +110,7 @@
                  $secure = ' Secure;';
             }
         print qq|Set-Cookie: ${LedgerSMB::Sysconfig::cookie_name}=; path=$path;$secure\n|;
+        LedgerSMB::Auth::credential_prompt(); 
         return 0;
     }
 }

Modified: trunk/t/10-form.t
===================================================================
--- trunk/t/10-form.t	2014-01-19 02:05:09 UTC (rev 6537)
+++ trunk/t/10-form.t	2014-01-19 02:16:07 UTC (rev 6538)
@@ -155,10 +155,6 @@
 cmp_ok($form->numtextrows("hello world\n12345678901234567890\n", 20, 3), '==', 2,
 	'numtextrows: 2 rows (3 max)');
 
-## $form->debug checks
-$form = new Form;
-@r = trap{$form->debug};
-like($trap->stdout, qr/\naction = \ndbversion = \d+\.\d+\.\d+\nlogin = \nnextsub = \npath = bin\/mozilla\nversion = $form->{version}\n/, 'debug: STDOUT');
 SKIP: {
 	skip 'Environment for file test not clean' if -f "t/lsmb-10.$$";
 	$form->debug("t/lsmb-10.$$");

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits