Changeset 1de0187a18dcbe504b456f6a4c6267d1878f062a
- Timestamp:
- 01/28/12 20:58:51 (4 months ago)
- Author:
- Xemle <xemle@phtagr.org>
- Children:
- 0736ab3ac681bfd827d0973122d3a48e4b39594e
- Parents:
- b243ec7e35d1927db9132cdb0c1f9473054612d2
- git-committer:
- Xemle <xemle@phtagr.org> / 2012-01-28T20:58:51Z+0100
- Message:
-
Fix default options for users
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rf52b4cb
|
r1de0187
|
|
| 109 | 109 | $user = $this->getUser(); |
| 110 | 110 | } |
| 111 | | $this->params['options'] = $this->Option->getOptions($user); |
| | 111 | $this->request->params['options'] = $this->Option->getOptions($user); |
| 112 | 112 | $this->set('currentUser', $user); |
| 113 | 113 | |
-
|
ree4c2b7f
|
r1de0187
|
|
| 104 | 104 | $this->request->data['Comment']['media_id'] = $mediaId; |
| 105 | 105 | $this->request->data['Comment']['date'] = date("Y-m-d H:i:s", time()); |
| 106 | | uses('Sanitize'); |
| | 106 | App::uses('Sanitize', 'Utility'); |
| 107 | 107 | $this->request->data['Comment']['text'] = Sanitize::html($this->request->data['Comment']['text']); |
| 108 | 108 | if (($auth & COMMENT_AUTH_NAME) == 0) { |
-
|
rbbc826a
|
r1de0187
|
|
| 39 | 39 | if (strlen($name) > 2 && substr($name, -2) == '[]') { |
| 40 | 40 | $options[] = $default[$this->name]; |
| 41 | | } else if ($ownOptions && in_array($name, $ownOptions)) { |
| | 41 | } else if ($ownOptions && !in_array($name, $ownOptions)) { |
| 42 | 42 | $options[] = $default[$this->name]; |
| 43 | 43 | } |
-
|
ree4c2b7f
|
r1de0187
|
|
| 16 | 16 | $name = $this->Html->link($comment['name'], $comment['url']); |
| 17 | 17 | } |
| 18 | | $this->Time = $this->Html->tag('span', $this->Time->timeAgoInWords($comment['date']), array('class' => 'date')); |
| 19 | | __("%s said %s", $name, $this->Time); |
| | 18 | $time = $this->Html->tag('span', $this->Time->timeAgoInWords($comment['date']), array('class' => 'date')); |
| | 19 | __("%s said %s", $name, $time); |
| 20 | 20 | ?> |
| 21 | 21 | <?php |
-
|
r1a41cea
|
r1de0187
|
|
| 29 | 29 | /** Intitialize the options */ |
| 30 | 30 | function beforeRender() { |
| 31 | | if (isset($this->params['options'])) { |
| 32 | | $this->options = $this->params['options']; |
| | 31 | if (isset($this->request->params['options'])) { |
| | 32 | $this->options = $this->request->params['options']; |
| 33 | 33 | } |
| 34 | 34 | } |