Changeset 1592


Ignore:
Timestamp:
Nov 3, 2006, 2:26:31 AM (17 years ago)
Author:
rvelices
Message:

removed 3 never used functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r1452 r1592  
    2828include(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php');
    2929
    30 /**
    31  * returns an array with all picture files according to $conf['file_ext']
    32  *
    33  * @param string $dir
    34  * @return array
    35  */
    36 function get_pwg_files($dir)
    37 {
    38   global $conf;
    39 
    40   $pictures = array();
    41   if ($opendir = opendir($dir))
    42   {
    43     while ($file = readdir($opendir))
    44     {
    45       if (in_array(get_extension($file), $conf['file_ext']))
    46       {
    47         array_push($pictures, $file);
    48       }
    49     }
    50   }
    51   return $pictures;
    52 }
    53 
    54 /**
    55  * returns an array with all thumbnails according to $conf['picture_ext']
    56  * and $conf['prefix_thumbnail']
    57  *
    58  * @param string $dir
    59  * @return array
    60  */
    61 function get_thumb_files($dir)
    62 {
    63   global $conf;
    64 
    65   $prefix_length = strlen($conf['prefix_thumbnail']);
    66 
    67   $thumbnails = array();
    68   if ($opendir = @opendir($dir.'/thumbnail'))
    69   {
    70     while ($file = readdir($opendir))
    71     {
    72       if (in_array(get_extension($file), $conf['picture_ext'])
    73           and substr($file, 0, $prefix_length) == $conf['prefix_thumbnail'])
    74       {
    75         array_push($thumbnails, $file);
    76       }
    77     }
    78   }
    79   return $thumbnails;
    80 }
    81 
    82 /**
    83  * returns an array with representative picture files of a directory
    84  * according to $conf['picture_ext']
    85  *
    86  * @param string $dir
    87  * @return array
    88  */
    89 function get_representative_files($dir)
    90 {
    91   global $conf;
    92 
    93   $pictures = array();
    94   if ($opendir = @opendir($dir.'/pwg_representative'))
    95   {
    96     while ($file = readdir($opendir))
    97     {
    98       if (in_array(get_extension($file), $conf['picture_ext']))
    99       {
    100         array_push($pictures, $file);
    101       }
    102     }
    103   }
    104   return $pictures;
    105 }
    10630
    10731// The function delete_site deletes a site and call the function
     
    12341158    USER_GROUP_TABLE
    12351159    );
    1236  
     1160
    12371161  foreach ($tables as $table)
    12381162  {
     
    17071631    return;
    17081632  }
    1709  
     1633
    17101634  // we can't insert twice the same {image_id,tag_id} so we must first
    17111635  // delete lines we'll insert later
     
    17471671    return $page['tag_id_from_tag_name_cache'][$tag_name];
    17481672  }
    1749  
     1673
    17501674  if (function_exists('mysql_real_escape_string'))
    17511675  {
     
    18001724
    18011725    $inserts = array();
    1802    
     1726
    18031727    foreach ($tags_of as $image_id => $tag_ids)
    18041728    {
     
    18311755{
    18321756  global $prefixeTable;
    1833  
     1757
    18341758  $all_tables = array();
    18351759
     
    18501774  {
    18511775    $all_primary_key = array();
    1852    
     1776
    18531777    $query = 'DESC '.$table_name.';';
    18541778    $result = pwg_query($query);
     
    18601784      }
    18611785    }
    1862    
     1786
    18631787    if (count($all_primary_key) != 0)
    18641788    {
     
    19131837    }
    19141838  }
    1915  
     1839
    19161840  mass_inserts(
    19171841    IMAGE_CATEGORY_TABLE,
Note: See TracChangeset for help on using the changeset viewer.