Beispiel #1
0
 public static function make_unique_filename($extention, $prefix = '', $original_filename = '', $retry_count = 3)
 {
     $name = self::make_filename($extention, $prefix, $original_filename);
     $i = 0;
     while (Model_File::check_name_exists($name)) {
         $name = self::make_filename($extention, $prefix, $original_filename);
         if ($i == $retry_count) {
             return false;
         }
         $i++;
     }
     return $name;
 }