Advertisement
Guest User

piwigo plugin virtualize patch 2.4

a guest
Jul 3rd, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. --- admin.php.orig  2012-07-03 09:38:04.865063239 +0200
  2. +++ admin.php   2012-07-03 09:40:05.897094419 +0200
  3. @@ -45,8 +45,6 @@
  4.  SELECT
  5.      path AS oldpath,
  6.      date_available,
  7. -    has_high,
  8. -    tn_ext,
  9.      id
  10.    FROM '.IMAGES_TABLE.'
  11.    WHERE path NOT LIKE \'./upload/%\'
  12. @@ -55,10 +53,12 @@
  13.   while ($row = pwg_db_fetch_assoc($result))
  14.   {
  15.     $file_for_md5sum  = $row['oldpath'];
  16. +    /*
  17.     if ('true' == $row['has_high'])
  18.     {
  19.       $file_for_md5sum = dirname($row['oldpath']).'/pwg_high/'.basename($row['oldpath']);
  20.     }
  21. +     */
  22.     $md5sum = md5_file($file_for_md5sum);
  23.  
  24.     list($year, $month, $day, $hour, $minute, $second) = preg_split('/[^\d]+/', $row['date_available']);
  25. @@ -68,7 +68,7 @@
  26.     {
  27.       umask(0000);
  28.       $recursive = true;
  29. -      if (!@mkdir($upload_dir, 0777, $recursive))
  30. +      if (!@mkdir($upload_dir, 0755, $recursive))
  31.       {
  32.         echo 'error during "'.$upload_dir.'" directory creation';
  33.         exit();
  34. @@ -91,6 +91,7 @@
  35.     rename($row['oldpath'], $newpath);
  36.  
  37.     # high definition
  38. +    /*
  39.     if ('true' == $row['has_high'])
  40.     {
  41.       $high_dir = $upload_dir.'/pwg_high';
  42. @@ -111,8 +112,10 @@
  43.         $high_dir.'/'.$newfilename
  44.         );
  45.     }
  46. +     */
  47.  
  48.     # thumbnail
  49. +    /*
  50.     $tn_dir = $upload_dir.'/thumbnail';
  51.  
  52.     if (!is_dir($tn_dir))
  53. @@ -135,6 +138,7 @@
  54.       $tn_dir.'/'.$conf['prefix_thumbnail'].$newfilename
  55.       );
  56.    
  57. +     */
  58.     // break;
  59.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement