/[drupal]/contributions/modules/fileserv/fileserv.module
ViewVC logotype

Diff of /contributions/modules/fileserv/fileserv.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5, Sat Oct 30 02:39:08 2004 UTC revision 1.6, Wed Nov 24 22:03:32 2004 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // fileserv.module - A module to enable file downloads from an existing  // fileserv.module - A module to enable file downloads from an existing
3  // filesystem - for the Drupal content management system  // filesystem - for the Drupal content management system
4  // $Id: fileserv.module,v 1.46 2004/10/30 02:23:31 matt Exp $  // $Id: fileserv.module,v 1.5 2004/10/30 02:39:08 spoopin Exp $
5    
6    
7  function fileserv_page() {  function fileserv_page() {
# Line 35  function fileserv_page() { Line 35  function fileserv_page() {
35              fileserv_apply_properties($_POST);              fileserv_apply_properties($_POST);
36           }           }
37           if ($entry_id) { // Looking for a specific file or directory           if ($entry_id) { // Looking for a specific file or directory
38              $clean_id = check_query($entry_id);              $clean_id = db_escape_string($entry_id);
39              $result = db_query("SELECT f_type, deny_role FROM {fileserv_filelist} WHERE entry_id = '{$clean_id}'");              $result = db_query("SELECT f_type, deny_role FROM {fileserv_filelist} WHERE entry_id = '{$clean_id}'");
40              if (db_num_rows($result) != '1') {              if (db_num_rows($result) != '1') {
41                 fileserv_error_out();                 fileserv_error_out();
# Line 65  function fileserv_page() { Line 65  function fileserv_page() {
65           }           }
66           break;           break;
67        case 'editprop':        case 'editprop':
68           $clean_ent_id  = check_query($entry_id);           $clean_ent_id  = db_escape_string($entry_id);
69           $clean_edit_id = check_query($edit_id);           $clean_edit_id = db_escape_string($edit_id);
70           fileserv_edit_properties($clean_ent_id, $clean_edit_id);           fileserv_edit_properties($clean_ent_id, $clean_edit_id);
71           break;           break;
72        case 'runcron': // Update filesystem listings in DB        case 'runcron': // Update filesystem listings in DB
# Line 391  function fileserv_edit_properties($page_ Line 391  function fileserv_edit_properties($page_
391    
392  function fileserv_apply_properties($post) {  function fileserv_apply_properties($post) {
393    
394     $clean_comment = check_query($post['comment']);     $clean_comment = db_escape_string($post['comment']);
395     $clean_id      = check_query($post['edit_id']);     $clean_id      = db_escape_string($post['edit_id']);
396     unset($post['comment']);     unset($post['comment']);
397     unset($post['edit_id']);     unset($post['edit_id']);
398     // Process permissions stuff     // Process permissions stuff
# Line 639  function fileserv_cron($now = '0') { Line 639  function fileserv_cron($now = '0') {
639              }              }
640              $hash = md5($fq_name);              $hash = md5($fq_name);
641              $l = $hash{0};              $l = $hash{0};
642              $name = check_query($array_item);              $name = db_escape_string($array_item);
643              $mtime = filemtime($fq_name);              $mtime = filemtime($fq_name);
644              $parent_dir = check_query($input_dir);              $parent_dir = db_escape_string($input_dir);
645              if (!is_array($hash_array[$l])) {              if (!is_array($hash_array[$l])) {
646                 $hash_array[$l] = Array();                 $hash_array[$l] = Array();
647              }              }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2