From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001
From: ctrlaltca <>
Date: Thu, 12 Jul 2012 11:21:01 +0000
Subject: standardize the use of unix eol; use svn properties to enforce native
eol
---
demos/chat/protected/pages/Home.php | 110 ++++++++++++++++++------------------
1 file changed, 55 insertions(+), 55 deletions(-)
(limited to 'demos/chat/protected/pages/Home.php')
diff --git a/demos/chat/protected/pages/Home.php b/demos/chat/protected/pages/Home.php
index 65cb22dc..bdcb2d3b 100644
--- a/demos/chat/protected/pages/Home.php
+++ b/demos/chat/protected/pages/Home.php
@@ -1,56 +1,56 @@
-Application->User->Name;
- if(!$this->Application->Modules['users']->usernameExists($username))
- {
- $auth = $this->Application->Modules['auth'];
- $auth->logout();
-
- //redirect to login page.
- $this->Response->Redirect($this->Service->ConstructUrl($auth->LoginPage));
- }
- }
-
- function processMessage($sender, $param)
- {
- if(strlen($this->userinput->Text) > 0)
- {
- $record = new ChatBufferRecord();
- $record->message = $this->userinput->Text;
- $record->from_user = $this->Application->User->Name;
- $record->saveMessage();
- $this->userinput->Text = '';
- $this->refresh($sender, $param);
- $this->CallbackClient->focus($this->userinput);
- }
- }
-
- function refresh($sender, $param)
- {
- //refresh the message list
- $content = ChatBufferRecord::finder()->getUserMessages($this->Application->User->Name);
- if(strlen($content) > 0)
- {
- $client = $this->Page->CallbackClient;
- $anchor = (string)time();
- $content .= " ";
- $client->appendContent("messages", $content);
- $client->focus($anchor);
- }
-
- //refresh the user list
- $lastUpdate = $this->getViewState('userList','');
- $users = ChatUserRecord::finder()->getUserList();
- if($lastUpdate != $users)
- {
- $this->Page->CallbackClient->update('users', $users);
- $this->setViewstate('userList', $users);
- }
- }
-}
-
+Application->User->Name;
+ if(!$this->Application->Modules['users']->usernameExists($username))
+ {
+ $auth = $this->Application->Modules['auth'];
+ $auth->logout();
+
+ //redirect to login page.
+ $this->Response->Redirect($this->Service->ConstructUrl($auth->LoginPage));
+ }
+ }
+
+ function processMessage($sender, $param)
+ {
+ if(strlen($this->userinput->Text) > 0)
+ {
+ $record = new ChatBufferRecord();
+ $record->message = $this->userinput->Text;
+ $record->from_user = $this->Application->User->Name;
+ $record->saveMessage();
+ $this->userinput->Text = '';
+ $this->refresh($sender, $param);
+ $this->CallbackClient->focus($this->userinput);
+ }
+ }
+
+ function refresh($sender, $param)
+ {
+ //refresh the message list
+ $content = ChatBufferRecord::finder()->getUserMessages($this->Application->User->Name);
+ if(strlen($content) > 0)
+ {
+ $client = $this->Page->CallbackClient;
+ $anchor = (string)time();
+ $content .= " ";
+ $client->appendContent("messages", $content);
+ $client->focus($anchor);
+ }
+
+ //refresh the user list
+ $lastUpdate = $this->getViewState('userList','');
+ $users = ChatUserRecord::finder()->getUserList();
+ if($lastUpdate != $users)
+ {
+ $this->Page->CallbackClient->update('users', $users);
+ $this->setViewstate('userList', $users);
+ }
+ }
+}
+
?>
\ No newline at end of file
--
cgit v1.2.3