Changeset 3168
- Timestamp:
- 07/20/2008 08:34:36 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 14 modified
-
index.php (modified) (2 diffs)
-
modules/archive/libraries/Archive.php (modified) (2 diffs)
-
modules/payment/libraries/drivers/Payment/Yourpay.php (modified) (1 diff)
-
modules/smarty/controllers/smarty_demo.php (modified) (1 diff)
-
modules/smarty/libraries/MY_Smarty.php (modified) (1 diff)
-
system/config/routes.php (modified) (1 diff)
-
system/core/Kohana.php (modified) (4 diffs)
-
system/helpers/file.php (modified) (1 diff)
-
system/helpers/upload.php (modified) (1 diff)
-
system/libraries/Captcha.php (modified) (2 diffs)
-
system/libraries/Image.php (modified) (1 diff)
-
system/libraries/Router.php (modified) (1 diff)
-
system/libraries/drivers/Cache/Sqlite.php (modified) (1 diff)
-
system/libraries/drivers/Image/ImageMagick.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r2750 r3168 93 93 { 94 94 // Check APPPATH 95 if ( ! (is_dir(APPPATH) AND file_exists(APPPATH.'config/config'.EXT)))95 if ( ! (is_dir(APPPATH) AND is_file(APPPATH.'config/config'.EXT))) 96 96 { 97 97 die … … 106 106 107 107 // Check SYSPATH 108 if ( ! (is_dir(SYSPATH) AND file_exists(SYSPATH.'core/Bootstrap'.EXT)))108 if ( ! (is_dir(SYSPATH) AND is_file(SYSPATH.'core/Bootstrap'.EXT))) 109 109 { 110 110 die -
trunk/modules/archive/libraries/Archive.php
r3163 r3168 62 62 empty($name) and $name = $path; 63 63 64 if ( file_exists($path) ANDis_dir($path))64 if (is_dir($path)) 65 65 { 66 66 // Force directories to end with a slash … … 109 109 throw new Kohana_Exception('archive.directory_unwritable', $directory); 110 110 111 if ( file_exists($filename))111 if (is_file($filename)) 112 112 { 113 113 // Unable to write to the file -
trunk/modules/payment/libraries/drivers/Payment/Yourpay.php
r3163 r3168 56 56 { 57 57 // Check to make sure the certificate is valid 58 $this->certificate = (file_exists($config['certificate'])) ? $config['certificate'] : FALSE;58 $this->certificate = is_file($config['certificate']) ? $config['certificate'] : FALSE; 59 59 60 60 if (!$this->certificate) -
trunk/modules/smarty/controllers/smarty_demo.php
r2532 r3168 6 6 const ALLOW_PRODUCTION = FALSE; 7 7 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!"; 12 12 13 $welcome->render(TRUE);14 }13 $welcome->render(TRUE); 14 } 15 15 } -
trunk/modules/smarty/libraries/MY_Smarty.php
r3163 r3168 60 60 public function checkDirectory($directory) 61 61 { 62 if ((! file_exists($directory) AND ! @mkdir($directory, 0755)) OR ! is_writ eable($directory) OR !is_executable($directory))62 if ((! file_exists($directory) AND ! @mkdir($directory, 0755)) OR ! is_writable($directory) OR !is_executable($directory)) 63 63 { 64 64 $error = 'Compile/Cache directory "%s" is not writeable/executable'; -
trunk/system/config/routes.php
r2568 r3168 3 3 * @package Core 4 4 * 5 * Default route to use when no URI segments are available.5 * Sets the default route to "welcome" 6 6 */ 7 7 $config['_default'] = 'welcome'; -
trunk/system/core/Kohana.php
r3164 r3168 563 563 $filename = self::log_directory().date('Y-m-d').'.log'.EXT; 564 564 565 if ( ! file_exists($filename))565 if ( ! is_file($filename)) 566 566 { 567 567 // Write the SYSPATH checking header … … 605 605 $dir = realpath($dir); 606 606 607 if ( file_exists($dir) ANDis_dir($dir) AND is_writable($dir))607 if (is_dir($dir) AND is_writable($dir)) 608 608 { 609 609 // Change the log directory … … 634 634 $path = APPPATH.'cache/kohana_'.$name; 635 635 636 if ( file_exists($path))636 if (is_file($path)) 637 637 { 638 638 // Check the file modification time … … 671 671 { 672 672 // Delete cache 673 return ( file_exists($path) and unlink($path));673 return (is_file($path) and unlink($path)); 674 674 } 675 675 else -
trunk/system/helpers/file.php
r3160 r3168 36 36 { 37 37 // Make sure the file is readable 38 if ( ! file_exists($filename) OR ! is_file($filename) OR ! is_readable($filename))38 if ( ! (is_file($filename) AND is_readable($filename))) 39 39 return FALSE; 40 40 -
trunk/system/helpers/upload.php
r3160 r3168 48 48 $directory = rtrim($directory, '/').'/'; 49 49 50 if ( ! file_exists($directory) AND Kohana::config('upload.create_directories') === TRUE)50 if ( ! is_dir($directory) AND Kohana::config('upload.create_directories') === TRUE) 51 51 { 52 52 // Create the upload directory -
trunk/system/libraries/Captcha.php
r3160 r3168 105 105 self::$config['background'] = str_replace('\\', '/', realpath($config['background'])); 106 106 107 if ( ! file_exists(self::$config['background']))107 if ( ! is_file(self::$config['background'])) 108 108 throw new Kohana_Exception('captcha.file_not_found', self::$config['background']); 109 109 } … … 116 116 foreach ($config['fonts'] as $font) 117 117 { 118 if ( ! file_exists(self::$config['fontpath'].$font))118 if ( ! is_file(self::$config['fontpath'].$font)) 119 119 throw new Kohana_Exception('captcha.file_not_found', self::$config['fontpath'].$font); 120 120 } -
trunk/system/libraries/Image.php
r3160 r3168 72 72 73 73 // Check to make sure the image exists 74 if ( ! file_exists($image))74 if ( ! is_file($image)) 75 75 throw new Kohana_Exception('image.file_not_found', $image); 76 76 -
trunk/system/libraries/Router.php
r3160 r3168 109 109 $dir .= 'controllers/'; 110 110 111 if ( file_exists($dir.$controller_path) OR file_exists($dir.$controller_path.EXT))111 if (is_dir($dir.$controller_path) OR is_file($dir.$controller_path.EXT)) 112 112 { 113 113 // Valid path -
trunk/system/libraries/drivers/Cache/Sqlite.php
r3160 r3168 43 43 44 44 // Make sure the cache database is writable 45 if ( file_exists($filename) AND ! is_writable($filename))45 if (is_file($filename) AND ! is_writable($filename)) 46 46 throw new Kohana_Exception('cache.unwritable', $filename); 47 47 -
trunk/system/libraries/drivers/Image/ImageMagick.php
r2709 r3168 43 43 44 44 // Check to make sure the provided path is correct 45 if ( ! file_exists(realpath($config['directory']).'/convert'.$this->ext))45 if ( ! is_file(realpath($config['directory']).'/convert'.$this->ext)) 46 46 throw new Kohana_Exception('image.imagemagick.not_found', 'convert'.$this->ext); 47 47
