summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-14 22:36:10 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:21:24 +0200
commit6215202c20ab394f273c4b79b71f80003bf757f4 (patch)
tree855c7f22e027bda35cf97de9d566cd00b41f13af /demos/quickstart/protected/pages/Tutorial/AjaxChat.page
parent30cd2aea091bdf455cb8d3464264ba7292330a96 (diff)
Removed TJavascriptLogger from demos and tests
Any browser’s development tool is way better, and it stops exceptions from being catched by the browser’s console (cherry picked from commit 0a136fe37491281ada5084b6eb5a72d4ca8d948a)
Diffstat (limited to 'demos/quickstart/protected/pages/Tutorial/AjaxChat.page')
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/AjaxChat.page7
1 files changed, 3 insertions, 4 deletions
diff --git a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
index d94dfa89..4a8f23ab 100755
--- a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
+++ b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
@@ -170,7 +170,7 @@ as <tt>App_Code/chat.db</tt>.
class ChatUserRecord extends TActiveRecord
{
const TABLE='chat_users';
-
+
public $username;
public $last_activity;
@@ -431,7 +431,6 @@ and a button to send the message.
Text="Send" /&gt;
</div>
&lt;/com:TForm&gt;
-&lt;com:TJavascriptLogger /&gt;
</body>
</html>
</com:TTextHighlighter>
@@ -572,7 +571,7 @@ public function getUserMessages($user)
$content = '';
foreach($this->findAll('for_user = ?', $user) as $message)
$content .= $this->formatMessage($message);
- $this->deleteAll('for_user = ? OR created_on < ?',
+ $this->deleteAll('for_user = ? OR created_on < ?',
$user, time() - 300); //5 min inactivity
return $content;
}
@@ -581,7 +580,7 @@ protected function formatMessage($message)
{
$user = htmlspecialchars($message->from_user);
$content = htmlspecialchars($message->message);
- return "<div class=\"message\"><strong>{$user}:</strong>"
+ return "<div class=\"message\"><strong>{$user}:</strong>"
." <span>{$content}</span></div>";
}
</com:TTextHighlighter>