Taddeus Kroes 14 лет назад
Родитель
Сommit
8184990d64
2 измененных файлов с 4 добавлено и 3 удалено
  1. 2 1
      pquery.php
  2. 2 2
      pquery.template.php

+ 2 - 1
pquery.php

@@ -275,7 +275,8 @@ class pQuery {
 	}
 	
 	/**
-	 * Assert that the given constants have been defined. Add the prefix 'PQUERY_' to each constant name.
+	 * Assert that the given constants have been defined.
+	 * Add the prefix 'PQUERY_' to each constant name.
 	 */
 	static function assert_defined(/* $constant1 [ , $constant2, ... ] */) {
 		$constants = func_get_args();

+ 2 - 2
pquery.template.php

@@ -61,8 +61,8 @@ class pQueryTemplate extends pQuery implements pQueryExtension {
 		$found = false;
 		$filename = $this->variable;
 		
-		// Add default extension
-		strpos($filename, '.') || $filename .= '.'.self::DEFAULT_EXTENSION;
+		// Add default extension if none is found
+		strpos($filename, '.') === false && $filename .= '.'.self::DEFAULT_EXTENSION;
 		
 		foreach( self::$include_path as $root ) {
 			$path = $root.$filename;