Changeset 54
- Timestamp:
- 02/03/06 09:01:11
- Files:
-
- trunk/autopackage.php (modified) (2 diffs)
- trunk/package.php (modified) (2 diffs)
- trunk/patConfiguration.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/autopackage.php
r51 r54 18 18 /** 19 19 * uses PackageFileManager 20 */ 20 */ 21 21 require_once 'PEAR/PackageFileManager.php'; 22 22 … … 54 54 - added missing examples 55 55 - prevent PHP-Notices with issetConfigValue() (bug #145, contributed by Frank Kleine) 56 - fixed and improved the "could not load xxx for filetype" error message (argh) 56 57 EOT; 57 58 trunk/package.php
r52 r54 18 18 /** 19 19 * uses PackageFileManager 20 */ 20 */ 21 21 require_once 'PEAR/PackageFileManager.php'; 22 22 … … 48 48 - added missing examples 49 49 - prevent PHP-Notices with issetConfigValue() (bug #145, contributed by Frank Kleine) 50 - fixed and improved the "could not load xxx for filetype" error message (argh) 50 51 EOT; 51 52 trunk/patConfiguration.php
r50 r54 145 145 'alwaysUseCache' => false 146 146 ); 147 147 148 148 /** 149 149 * constructor … … 270 270 return true; 271 271 } 272 272 273 273 /** 274 274 * get an option … … 287 287 return $this->options[$name]; 288 288 } 289 289 290 290 /** 291 291 * load a configuration … … 315 315 return $this->loadCachedConfig($file, $options); 316 316 } 317 317 318 318 // do not append => clear old config 319 319 if ($options['mode'] == 'w') { 320 320 $this->conf = array(); 321 321 } 322 322 323 323 // no filetype given, extract from filename 324 if (isset( $options['filetype'] ) && !empty( $options['filetype'] )) { 324 if (isset( $options['filetype'] ) && !empty( $options['filetype'] )) { 325 325 $filetype = $options['filetype']; 326 326 } else { … … 468 468 $inConfigDir = true; 469 469 } 470 470 471 471 if( $inConfigDir === true ) { 472 472 if (!empty( $this->configDir )) { … … 483 483 return $fullPath; 484 484 } 485 485 486 486 $realPath = realpath( $fullPath ); 487 487 if( empty( $realPath ) ) { … … 542 542 if( !file_exists( $driverFile ) ) { 543 543 return patErrorManager::raiseError( 544 PATCONFIGURATION_ERROR_UNKNOWN_DRIVER, 545 'Could not load $mode for \''.$filetype.'\'.' 546 ); 544 PATCONFIGURATION_ERROR_UNKNOWN_DRIVER, 545 'Could not load '.$mode.' for "'.$filetype.'". Note that patConfiguration '. 546 'determines the filetype from the file\'s extension, so if you use an exotic '. 547 'extension you should set the "filetype" option in your method call (you can '. 548 'do this with the loadConfigFile() and loadCachedConfigFile() methods.)' 549 ); 547 550 } 548 551 // include writer … … 606 609 } 607 610 break; 608 611 609 612 case 'startCache': 610 613 $result = unserialize( fread( $fp, filesize( $cacheFile ) ) ); … … 679 682 ); 680 683 } 681 684 682 685 // options had to be specified as third param prior to version 2.0 683 686 if (is_array( $oldOptions )) { … … 716 719 ); 717 720 } 718 721 719 722 flock( $fp, LOCK_EX ); 720 723 fputs( $fp, $content ); … … 724 727 chmod( $file, 0666 ); 725 728 umask( $oldMask ); 726 729 727 730 return true; 728 731 } … … 861 864 return $tmp[$index]; 862 865 } 863 return false; 866 return false; 864 867 } 865 868
