Changeset 10026

Show
Ignore:
Timestamp:
11/28/08 14:38:07 (1 month ago)
Author:
afz
Message:

cosmetics and take lesser process and memory in urlmapper caching

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.8/jaws/html/include/Jaws/URLMapping.php

    r9858 r10026  
    239239        } 
    240240 
    241         $arrayAsString = "<?php\n" . $this->ToArrayString($custom) . "?>"
     241        $arrayAsString = "<?php\n" . $this->ToArrayString($custom)
    242242        $mapFile = $map_dir . (($custom === false)? 'core.php' : 'custom.php'); 
    243         if (file_put_contents($mapFile, $arrayAsString) !== false) { 
    244             Jaws_Utils::chmod($mapFile); 
    245         } 
     243        Jaws_Utils::file_put_contents($mapFile, $arrayAsString); 
    246244    } 
    247245 
     
    518516                    } 
    519517 
    520                     $uniqueKey = md5(uniqid(rand(), true)); 
    521                     $res .= "\$map['{$gadget}']['{$action}']['{$uniqueKey}'] = array(\n"; 
     518                    $res .= "\$map['{$gadget}']['{$action}'][] = array(\n"; 
    522519                    $res .= "\t\t\t\t'map' => '{$map['map']}',\n"; 
    523520                    $res .= "\t\t\t\t'file'  => '{$map['file']}',\n";