Browse Source

Minor - code style changes.

Julio Montoya 11 years ago
parent
commit
a5c68a34b3
2 changed files with 5 additions and 3 deletions
  1. 1 1
      main/inc/lib/main_api.lib.php
  2. 4 2
      main/work/downloadfolder.inc.php

+ 1 - 1
main/inc/lib/main_api.lib.php

@@ -4908,7 +4908,7 @@ function api_is_element_in_the_session($tool, $element_id, $session_id = null) {
 function replace_dangerous_char($filename, $strict = 'loose') {
     // Safe replacements for some non-letter characters.
     static $search  = array(',', "\0", ' ', "\t", "\n", "\r", "\x0B", '/', "\\", '"', "'", '?', '*', '>', '<', '|', ':', '$', '(', ')', '^', '[', ']', '#', '+', '&', '%');
-    static $replace = array('_', '',   '_', '_',  '_',  '_',  '_',    '-', '-',  '-', '_', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-');
+    static $replace = array('_', '',   '_', '_',  '_',  '_',  '_', '-', '-',  '-', '_', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-');
 
     // Encoding detection.
     $encoding = api_detect_encoding($filename);

+ 4 - 2
main/work/downloadfolder.inc.php

@@ -170,7 +170,8 @@ if (!empty($files)) {
 
 /*	Extra function (only used here) */
 
-function my_pre_add_callback($p_event, &$p_header) {
+function my_pre_add_callback($p_event, &$p_header)
+{
     global $files;
     if (isset($files[basename($p_header['stored_filename'])])) {
         $p_header['stored_filename'] = $files[basename($p_header['stored_filename'])];
@@ -187,7 +188,8 @@ function my_pre_add_callback($p_event, &$p_header) {
  * @param array $arr2 second array
  * @return difference between the two arrays
  */
-function diff($arr1, $arr2) {
+function diff($arr1, $arr2)
+{
     $res = array();
     $r = 0;
     foreach ($arr1 as $av) {