[LON-CAPA-cvs] cvs: loncom /cgi quotacheck.pl

musolffc musolffc at source.lon-capa.org
Thu Jul 31 11:02:26 EDT 2014


musolffc		Thu Jul 31 15:02:26 2014 EDT

  Modified files:              
    /loncom/cgi	quotacheck.pl 
  Log:
  Defined string constant "$script" to clean up code
  
  
Index: loncom/cgi/quotacheck.pl
diff -u loncom/cgi/quotacheck.pl:1.2 loncom/cgi/quotacheck.pl:1.3
--- loncom/cgi/quotacheck.pl:1.2	Fri Jun 13 18:50:07 2014
+++ loncom/cgi/quotacheck.pl	Thu Jul 31 15:02:26 2014
@@ -6,7 +6,7 @@
 # requested domain, or current server should belong to requested
 # domain.
 #
-# $Id: quotacheck.pl,v 1.2 2014/06/13 18:50:07 raeburn Exp $
+# $Id: quotacheck.pl,v 1.3 2014/07/31 15:02:26 musolffc Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -51,6 +51,8 @@
 }
 undef($perlvar);
 
+my $script = "/cgi-bin/quotacheck.pl";
+
 print &LONCAPA::loncgi::cgi_header('text/html',1);
 &main($lonhost);
 
@@ -59,7 +61,7 @@
     if ($lonhost eq '') {
         &Apache::lonlocal::get_language_handle();
         &Apache::lonhtmlcommon::add_breadcrumb
-        ({href=>"/cgi-bin/quotacheck.pl",
+        ({href=>$script,
           text=>"Content disk usage"});
         print(&Apache::loncommon::start_page('Course/Community disk usage and quotas').
               &Apache::lonhtmlcommon::breadcrumbs('Course/Community status').
@@ -121,11 +123,11 @@
 
     &Apache::lonlocal::get_language_handle();
     &Apache::lonhtmlcommon::add_breadcrumb
-    ({href=>"/cgi-bin/quotacheck.pl?domain=$reqdom",
+    ({href=>$script."?domain=$reqdom",
        text=>"Content disk usage"});
     if ($params{'gosearch'}) {
         &Apache::lonhtmlcommon::add_breadcrumb
-            ({href=>"/cgi-bin/quotacheck.pl?domain=$reqdom",
+            ({href=>$script."?domain=$reqdom",
               text=>"Result"});
     }
     my $domdesc = &Apache::lonnet::domain($reqdom,'description');
@@ -158,7 +160,7 @@
             $Apache::lonnet::env{'form.state'} = $params{'state'};
         }
         print(&Apache::loncommon::build_filters($filterlist,$crstype,undef,undef,$filter,
-                                                '/cgi-bin/quotacheck.pl',\$numtitles,
+                                                $script,\$numtitles,
                                                 'quotacheck',undef,undef,undef,
                                                 \@codetitles,$reqdom,'quotacheck',$reqdom));
         if ($params{'gosearch'}) {
@@ -197,7 +199,7 @@
                   '</p>'."\n".
                   '<p class="LC_info">'.
                   &Apache::lonlocal::mt('Show quotas for the domain being coordinated: [_1]',
-                                        '<a href="/cgi-bin/quotacheck.pl?domain='.$domain.'">'.
+                                        '<a href="'.$script.'?domain='.$domain.'">'.
                                         $otherdomdesc.'</a>').
                   '</p>');
             return;




More information about the LON-CAPA-cvs mailing list