~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to lib/editor/htmlarea/coursefiles.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php // $Id: coursefiles.php,v 1.13 2007/01/27 23:23:45 skodak Exp $
 
1
<?php // $Id: coursefiles.php,v 1.13.8.3 2008/07/11 02:28:32 scyrma Exp $
2
2
 
3
3
//  Manage all uploaded files in a course file area
4
4
 
439
439
                }
440
440
 
441
441
                if (!zip_files($files,"$basedir/$wdir/$name")) {
442
 
                    error(get_string("zipfileserror","error"));
 
442
                    print_error("zipfileserror","error");
443
443
                }
444
444
 
445
445
                clearfilelist();
491
491
                $file = basename($file);
492
492
 
493
493
                if (!unzip_file("$basedir/$wdir/$file")) {
494
 
                    error(get_string("unzipfileserror","error"));
 
494
                    print_error("unzipfileserror","error");
495
495
                }
496
496
 
497
497
                echo "<center><form action=\"coursefiles.php\" method=\"get\">\n";
755
755
                print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" onclick=\";return set_rename('$file');\" />");
756
756
            }
757
757
            echo "<td align=\"left\" nowrap=\"nowrap\">";
758
 
            if ($CFG->slasharguments) {
759
 
                $ffurl = "/file.php/$id$fileurl";
760
 
            } else {
761
 
                $ffurl = "/file.php?file=/$id$fileurl";
762
 
            }
 
758
            $ffurl = get_file_url($id.$fileurl);
763
759
            link_to_popup_window ($ffurl, "display",
764
760
                                  "<img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" />",
765
761
                                  480, 640);
766
762
            $file_size = filesize($filename);
767
763
 
768
 
            echo "<a onclick=\"return set_value(info = {url: '".$CFG->wwwroot.$ffurl."',";
 
764
            echo "<a onclick=\"return set_value(info = {url: '".$ffurl."',";
769
765
            echo " isize: '".$file_size."', itype: '".$imgtype."', iwidth: '".$imgwidth."',";
770
766
            echo " iheight: '".$imgheight."', imodified: '".$filedate."' })\" href=\"#\">$file</a>";
771
767
            echo "</td>\n";