Changeset 976 in svn for trunk/admin/xcache.php


Ignore:
Timestamp:
2012-07-14T06:44:18+02:00 (3 years ago)
Author:
Xuefer
Message:

closes #174: updated api for clear all cache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/xcache.php

    r934 r976  
    239239        if (isset($_POST['clearcache'])) {
    240240            $count = xcache_count($type);
    241             if ($cacheid == $count) {
     241            if ($cacheid >= 0) {
    242242                for ($cacheid = 0; $cacheid < $count; $cacheid ++) {
    243243                    xcache_clear_cache($type, $cacheid);
     
    245245            }
    246246            else {
    247                 xcache_clear_cache($type, $cacheid);
     247                xcache_clear_cache($type);
    248248            }
    249249        }
     
    272272    $total['type'] = XC_TYPE_PHP;
    273273    $total['cache_name'] = _T('Total');
    274     $total['cacheid'] = $pcnt;
     274    $total['cacheid'] = -1;
    275275    $total['gc'] = null;
    276276    $total['istotal'] = true;
     
    296296    $total['type'] = XC_TYPE_VAR;
    297297    $total['cache_name'] = _T('Total');
    298     $total['cacheid'] = $vcnt;
     298    $total['cacheid'] = -1;
    299299    $total['gc'] = null;
    300300    $total['istotal'] = true;
Note: See TracChangeset for help on using the changeset viewer.