From 2121ac351266a79adee962a824aa58b1a643c980 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Wed, 28 Jun 2006 11:24:19 +0000
Subject: Some minor fixes.
---
.gitattributes | 3 --
demos/quickstart/protected/application.xml | 3 --
.../protected/comments/QuickStartComments.php | 34 ++++++++++-----------
demos/quickstart/protected/index/api/_0.cfs | Bin 378721 -> 0 bytes
demos/quickstart/protected/index/api/deletable | Bin 4 -> 0 bytes
demos/quickstart/protected/index/api/segments | Bin 27 -> 0 bytes
framework/Exceptions/messages.txt | 1 +
framework/Web/UI/WebControls/TDataGridColumn.php | 1 +
8 files changed, 19 insertions(+), 23 deletions(-)
delete mode 100644 demos/quickstart/protected/index/api/_0.cfs
delete mode 100644 demos/quickstart/protected/index/api/deletable
delete mode 100644 demos/quickstart/protected/index/api/segments
diff --git a/.gitattributes b/.gitattributes
index 1577fc6a..36cd59d4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -749,9 +749,6 @@ demos/quickstart/protected/index/Zend/Search/Lucene/Storage/File.php -text
demos/quickstart/protected/index/Zend/Search/Lucene/Storage/File/Filesystem.php -text
demos/quickstart/protected/index/Zend/Search/TODO.txt -text
demos/quickstart/protected/index/ZendSearch.php -text
-demos/quickstart/protected/index/api/_0.cfs -text
-demos/quickstart/protected/index/api/deletable -text
-demos/quickstart/protected/index/api/segments -text
demos/quickstart/protected/index/quickstart/_0.cfs -text
demos/quickstart/protected/index/quickstart/deletable -text
demos/quickstart/protected/index/quickstart/segments -text
diff --git a/demos/quickstart/protected/application.xml b/demos/quickstart/protected/application.xml
index 1765230b..79ee4529 100644
--- a/demos/quickstart/protected/application.xml
+++ b/demos/quickstart/protected/application.xml
@@ -13,9 +13,6 @@
-
diff --git a/demos/quickstart/protected/comments/QuickStartComments.php b/demos/quickstart/protected/comments/QuickStartComments.php
index c138bd94..7b504caf 100644
--- a/demos/quickstart/protected/comments/QuickStartComments.php
+++ b/demos/quickstart/protected/comments/QuickStartComments.php
@@ -18,7 +18,7 @@ class QuickStartComments
* @var sqlite connection.
*/
private $_connection;
-
+
/**
* Sets the sqlite comment database file.
*/
@@ -26,7 +26,7 @@ class QuickStartComments
{
$this->_database = realpath(dirname(__FILE__).'/comments.db');
}
-
+
/**
* Closed the database connection.
*/
@@ -35,7 +35,7 @@ class QuickStartComments
if(!is_null($this->_connection))
sqlite_close($this->_connection);
}
-
+
/**
* @return resource sqlite database connection.
*/
@@ -45,7 +45,7 @@ class QuickStartComments
$this->_connection = sqlite_open($this->_database);
return $this->_connection;
}
-
+
/**
* Quote database input data.
*/
@@ -53,7 +53,7 @@ class QuickStartComments
{
return sqlite_escape_string($value);
}
-
+
/**
* Executes an sqlite query.
* @param string SQL
@@ -63,7 +63,7 @@ class QuickStartComments
{
return sqlite_query($this->getConnection(), $sql);
}
-
+
/**
* Returns a row from the sqlite result.
* @param resource sqlite result
@@ -76,7 +76,7 @@ class QuickStartComments
else
return false;
}
-
+
/**
* Fetch all the records for given SQL query.
* @param string SQL query.
@@ -90,7 +90,7 @@ class QuickStartComments
$rows[] = $row;
return $rows;
}
-
+
/**
* Returns all the comments for a given page.
* @param string specific page comments
@@ -99,10 +99,10 @@ class QuickStartComments
public function getComments($pageID)
{
$page = $this->quote($pageID);
- $sql = "SELECT * FROM comments WHERE page=\"$page\" AND approved = 1 ORDER BY date_added ASC";
+ $sql = "SELECT * FROM comments WHERE page='$page' AND approved = 1 ORDER BY date_added ASC";
return $this->fetchAll($sql);
}
-
+
/**
* Adds a new comment for moderation.
* @param string ID of the page to comment belongs
@@ -117,11 +117,11 @@ class QuickStartComments
$date_added = time();
$sql = <<query($sql);
}
-
+
/**
* Update an existing comment.
* @param string comment ID
@@ -136,13 +136,13 @@ EOD;
$comment = $this->quote($content);
$page = $this->quote($page);
$sql = <<query($sql);
}
-
+
/**
* Delete a comment.
* @param string comment ID
@@ -152,7 +152,7 @@ EOD;
$ID = intval($commentID);
$this->query("DELETE FROM comments WHERE id=$ID");
}
-
+
/**
* @return array all the quequed comments.
*/
@@ -160,7 +160,7 @@ EOD;
{
return $this->fetchAll("SELECT * FROM comments WHERE approved != 1");
}
-
+
/**
* Approve a quequed comment.
* @param string comment ID.
diff --git a/demos/quickstart/protected/index/api/_0.cfs b/demos/quickstart/protected/index/api/_0.cfs
deleted file mode 100644
index b5eb219b..00000000
Binary files a/demos/quickstart/protected/index/api/_0.cfs and /dev/null differ
diff --git a/demos/quickstart/protected/index/api/deletable b/demos/quickstart/protected/index/api/deletable
deleted file mode 100644
index 593f4708..00000000
Binary files a/demos/quickstart/protected/index/api/deletable and /dev/null differ
diff --git a/demos/quickstart/protected/index/api/segments b/demos/quickstart/protected/index/api/segments
deleted file mode 100644
index da225127..00000000
Binary files a/demos/quickstart/protected/index/api/segments and /dev/null differ
diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt
index 8bc1cd6f..60b57d78 100644
--- a/framework/Exceptions/messages.txt
+++ b/framework/Exceptions/messages.txt
@@ -292,6 +292,7 @@ parametermodule_parameterfile_unchangeable = TParameterModule.ParameterFile is n
parametermodule_parameterfile_invalid = TParameterModule.ParameterFile '{0}' is invalid. Make sure it is in namespace format and the file extension is '.xml'.
parametermodule_parameterid_required = Parameter element must have 'id' attribute.
+datagridcolumn_id_invalid = {0}.ID '{1}' is invalid. Only alphanumeric and underline characters are allowed. The first character must be an alphabetic or underline character.
datagridcolumn_expression_invalid = {0} is evaluating an invalid expression '{1}' : {2}
outputcache_duration_invalid = {0}.Duration must be an integer no less than 0.
diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php
index fcb2e261..8c34b85f 100644
--- a/framework/Web/UI/WebControls/TDataGridColumn.php
+++ b/framework/Web/UI/WebControls/TDataGridColumn.php
@@ -68,6 +68,7 @@ abstract class TDataGridColumn extends TApplicationComponent
* By explicitly specifying the column ID, one can access the column
* by $templateControl->ColumnID.
* @param string the ID of the column.
+ * @throws TInvalidDataValueException if the ID is of bad format
*/
public function setID($value)
{
--
cgit v1.2.3