[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonindexer.pm

www www at source.lon-capa.org
Wed Jul 11 09:23:21 EDT 2012


www		Wed Jul 11 13:23:21 2012 EDT

  Modified files:              
    /modules/gerd/harvesting	lonindexer.pm 
  Log:
  2.10 compatible
  
  
Index: modules/gerd/harvesting/lonindexer.pm
diff -u modules/gerd/harvesting/lonindexer.pm:1.7 modules/gerd/harvesting/lonindexer.pm:1.8
--- modules/gerd/harvesting/lonindexer.pm:1.7	Wed Jul 11 12:18:32 2012
+++ modules/gerd/harvesting/lonindexer.pm	Wed Jul 11 13:23:21 2012
@@ -5,7 +5,7 @@
 #
 # MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
 #
-# $Id: lonindexer.pm,v 1.7 2012/07/11 12:18:32 www Exp $
+# $Id: lonindexer.pm,v 1.8 2012/07/11 13:23:21 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -410,7 +410,6 @@
        $r->print(&Apache::loncommon::start_page(undef,$js,
 						{'only_body'   =>1,
                                                  'add_modal' => 1,
-                                                 'add_wishlist' => 1,
 						 'add_entries' =>
 						     {'onload' => "load();"},}
 						).
@@ -661,7 +660,7 @@
         if ($env{'form.catalogmode'}) {
             # "Popup mode"
             $r->print(&Apache::loncommon::start_page('Browse published resources',$js,
-                                                     {'only_body' => 1, 'add_wishlist'=>1, 'add_modal' =>1, 
+                                                     {'only_body' => 1, 'add_modal' =>1, 
                                                       'domain' => $headerdom,}));
         } else {
             # Only display page header and breadcrumbs in non-popup mode
@@ -783,7 +782,6 @@
 </table>
 <input type="hidden" name="attrs" value="1" />
 </fieldset>
-<input type="submit" name="updatedisplay" value="$lt{'ud'}" />
 <input type="hidden" name="acts" value="" />
 $closebutton $groupimportbutton
 END
@@ -1006,17 +1004,8 @@
     my $listerror;
     
     (my $luri = $uri) =~ s/\//_/g;
-    if ($env{'form.updatedisplay'}) {
-	foreach (keys %hash) {
-	    delete $hash{$_} if ($_ =~ /^dirlist_files_/);
-	    delete $hash{$_} if ($_ =~ /^dirlist_timestamp_files_/);
-	}
-    }
 
-    if (defined($hash{'dirlist_files_'.$luri}) &&
-	$hash{'dirlist_timestamp_files_'.$luri}+600 > (time)) {
-	@list = split(/\n/,$hash{'dirlist_files_'.$luri});
-    } elsif ($uri=~/\.(page|sequence)\/$/) {
+    if ($uri=~/\.(page|sequence)\/$/) {
 # is a page or a sequence
 	$uri=~s/\/$//;
 	$uri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1];
@@ -1025,21 +1014,9 @@
 	    my @ratpart=split(/\:/,$_);
 	    push(@list,&LONCAPA::map::qtescape($ratpart[1]));
 	} 
-	$hash{'dirlist_files_'.$luri} = join("\n", at list);
     } else {
 # is really a directory
-	(my $listref,$listerror) = &Apache::lonnet::dirlist($uri);
-        if (ref($listref) eq 'ARRAY') {
-            @list = @{$listref};
-        }
-	$hash{'dirlist_files_'.$luri} = join("\n", at list);
-	$hash{'dirlist_timestamp_files_'.$luri} = time;
-    }
-#Checking for error messages associated with empty directories or inaccessible servers (See Bug 4984)
-    if (($listerror eq 'no_such_dir') || ($listerror eq 'no_such_host') || ($listerror eq 'no_host')) { 
-        $r->print("<p class='LC_info'>" . &mt("Directory does not exist."). "</p>");
-    } elsif ($listerror eq 'con_lost') {
-        $r->print("<p class='LC_info'>" . &mt("Directory temporarily not accessible."). "</p>");
+	@list = &Apache::lonnet::dirlist($uri);
     }
 
     return @list=&match_ext($r, at list);    
@@ -1251,11 +1228,7 @@
 
         if (defined($plainname) && $plainname) { $r->print(" ($plainname) "); }
 # Wishlistlink
-        $r->print('</form></td><td><a href="javascript:;" '.
-                  'title="'.&mt('Save a link for this folder in your personal Stored Links repository').'" '.
-                  'onclick="set_wishlistlink('."'$plainname','$startdir$listname'".')">'.
-                  '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
-                  'alt="'.&mt('save in Stored Links').'" style="width:22px;"/></a>'.$tabtag);
+        $r->print('</form>'.$tabtag);
         $r->print(&Apache::loncommon::end_data_table_row());
         return OK;
     }
@@ -1346,12 +1319,6 @@
 	    $r->print('</form>');
 	}
 	$r->print("</td>\n");
-# Wishlistlink
-        $r->print('<td><a href="javascript:;" title="'.&mt('Save a link for this resource in your personal Stored Links repository').'" '.
-                  'onclick="set_wishlistlink('."'".&Apache::lonnet::gettitle($filelink).
-                  "','$startdir$listname'".')">'.
-                  '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
-                  'alt="'.&mt('save in Stored Links').'" style="width:22px;"/></a></td>');
 	if ($hash{'display_attrs_0'} == 1) {
 	    $r->print('<td> '.($title eq '' ? ' ' : $title).
 		      ' </td>'."\n");
@@ -1501,11 +1468,7 @@
                   ."\n");
 	$r->print ("$listname</a></form>");
 # Wishlistlink
-        $r->print('</td><td><a href="javascript:;" '.
-                  'title="'.&mt('Save a link for this folder in Stored Links').'" '.
-                  'onclick="set_wishlistlink('."'$listname','$startdir$listname'".')">'.
-                  '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
-                  'alt="'.&mt('save in Stored Links').'" style="width:22px;"/></a></td>');
+        $r->print('</td>');
 # Attributes
 	my $filelink = $startdir.$filecom[0].'/default';
 




More information about the LON-CAPA-cvs mailing list