Changeset 3168 for trunk/modules/smarty

Show
Ignore:
Timestamp:
07/20/2008 08:34:36 PM (4 months ago)
Author:
Shadowhand
Message:

Replacing file_exists calls with is_file and is_dir, where possible.

Location:
trunk/modules/smarty
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/smarty/controllers/smarty_demo.php

    r2532 r3168  
    66        const ALLOW_PRODUCTION = FALSE;     
    77 
    8     public function index() 
    9     { 
    10         $welcome = new View('demo'); 
    11         $welcome->message = "Welcome to the Kohana!"; 
     8        public function index() 
     9        { 
     10                $welcome = new View('demo'); 
     11                $welcome->message = "Welcome to the Kohana!"; 
    1212 
    13         $welcome->render(TRUE); 
    14     } 
     13                $welcome->render(TRUE); 
     14        } 
    1515} 
  • trunk/modules/smarty/libraries/MY_Smarty.php

    r3163 r3168  
    6060        public function checkDirectory($directory) 
    6161        { 
    62                 if ((! file_exists($directory) AND ! @mkdir($directory, 0755)) OR ! is_writeable($directory) OR !is_executable($directory))  
     62                if ((! file_exists($directory) AND ! @mkdir($directory, 0755)) OR ! is_writable($directory) OR !is_executable($directory))  
    6363                { 
    6464                        $error = 'Compile/Cache directory "%s" is not writeable/executable';