Plugin Directory

Changeset 165987


Ignore:
Timestamp:
10/22/2009 09:12:17 PM (16 years ago)
Author:
johanee
Message:

Fix file storage size, and debuginfo on non available

Location:
cache-translation-object/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cache-translation-object/trunk/cache-translation-object-file.php

    r165890 r165987  
    7272
    7373    closedir($handle);
     74
     75    if (!$count)
     76        return false;
     77    if ($count == 1)
     78        return $size;
    7479
    7580    $msg = sprintf(__('%d bytes cached','cache-translation'), $size)
     
    183188    } else {
    184189        while (false !== ($file_name = readdir($handle))) {
     190            if ($file_name == '.' || $file_name == '..')
     191                continue;
     192
    185193            $file = $path . '/' . $file_name;
    186194            $dir = is_dir($file) ? '[dir]' : '';
  • cache-translation-object/trunk/cache-translation-object-shm.php

    r165890 r165987  
    148148         *
    149149         * For the records array this is common. For ordinary objects it
    150          * appears that it is hard to actually delete SHM object which means
    151          * we can get here after a cach flush.
     150         * appears that it is sometimes hard (especially in some versions of
     151         * Windows) to actually delete SHM object which means we can get here
     152         * after a cach flush.
    152153         */
    153154        $shm_id = _cachet_shm_access($key, "w");
  • cache-translation-object/trunk/cache-translation-object.php

    r165890 r165987  
    261261    if (!is_string($call))
    262262        return false;
    263     if ($call != 'available' && !cachet_storage_available($type))
     263    if ($call != 'available' && $call != 'debuginfo'
     264        && !cachet_storage_available($type))
    264265        return false;
    265266    if (!is_null($locale) && !is_string($locale))
Note: See TracChangeset for help on using the changeset viewer.