diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/3rdParty/SafeHtml/TSafeHtmlParser.php | 3 | ||||
-rw-r--r-- | framework/DataAccess/SQLMap/Statements/TMappedStatement.php | 1 | ||||
-rw-r--r-- | framework/DataAccess/TDatabaseProvider.php | 11 | ||||
-rw-r--r-- | framework/DataAccess/TSQLMap.php | 9 |
4 files changed, 16 insertions, 8 deletions
diff --git a/framework/3rdParty/SafeHtml/TSafeHtmlParser.php b/framework/3rdParty/SafeHtml/TSafeHtmlParser.php index a51e203c..36b28274 100644 --- a/framework/3rdParty/SafeHtml/TSafeHtmlParser.php +++ b/framework/3rdParty/SafeHtml/TSafeHtmlParser.php @@ -267,7 +267,8 @@ class TSafeHtmlParser * @var array
* @access public
*/
- public $attributes = array('dynsrc', 'id', 'name', );
+ public $attributes = array('dynsrc');
+ //public $attributes = array('dynsrc', 'id', 'name', ); //id and name are dangerous?
/**
* List of allowed "namespaced" attributes
diff --git a/framework/DataAccess/SQLMap/Statements/TMappedStatement.php b/framework/DataAccess/SQLMap/Statements/TMappedStatement.php index 3dc100dc..ef2a5273 100644 --- a/framework/DataAccess/SQLMap/Statements/TMappedStatement.php +++ b/framework/DataAccess/SQLMap/Statements/TMappedStatement.php @@ -374,7 +374,6 @@ class TMappedStatement extends TComponent implements IMappedStatement while($row = $recordSet->fetchRow())
$object = $this->applyResultMap($row, $result);
- //var_dump($this->_groupBy);
if(!$this->_groupBy->isEmpty())
{
$list = $this->_groupBy->collect();
diff --git a/framework/DataAccess/TDatabaseProvider.php b/framework/DataAccess/TDatabaseProvider.php index 067c7243..88c78505 100644 --- a/framework/DataAccess/TDatabaseProvider.php +++ b/framework/DataAccess/TDatabaseProvider.php @@ -103,16 +103,19 @@ abstract class TDatabaseProvider extends TModule }
/**
- * If the driver is <tt>sqlite</tt>, the host must be dot path to the sqlite
- * file. E.g. "<tt>Application.pages.my_db</tt>". The database filename
- * should not contain any dots.
+ * If the driver is <tt>sqlite</tt>, the host must be dot directory of to
+ * the sqlite file. E.g. "<tt>Application.pages.my_db</tt>". The database
+ * filename must be specified by the <tt>Database</tt> attribute.
* @return string database host name/IP (and port number) in the format
* "host[:port]"
*/
public function getHost()
{
if(strtolower($this->getDriver()) == "sqlite")
- return Prado::getPathOfNamespace($this->_host);
+ {
+ $dir = Prado::getPathOfNamespace($this->_host);
+ return $dir.'/'.$this->getDatabase();
+ }
else
return $this->_host;
}
diff --git a/framework/DataAccess/TSQLMap.php b/framework/DataAccess/TSQLMap.php index 27973047..956593de 100644 --- a/framework/DataAccess/TSQLMap.php +++ b/framework/DataAccess/TSQLMap.php @@ -11,6 +11,11 @@ class TSQLMap extends TModule */
const CONFIG_FILE_EXT='.xml';
+ protected function getCacheKey()
+ {
+ return $this->getID().$this->getConfigFile();
+ }
+
/**
* Saves the current sqlmap instance to cache.
* @return boolean true if sqlmap was cached, false otherwise.
@@ -21,7 +26,7 @@ class TSQLMap extends TModule {
$cache = $this->getApplication()->getCache();
if(!is_null($cache))
- return $cache->add($this->getID(), $this->_sqlmap);
+ return $cache->add($this->getCacheKey(), $this->_sqlmap);
}
return false;
}
@@ -37,7 +42,7 @@ class TSQLMap extends TModule $cache = $this->getApplication()->getCache();
Prado::using('System.DataAccess.SQLMap.TSqlMapper');
if(!is_null($cache))
- $this->_sqlmap = $cache->get($this->getID());
+ $this->_sqlmap = $cache->get($this->getCacheKey());
return $this->_sqlmap instanceof TSqlMapper;
}
return false;
|