@@ -181,6 +181,9 @@ |
||
181 | 181 | ); |
182 | 182 | } |
183 | 183 | |
184 | + /** |
|
185 | + * @param string[] $methods |
|
186 | + */ |
|
184 | 187 | public function mock($methods = null) { |
185 | 188 | $Collection = new ComponentCollection(); |
186 | 189 | $this->CurrentUser = new CurrentUserComponent($Collection); |
@@ -1,204 +1,204 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | - use Saito\User\ReadPostings; |
|
4 | - |
|
5 | - App::uses('CurrentUserComponent', 'Controller/Component'); |
|
6 | - |
|
7 | - class ReadPostingsCookieMock extends ReadPostings\ReadPostingsCookie { |
|
8 | - |
|
9 | - /** |
|
10 | - * @param mixed $maxPostings |
|
11 | - */ |
|
12 | - public function setMaxPostings($maxPostings) { |
|
13 | - $this->_maxPostings = $maxPostings; |
|
14 | - } |
|
15 | - |
|
16 | - public function setCookie($Cookie) { |
|
17 | - $this->_Cookie = $Cookie; |
|
18 | - } |
|
19 | - |
|
20 | - public function setLastRefresh($LR) { |
|
21 | - $this->_LastRefresh = $LR; |
|
22 | - } |
|
23 | - |
|
24 | - public function __get($name) { |
|
25 | - $property = '_' . $name; |
|
26 | - if (property_exists($this, $property)) { |
|
27 | - return $this->{$property}; |
|
28 | - } |
|
29 | - } |
|
30 | - |
|
31 | - public function __call($name, $arguments) { |
|
32 | - $method = '_' . $name; |
|
33 | - if (is_callable([$this, $method])) { |
|
34 | - return call_user_func_array([$this, $method], $arguments); |
|
35 | - } |
|
36 | - } |
|
37 | - |
|
38 | - } |
|
39 | - |
|
40 | - class ReadPostingsCookieTest extends CakeTestCase { |
|
41 | - |
|
42 | - /** |
|
43 | - * @var CurrentUserComponent; |
|
44 | - */ |
|
45 | - public $CurrentUser; |
|
46 | - |
|
47 | - public function testAbstractIsReadNoTimestamp() { |
|
48 | - $this->mock(); |
|
49 | - $this->ReadPostings->Cookie->expects($this->once()) |
|
50 | - ->method('read') |
|
51 | - ->will($this->returnValue('1.6')); |
|
52 | - |
|
53 | - $this->ReadPostings->LastRefresh->expects($this->never()) |
|
54 | - ->method('isNewerThan'); |
|
55 | - |
|
56 | - $this->assertTrue($this->ReadPostings->isRead(1)); |
|
57 | - $this->assertTrue($this->ReadPostings->isRead(6)); |
|
58 | - $this->assertFalse($this->ReadPostings->isRead(2)); |
|
59 | - } |
|
60 | - |
|
61 | - public function testAbstractIsReadWithTimestamp() { |
|
62 | - $this->mock(); |
|
63 | - $this->ReadPostings->Cookie->expects($this->once()) |
|
64 | - ->method('read') |
|
65 | - ->will($this->returnValue('1')); |
|
66 | - |
|
67 | - $time = time(); |
|
68 | - |
|
69 | - $this->ReadPostings->LastRefresh->expects($this->at(0)) |
|
70 | - ->method('isNewerThan') |
|
71 | - ->with($time) |
|
72 | - ->will($this->returnValue(null)); |
|
73 | - $this->ReadPostings->LastRefresh->expects($this->at(1)) |
|
74 | - ->method('isNewerThan') |
|
75 | - ->with($time + 1) |
|
76 | - ->will($this->returnValue(null)); |
|
77 | - $this->ReadPostings->LastRefresh->expects($this->at(2)) |
|
78 | - ->method('isNewerThan') |
|
79 | - ->with($time + 2) |
|
80 | - ->will($this->returnValue(true)); |
|
81 | - $this->ReadPostings->LastRefresh->expects($this->at(3)) |
|
82 | - ->method('isNewerThan') |
|
83 | - ->with($time + 3) |
|
84 | - ->will($this->returnValue(false)); |
|
85 | - |
|
86 | - $this->assertTrue($this->ReadPostings->isRead(1, $time)); |
|
87 | - $this->assertFalse($this->ReadPostings->isRead(2, $time + 1)); |
|
88 | - $this->assertTrue($this->ReadPostings->isRead(3, $time + 2)); |
|
89 | - $this->assertFalse($this->ReadPostings->isRead(4, $time + 3)); |
|
90 | - } |
|
91 | - |
|
92 | - public function testGet() { |
|
93 | - $this->mock(); |
|
94 | - $this->ReadPostings->Cookie->expects($this->once()) |
|
95 | - ->method('read') |
|
96 | - ->will($this->returnValue('1.6')); |
|
97 | - |
|
98 | - $this->ReadPostings->isRead(1); |
|
99 | - |
|
100 | - //# test class cache is set |
|
101 | - $expected = [1 => 1, 6 => 1]; |
|
102 | - $actual = $this->ReadPostings->readPostings; |
|
103 | - $this->assertEquals($expected, $actual); |
|
104 | - |
|
105 | - // test caching: should not read cookie a second time |
|
106 | - $this->ReadPostings->isRead(6); |
|
107 | - } |
|
108 | - |
|
109 | - public function testSet() { |
|
110 | - $this->mock(['_gc', '_get']); |
|
111 | - $this->ReadPostings->expects($this->once()) |
|
112 | - ->method('_gc'); |
|
113 | - $this->ReadPostings->expects($this->once()) |
|
114 | - ->method('_get') |
|
115 | - ->will($this->returnValue([1 => 1, 2 => 1])); |
|
116 | - |
|
117 | - $time = time(); |
|
118 | - $this->ReadPostings->LastRefresh->expects($this->at(0)) |
|
119 | - ->method('isNewerThan') |
|
120 | - ->with($time) |
|
121 | - ->will($this->returnValue(false)); |
|
122 | - $this->ReadPostings->LastRefresh->expects($this->at(1)) |
|
123 | - ->method('isNewerThan') |
|
124 | - ->with($time + 1) |
|
125 | - ->will($this->returnValue(true)); |
|
126 | - $this->ReadPostings->LastRefresh->expects($this->at(2)) |
|
127 | - ->method('isNewerThan') |
|
128 | - ->with($time + 2) |
|
129 | - ->will($this->returnValue(false)); |
|
130 | - |
|
131 | - /* |
|
3 | + use Saito\User\ReadPostings; |
|
4 | + |
|
5 | + App::uses('CurrentUserComponent', 'Controller/Component'); |
|
6 | + |
|
7 | + class ReadPostingsCookieMock extends ReadPostings\ReadPostingsCookie { |
|
8 | + |
|
9 | + /** |
|
10 | + * @param mixed $maxPostings |
|
11 | + */ |
|
12 | + public function setMaxPostings($maxPostings) { |
|
13 | + $this->_maxPostings = $maxPostings; |
|
14 | + } |
|
15 | + |
|
16 | + public function setCookie($Cookie) { |
|
17 | + $this->_Cookie = $Cookie; |
|
18 | + } |
|
19 | + |
|
20 | + public function setLastRefresh($LR) { |
|
21 | + $this->_LastRefresh = $LR; |
|
22 | + } |
|
23 | + |
|
24 | + public function __get($name) { |
|
25 | + $property = '_' . $name; |
|
26 | + if (property_exists($this, $property)) { |
|
27 | + return $this->{$property}; |
|
28 | + } |
|
29 | + } |
|
30 | + |
|
31 | + public function __call($name, $arguments) { |
|
32 | + $method = '_' . $name; |
|
33 | + if (is_callable([$this, $method])) { |
|
34 | + return call_user_func_array([$this, $method], $arguments); |
|
35 | + } |
|
36 | + } |
|
37 | + |
|
38 | + } |
|
39 | + |
|
40 | + class ReadPostingsCookieTest extends CakeTestCase { |
|
41 | + |
|
42 | + /** |
|
43 | + * @var CurrentUserComponent; |
|
44 | + */ |
|
45 | + public $CurrentUser; |
|
46 | + |
|
47 | + public function testAbstractIsReadNoTimestamp() { |
|
48 | + $this->mock(); |
|
49 | + $this->ReadPostings->Cookie->expects($this->once()) |
|
50 | + ->method('read') |
|
51 | + ->will($this->returnValue('1.6')); |
|
52 | + |
|
53 | + $this->ReadPostings->LastRefresh->expects($this->never()) |
|
54 | + ->method('isNewerThan'); |
|
55 | + |
|
56 | + $this->assertTrue($this->ReadPostings->isRead(1)); |
|
57 | + $this->assertTrue($this->ReadPostings->isRead(6)); |
|
58 | + $this->assertFalse($this->ReadPostings->isRead(2)); |
|
59 | + } |
|
60 | + |
|
61 | + public function testAbstractIsReadWithTimestamp() { |
|
62 | + $this->mock(); |
|
63 | + $this->ReadPostings->Cookie->expects($this->once()) |
|
64 | + ->method('read') |
|
65 | + ->will($this->returnValue('1')); |
|
66 | + |
|
67 | + $time = time(); |
|
68 | + |
|
69 | + $this->ReadPostings->LastRefresh->expects($this->at(0)) |
|
70 | + ->method('isNewerThan') |
|
71 | + ->with($time) |
|
72 | + ->will($this->returnValue(null)); |
|
73 | + $this->ReadPostings->LastRefresh->expects($this->at(1)) |
|
74 | + ->method('isNewerThan') |
|
75 | + ->with($time + 1) |
|
76 | + ->will($this->returnValue(null)); |
|
77 | + $this->ReadPostings->LastRefresh->expects($this->at(2)) |
|
78 | + ->method('isNewerThan') |
|
79 | + ->with($time + 2) |
|
80 | + ->will($this->returnValue(true)); |
|
81 | + $this->ReadPostings->LastRefresh->expects($this->at(3)) |
|
82 | + ->method('isNewerThan') |
|
83 | + ->with($time + 3) |
|
84 | + ->will($this->returnValue(false)); |
|
85 | + |
|
86 | + $this->assertTrue($this->ReadPostings->isRead(1, $time)); |
|
87 | + $this->assertFalse($this->ReadPostings->isRead(2, $time + 1)); |
|
88 | + $this->assertTrue($this->ReadPostings->isRead(3, $time + 2)); |
|
89 | + $this->assertFalse($this->ReadPostings->isRead(4, $time + 3)); |
|
90 | + } |
|
91 | + |
|
92 | + public function testGet() { |
|
93 | + $this->mock(); |
|
94 | + $this->ReadPostings->Cookie->expects($this->once()) |
|
95 | + ->method('read') |
|
96 | + ->will($this->returnValue('1.6')); |
|
97 | + |
|
98 | + $this->ReadPostings->isRead(1); |
|
99 | + |
|
100 | + //# test class cache is set |
|
101 | + $expected = [1 => 1, 6 => 1]; |
|
102 | + $actual = $this->ReadPostings->readPostings; |
|
103 | + $this->assertEquals($expected, $actual); |
|
104 | + |
|
105 | + // test caching: should not read cookie a second time |
|
106 | + $this->ReadPostings->isRead(6); |
|
107 | + } |
|
108 | + |
|
109 | + public function testSet() { |
|
110 | + $this->mock(['_gc', '_get']); |
|
111 | + $this->ReadPostings->expects($this->once()) |
|
112 | + ->method('_gc'); |
|
113 | + $this->ReadPostings->expects($this->once()) |
|
114 | + ->method('_get') |
|
115 | + ->will($this->returnValue([1 => 1, 2 => 1])); |
|
116 | + |
|
117 | + $time = time(); |
|
118 | + $this->ReadPostings->LastRefresh->expects($this->at(0)) |
|
119 | + ->method('isNewerThan') |
|
120 | + ->with($time) |
|
121 | + ->will($this->returnValue(false)); |
|
122 | + $this->ReadPostings->LastRefresh->expects($this->at(1)) |
|
123 | + ->method('isNewerThan') |
|
124 | + ->with($time + 1) |
|
125 | + ->will($this->returnValue(true)); |
|
126 | + $this->ReadPostings->LastRefresh->expects($this->at(2)) |
|
127 | + ->method('isNewerThan') |
|
128 | + ->with($time + 2) |
|
129 | + ->will($this->returnValue(false)); |
|
130 | + |
|
131 | + /* |
|
132 | 132 | * 1: already stored, will be stored again but not twice |
133 | 133 | * 2: already stored, will be stored again |
134 | 134 | * 3: not stored, older than last refresh |
135 | 135 | * 4: newly stored |
136 | 136 | */ |
137 | - $this->ReadPostings->Cookie->expects($this->once()) |
|
138 | - ->method('write') |
|
139 | - ->with('1.2.4'); |
|
140 | - $this->ReadPostings->set([ |
|
141 | - ['Entry' => ['id' => 1, 'time' => $time]], |
|
142 | - ['Entry' => ['id' => 3, 'time' => $time + 1]], |
|
143 | - ['Entry' => ['id' => 4, 'time' => $time + 2]] |
|
144 | - ] |
|
145 | - ); |
|
146 | - |
|
147 | - // test that cookie is unencrypted |
|
148 | - $this->assertFalse($this->ReadPostings->Cookie->encrypt); |
|
149 | - |
|
150 | - // test that class cache is updated |
|
151 | - $expected = [1 => 1, 2 => 1, 4 => 1]; |
|
152 | - $actual = $this->ReadPostings->readPostings; |
|
153 | - $this->assertEquals($expected, $actual); |
|
154 | - } |
|
155 | - |
|
156 | - public function testSetSingle() { |
|
157 | - $this->mock(); |
|
158 | - |
|
159 | - $this->ReadPostings->LastRefresh->expects($this->at(0)) |
|
160 | - ->method('isNewerThan') |
|
161 | - ->will($this->returnValue(false)); |
|
162 | - $this->ReadPostings->Cookie->expects($this->once()) |
|
163 | - ->method('write') |
|
164 | - ->with('4'); |
|
165 | - |
|
166 | - $this->ReadPostings->set(['Entry' => ['id' => 4, 'time' => 0]]); |
|
167 | - } |
|
168 | - |
|
169 | - public function testGc() { |
|
170 | - $this->mock(); |
|
171 | - $this->ReadPostings->Cookie->expects($this->once()) |
|
172 | - ->method('write') |
|
173 | - ->with('5.6'); |
|
174 | - |
|
175 | - $this->ReadPostings->setMaxPostings(2); |
|
176 | - $this->ReadPostings->set([ |
|
177 | - ['Entry' => ['id' => 1, 'time' => 0]], |
|
178 | - ['Entry' => ['id' => 5, 'time' => 1]], |
|
179 | - ['Entry' => ['id' => 6, 'time' => 2]] |
|
180 | - ] |
|
181 | - ); |
|
182 | - } |
|
183 | - |
|
184 | - public function mock($methods = null) { |
|
185 | - $Collection = new ComponentCollection(); |
|
186 | - $this->CurrentUser = new CurrentUserComponent($Collection); |
|
187 | - $this->ReadPostings = $this->getMock( |
|
188 | - 'ReadPostingsCookieMock', |
|
189 | - $methods, |
|
190 | - [$this->CurrentUser] |
|
191 | - ); |
|
192 | - |
|
193 | - $this->ReadPostings->setCookie($this->getMock('Object', ['read', 'write', 'delete'])); |
|
194 | - $this->ReadPostings->setLastRefresh($this->getMock('Object', ['isNewerThan'])); |
|
195 | - } |
|
196 | - |
|
197 | - public function tearDown() { |
|
198 | - $this->ReadPostings->Cookie->delete(); |
|
199 | - unset($this->ReadPostings); |
|
200 | - unset($this->CurrentUser); |
|
201 | - parent::tearDown(); |
|
202 | - } |
|
203 | - |
|
204 | - } |
|
137 | + $this->ReadPostings->Cookie->expects($this->once()) |
|
138 | + ->method('write') |
|
139 | + ->with('1.2.4'); |
|
140 | + $this->ReadPostings->set([ |
|
141 | + ['Entry' => ['id' => 1, 'time' => $time]], |
|
142 | + ['Entry' => ['id' => 3, 'time' => $time + 1]], |
|
143 | + ['Entry' => ['id' => 4, 'time' => $time + 2]] |
|
144 | + ] |
|
145 | + ); |
|
146 | + |
|
147 | + // test that cookie is unencrypted |
|
148 | + $this->assertFalse($this->ReadPostings->Cookie->encrypt); |
|
149 | + |
|
150 | + // test that class cache is updated |
|
151 | + $expected = [1 => 1, 2 => 1, 4 => 1]; |
|
152 | + $actual = $this->ReadPostings->readPostings; |
|
153 | + $this->assertEquals($expected, $actual); |
|
154 | + } |
|
155 | + |
|
156 | + public function testSetSingle() { |
|
157 | + $this->mock(); |
|
158 | + |
|
159 | + $this->ReadPostings->LastRefresh->expects($this->at(0)) |
|
160 | + ->method('isNewerThan') |
|
161 | + ->will($this->returnValue(false)); |
|
162 | + $this->ReadPostings->Cookie->expects($this->once()) |
|
163 | + ->method('write') |
|
164 | + ->with('4'); |
|
165 | + |
|
166 | + $this->ReadPostings->set(['Entry' => ['id' => 4, 'time' => 0]]); |
|
167 | + } |
|
168 | + |
|
169 | + public function testGc() { |
|
170 | + $this->mock(); |
|
171 | + $this->ReadPostings->Cookie->expects($this->once()) |
|
172 | + ->method('write') |
|
173 | + ->with('5.6'); |
|
174 | + |
|
175 | + $this->ReadPostings->setMaxPostings(2); |
|
176 | + $this->ReadPostings->set([ |
|
177 | + ['Entry' => ['id' => 1, 'time' => 0]], |
|
178 | + ['Entry' => ['id' => 5, 'time' => 1]], |
|
179 | + ['Entry' => ['id' => 6, 'time' => 2]] |
|
180 | + ] |
|
181 | + ); |
|
182 | + } |
|
183 | + |
|
184 | + public function mock($methods = null) { |
|
185 | + $Collection = new ComponentCollection(); |
|
186 | + $this->CurrentUser = new CurrentUserComponent($Collection); |
|
187 | + $this->ReadPostings = $this->getMock( |
|
188 | + 'ReadPostingsCookieMock', |
|
189 | + $methods, |
|
190 | + [$this->CurrentUser] |
|
191 | + ); |
|
192 | + |
|
193 | + $this->ReadPostings->setCookie($this->getMock('Object', ['read', 'write', 'delete'])); |
|
194 | + $this->ReadPostings->setLastRefresh($this->getMock('Object', ['isNewerThan'])); |
|
195 | + } |
|
196 | + |
|
197 | + public function tearDown() { |
|
198 | + $this->ReadPostings->Cookie->delete(); |
|
199 | + unset($this->ReadPostings); |
|
200 | + unset($this->CurrentUser); |
|
201 | + parent::tearDown(); |
|
202 | + } |
|
203 | + |
|
204 | + } |
@@ -22,14 +22,14 @@ |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | public function __get($name) { |
25 | - $property = '_' . $name; |
|
25 | + $property = '_'.$name; |
|
26 | 26 | if (property_exists($this, $property)) { |
27 | 27 | return $this->{$property}; |
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | 31 | public function __call($name, $arguments) { |
32 | - $method = '_' . $name; |
|
32 | + $method = '_'.$name; |
|
33 | 33 | if (is_callable([$this, $method])) { |
34 | 34 | return call_user_func_array([$this, $method], $arguments); |
35 | 35 | } |
@@ -26,6 +26,9 @@ discard block |
||
26 | 26 | $this->_testSingleLine($this->nextId - 1); |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param integer $id |
|
31 | + */ |
|
29 | 32 | protected function _testSingleLine($id) { |
30 | 33 | $this->_testInlineCloseButtons($id); |
31 | 34 | $this->_testInlineAnswerCloseButton($id); |
@@ -57,6 +60,9 @@ discard block |
||
57 | 60 | $this->assertFalse($this->_isPostingVisible($id)); |
58 | 61 | } |
59 | 62 | |
63 | + /** |
|
64 | + * @param integer $parentId |
|
65 | + */ |
|
60 | 66 | protected function _createNewInlineAnswer($parentId) { |
61 | 67 | |
62 | 68 | $this->_openThreadline($parentId); |
@@ -1,153 +1,153 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | - require_once 'Lib/SaitoSeleniumTestCase.php'; |
|
4 | - |
|
5 | - class InlineAnswerTest extends SaitoSeleniumTestCase { |
|
6 | - |
|
7 | - public $nextId = 11; |
|
8 | - |
|
9 | - public function testInlineAnswer() { |
|
10 | - $this->login(); |
|
11 | - |
|
12 | - $id = 6; |
|
13 | - $this->_testSingleLine($id); |
|
14 | - |
|
15 | - // test inline answering |
|
16 | - $this->_createNewInlineAnswer($id); |
|
17 | - $this->_testSingleLine($this->nextId - 1); |
|
18 | - |
|
19 | - // test that an inline answer of an inline answer is working |
|
20 | - $lastInlineAnswerId = $this->nextId - 1; |
|
21 | - $this->_createNewInlineAnswer($lastInlineAnswerId); |
|
22 | - $this->_testSingleLine($this->nextId - 1); |
|
23 | - |
|
24 | - // test a new sibling answer |
|
25 | - $this->_createNewInlineAnswer($id); |
|
26 | - $this->_testSingleLine($this->nextId - 1); |
|
27 | - } |
|
28 | - |
|
29 | - protected function _testSingleLine($id) { |
|
30 | - $this->_testInlineCloseButtons($id); |
|
31 | - $this->_testInlineAnswerCloseButton($id); |
|
32 | - } |
|
33 | - |
|
34 | - protected function _testInlineAnswerCloseButton($id) { |
|
35 | - $this->_openThreadline($id); |
|
36 | - $this->_openAnswerForm($id); |
|
37 | - // click answering close button |
|
38 | - $this->click("css=.threadLeaf[data-id={$id}] .btn-answeringClose"); |
|
39 | - // wait for answering form to be closed |
|
40 | - for ($second = 0; ; $second++) { |
|
41 | - if ($second >= 60) $this->fail("timeout"); |
|
42 | - try { |
|
43 | - if (!$this->isElementPresent("css=.threadLeaf[data-id={$id}] .entry.reply")) break; |
|
44 | - } catch (Exception $e) {} |
|
45 | - sleep(1); |
|
46 | - } |
|
47 | - // answering form is closed but posting is still visible |
|
48 | - $this->assertTrue($this->_isPostingVisible($id)); |
|
49 | - $this->_closeThreadline($id); |
|
50 | - } |
|
51 | - |
|
52 | - protected function _testInlineCloseButtons($id) { |
|
53 | - $this->_openThreadline($id); |
|
54 | - // click posting close button |
|
55 | - $this->_closeThreadline($id); |
|
56 | - $this->_waitForThreadlineVisible($id); |
|
57 | - $this->assertFalse($this->_isPostingVisible($id)); |
|
58 | - } |
|
59 | - |
|
60 | - protected function _createNewInlineAnswer($parentId) { |
|
61 | - |
|
62 | - $this->_openThreadline($parentId); |
|
63 | - |
|
64 | - // footer in posting is visible |
|
65 | - $this->assertTrue( |
|
66 | - $this->isVisible("css=.threadLeaf[data-id={$parentId}] .panel-footer") |
|
67 | - ); |
|
68 | - |
|
69 | - // opening answer form |
|
70 | - $this->_openAnswerForm($parentId); |
|
71 | - |
|
72 | - // wait for answering form to be shown |
|
73 | - for ($second = 0; ; $second++) { |
|
74 | - if ($second >= 60) { |
|
75 | - $this->fail("timeout"); |
|
76 | - } |
|
77 | - try { |
|
78 | - if ($this->isVisible("css=.threadLeaf[data-id={$parentId}] .entry.reply") |
|
79 | - ) { |
|
80 | - break; |
|
81 | - } |
|
82 | - } catch (Exception $e) { |
|
83 | - } |
|
84 | - sleep(1); |
|
85 | - } |
|
86 | - |
|
87 | - // footer in posting is now hidden |
|
88 | - $this->assertFalse( |
|
89 | - $this->isVisible("css=.threadLeaf[data-id={$parentId}] .panel-footer") |
|
90 | - ); |
|
91 | - |
|
92 | - // type subject in answering field |
|
93 | - $this->type("css=.threadLeaf[data-id={$parentId}] #EntrySubject", "Id: {$this->nextId}"); |
|
94 | - // send the inline answering form |
|
95 | - $this->click("css=.threadLeaf[data-id={$parentId}] #btn-submit"); |
|
96 | - |
|
97 | - $this->_waitForThreadlineVisible($parentId); |
|
98 | - |
|
99 | - // test that new thread line is visible |
|
100 | - $this->_waitForThreadlineVisible($this->nextId); |
|
101 | - $this->assertTrue($this->_isThreadlineVisible($this->nextId)); |
|
102 | - |
|
103 | - $this->nextId++; |
|
104 | - } |
|
105 | - |
|
106 | - protected function _openAnswerForm($id) { |
|
107 | - // opening answer form |
|
108 | - $this->click("css=.threadLeaf[data-id={$id}] .js-btn-setAnsweringForm"); |
|
109 | - $this->_waitForAnsweringVisible($id); |
|
110 | - } |
|
111 | - |
|
112 | - protected function _openThreadline($id) { |
|
113 | - // test that thread line is visible |
|
114 | - $this->assertTrue( |
|
115 | - $this->isVisible( |
|
116 | - "css=.threadLeaf[data-id={$id}] .threadLeaf-content" |
|
117 | - ) |
|
118 | - ); |
|
119 | - // click to open threadline |
|
120 | - $this->click("css=.threadLeaf[data-id={$id}] .btn_show_thread"); |
|
121 | - $this->_waitForPostingVisible($id); |
|
122 | - // threadline should now be invisible |
|
123 | - $this->assertFalse($this->_isThreadlineVisible($id)); |
|
124 | - } |
|
125 | - |
|
126 | - protected function _closeThreadline($id) { |
|
127 | - $this->click("css=.threadLeaf[data-id={$id}] .js-btn-strip"); |
|
128 | - } |
|
129 | - |
|
130 | - protected function _waitForPostingVisible($id) { |
|
131 | - $this->waitForVisibleJq(".threadLeaf[data-id={$id}] .js-entry-view-core"); |
|
132 | - } |
|
133 | - |
|
134 | - protected function _waitForThreadlineVisible($id) { |
|
135 | - $this->waitForVisibleJq(".threadLeaf[data-id={$id}] .threadLeaf-content"); |
|
136 | - } |
|
137 | - |
|
138 | - protected function _waitForAnsweringVisible($id) { |
|
139 | - $this->waitForVisibleJq(".threadLeaf[data-id={$id}] .entry.reply"); |
|
140 | - } |
|
141 | - |
|
142 | - protected function _isThreadlineVisible($id) { |
|
143 | - return $this->isVisible( |
|
144 | - "css=.threadLeaf[data-id={$id}] .threadLeaf-content" |
|
145 | - ); |
|
146 | - } |
|
147 | - |
|
148 | - protected function _isPostingVisible($id) { |
|
149 | - return $this->isVisible( |
|
150 | - "css=.threadLeaf[data-id={$id}] .js-entry-view-core" |
|
151 | - ); |
|
152 | - } |
|
153 | - } |
|
3 | + require_once 'Lib/SaitoSeleniumTestCase.php'; |
|
4 | + |
|
5 | + class InlineAnswerTest extends SaitoSeleniumTestCase { |
|
6 | + |
|
7 | + public $nextId = 11; |
|
8 | + |
|
9 | + public function testInlineAnswer() { |
|
10 | + $this->login(); |
|
11 | + |
|
12 | + $id = 6; |
|
13 | + $this->_testSingleLine($id); |
|
14 | + |
|
15 | + // test inline answering |
|
16 | + $this->_createNewInlineAnswer($id); |
|
17 | + $this->_testSingleLine($this->nextId - 1); |
|
18 | + |
|
19 | + // test that an inline answer of an inline answer is working |
|
20 | + $lastInlineAnswerId = $this->nextId - 1; |
|
21 | + $this->_createNewInlineAnswer($lastInlineAnswerId); |
|
22 | + $this->_testSingleLine($this->nextId - 1); |
|
23 | + |
|
24 | + // test a new sibling answer |
|
25 | + $this->_createNewInlineAnswer($id); |
|
26 | + $this->_testSingleLine($this->nextId - 1); |
|
27 | + } |
|
28 | + |
|
29 | + protected function _testSingleLine($id) { |
|
30 | + $this->_testInlineCloseButtons($id); |
|
31 | + $this->_testInlineAnswerCloseButton($id); |
|
32 | + } |
|
33 | + |
|
34 | + protected function _testInlineAnswerCloseButton($id) { |
|
35 | + $this->_openThreadline($id); |
|
36 | + $this->_openAnswerForm($id); |
|
37 | + // click answering close button |
|
38 | + $this->click("css=.threadLeaf[data-id={$id}] .btn-answeringClose"); |
|
39 | + // wait for answering form to be closed |
|
40 | + for ($second = 0; ; $second++) { |
|
41 | + if ($second >= 60) $this->fail("timeout"); |
|
42 | + try { |
|
43 | + if (!$this->isElementPresent("css=.threadLeaf[data-id={$id}] .entry.reply")) break; |
|
44 | + } catch (Exception $e) {} |
|
45 | + sleep(1); |
|
46 | + } |
|
47 | + // answering form is closed but posting is still visible |
|
48 | + $this->assertTrue($this->_isPostingVisible($id)); |
|
49 | + $this->_closeThreadline($id); |
|
50 | + } |
|
51 | + |
|
52 | + protected function _testInlineCloseButtons($id) { |
|
53 | + $this->_openThreadline($id); |
|
54 | + // click posting close button |
|
55 | + $this->_closeThreadline($id); |
|
56 | + $this->_waitForThreadlineVisible($id); |
|
57 | + $this->assertFalse($this->_isPostingVisible($id)); |
|
58 | + } |
|
59 | + |
|
60 | + protected function _createNewInlineAnswer($parentId) { |
|
61 | + |
|
62 | + $this->_openThreadline($parentId); |
|
63 | + |
|
64 | + // footer in posting is visible |
|
65 | + $this->assertTrue( |
|
66 | + $this->isVisible("css=.threadLeaf[data-id={$parentId}] .panel-footer") |
|
67 | + ); |
|
68 | + |
|
69 | + // opening answer form |
|
70 | + $this->_openAnswerForm($parentId); |
|
71 | + |
|
72 | + // wait for answering form to be shown |
|
73 | + for ($second = 0; ; $second++) { |
|
74 | + if ($second >= 60) { |
|
75 | + $this->fail("timeout"); |
|
76 | + } |
|
77 | + try { |
|
78 | + if ($this->isVisible("css=.threadLeaf[data-id={$parentId}] .entry.reply") |
|
79 | + ) { |
|
80 | + break; |
|
81 | + } |
|
82 | + } catch (Exception $e) { |
|
83 | + } |
|
84 | + sleep(1); |
|
85 | + } |
|
86 | + |
|
87 | + // footer in posting is now hidden |
|
88 | + $this->assertFalse( |
|
89 | + $this->isVisible("css=.threadLeaf[data-id={$parentId}] .panel-footer") |
|
90 | + ); |
|
91 | + |
|
92 | + // type subject in answering field |
|
93 | + $this->type("css=.threadLeaf[data-id={$parentId}] #EntrySubject", "Id: {$this->nextId}"); |
|
94 | + // send the inline answering form |
|
95 | + $this->click("css=.threadLeaf[data-id={$parentId}] #btn-submit"); |
|
96 | + |
|
97 | + $this->_waitForThreadlineVisible($parentId); |
|
98 | + |
|
99 | + // test that new thread line is visible |
|
100 | + $this->_waitForThreadlineVisible($this->nextId); |
|
101 | + $this->assertTrue($this->_isThreadlineVisible($this->nextId)); |
|
102 | + |
|
103 | + $this->nextId++; |
|
104 | + } |
|
105 | + |
|
106 | + protected function _openAnswerForm($id) { |
|
107 | + // opening answer form |
|
108 | + $this->click("css=.threadLeaf[data-id={$id}] .js-btn-setAnsweringForm"); |
|
109 | + $this->_waitForAnsweringVisible($id); |
|
110 | + } |
|
111 | + |
|
112 | + protected function _openThreadline($id) { |
|
113 | + // test that thread line is visible |
|
114 | + $this->assertTrue( |
|
115 | + $this->isVisible( |
|
116 | + "css=.threadLeaf[data-id={$id}] .threadLeaf-content" |
|
117 | + ) |
|
118 | + ); |
|
119 | + // click to open threadline |
|
120 | + $this->click("css=.threadLeaf[data-id={$id}] .btn_show_thread"); |
|
121 | + $this->_waitForPostingVisible($id); |
|
122 | + // threadline should now be invisible |
|
123 | + $this->assertFalse($this->_isThreadlineVisible($id)); |
|
124 | + } |
|
125 | + |
|
126 | + protected function _closeThreadline($id) { |
|
127 | + $this->click("css=.threadLeaf[data-id={$id}] .js-btn-strip"); |
|
128 | + } |
|
129 | + |
|
130 | + protected function _waitForPostingVisible($id) { |
|
131 | + $this->waitForVisibleJq(".threadLeaf[data-id={$id}] .js-entry-view-core"); |
|
132 | + } |
|
133 | + |
|
134 | + protected function _waitForThreadlineVisible($id) { |
|
135 | + $this->waitForVisibleJq(".threadLeaf[data-id={$id}] .threadLeaf-content"); |
|
136 | + } |
|
137 | + |
|
138 | + protected function _waitForAnsweringVisible($id) { |
|
139 | + $this->waitForVisibleJq(".threadLeaf[data-id={$id}] .entry.reply"); |
|
140 | + } |
|
141 | + |
|
142 | + protected function _isThreadlineVisible($id) { |
|
143 | + return $this->isVisible( |
|
144 | + "css=.threadLeaf[data-id={$id}] .threadLeaf-content" |
|
145 | + ); |
|
146 | + } |
|
147 | + |
|
148 | + protected function _isPostingVisible($id) { |
|
149 | + return $this->isVisible( |
|
150 | + "css=.threadLeaf[data-id={$id}] .js-entry-view-core" |
|
151 | + ); |
|
152 | + } |
|
153 | + } |
@@ -38,9 +38,13 @@ |
||
38 | 38 | $this->click("css=.threadLeaf[data-id={$id}] .btn-answeringClose"); |
39 | 39 | // wait for answering form to be closed |
40 | 40 | for ($second = 0; ; $second++) { |
41 | - if ($second >= 60) $this->fail("timeout"); |
|
41 | + if ($second >= 60) { |
|
42 | + $this->fail("timeout"); |
|
43 | + } |
|
42 | 44 | try { |
43 | - if (!$this->isElementPresent("css=.threadLeaf[data-id={$id}] .entry.reply")) break; |
|
45 | + if (!$this->isElementPresent("css=.threadLeaf[data-id={$id}] .entry.reply")) { |
|
46 | + break; |
|
47 | + } |
|
44 | 48 | } catch (Exception $e) {} |
45 | 49 | sleep(1); |
46 | 50 | } |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | - Configure::write('Saito.v', '4.10.0'); |
|
2 | + Configure::write('Saito.v', '4.10.0'); |
|
3 | 3 | |
4 | - Configure::write('Saito.saitoHomepage', 'http://saito.siezi.com'); |
|
4 | + Configure::write('Saito.saitoHomepage', 'http://saito.siezi.com'); |
@@ -1,60 +1,60 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | - /** |
|
4 | - * Saito Enduser Configuration |
|
5 | - */ |
|
3 | + /** |
|
4 | + * Saito Enduser Configuration |
|
5 | + */ |
|
6 | 6 | |
7 | - /** |
|
8 | - * Setting default language (mandatory) |
|
9 | - * |
|
10 | - * Use ISO 639-2 Code http://www.loc.gov/standards/iso639-2/php/code_list.php |
|
11 | - * So german would be: deu |
|
12 | - */ |
|
13 | - Configure::write('Config.language', 'eng'); |
|
7 | + /** |
|
8 | + * Setting default language (mandatory) |
|
9 | + * |
|
10 | + * Use ISO 639-2 Code http://www.loc.gov/standards/iso639-2/php/code_list.php |
|
11 | + * So german would be: deu |
|
12 | + */ |
|
13 | + Configure::write('Config.language', 'eng'); |
|
14 | 14 | |
15 | - /** |
|
16 | - * Sets the markup parser |
|
17 | - * |
|
18 | - * Parser hould be placed in app/Plugin/<name>Parser |
|
19 | - */ |
|
20 | - Configure::write('Saito.Settings.ParserPlugin', 'Bbcode'); |
|
15 | + /** |
|
16 | + * Sets the markup parser |
|
17 | + * |
|
18 | + * Parser hould be placed in app/Plugin/<name>Parser |
|
19 | + */ |
|
20 | + Configure::write('Saito.Settings.ParserPlugin', 'Bbcode'); |
|
21 | 21 | |
22 | - /** |
|
23 | - * Sets the default theme |
|
24 | - */ |
|
25 | - Configure::write('Saito.themes.default', 'Paz'); |
|
22 | + /** |
|
23 | + * Sets the default theme |
|
24 | + */ |
|
25 | + Configure::write('Saito.themes.default', 'Paz'); |
|
26 | 26 | |
27 | - /** |
|
28 | - * Sets additional themes available for all users |
|
29 | - * |
|
30 | - * `*` - all installed themes (in Themed folder) |
|
31 | - * `['A', 'B']` - only themes 'A' and 'B' (Themed folder names) |
|
32 | - */ |
|
33 | - // Configure::write('Saito.themes.available.all', '*'); |
|
27 | + /** |
|
28 | + * Sets additional themes available for all users |
|
29 | + * |
|
30 | + * `*` - all installed themes (in Themed folder) |
|
31 | + * `['A', 'B']` - only themes 'A' and 'B' (Themed folder names) |
|
32 | + */ |
|
33 | + // Configure::write('Saito.themes.available.all', '*'); |
|
34 | 34 | |
35 | - /** |
|
36 | - * Sets additional themes available for specific users only |
|
37 | - * |
|
38 | - * [<user-id> => '<theme name>', …] |
|
39 | - */ |
|
40 | - // Configure::write('Saito.themes.available.users', [1 => ['C']]); |
|
35 | + /** |
|
36 | + * Sets additional themes available for specific users only |
|
37 | + * |
|
38 | + * [<user-id> => '<theme name>', …] |
|
39 | + */ |
|
40 | + // Configure::write('Saito.themes.available.users', [1 => ['C']]); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Sets the X-Frame-Options header send with each request |
|
44 | - */ |
|
45 | - Configure::write('Saito.X-Frame-Options', 'SAMEORIGIN'); |
|
42 | + /** |
|
43 | + * Sets the X-Frame-Options header send with each request |
|
44 | + */ |
|
45 | + Configure::write('Saito.X-Frame-Options', 'SAMEORIGIN'); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Add additional buttons to editor |
|
49 | - * |
|
50 | - * You can theme them with |
|
51 | - * |
|
52 | - * <code> |
|
53 | - * .markItUp .markItUpButton<Id> a { |
|
54 | - * … |
|
55 | - * } |
|
56 | - * </code> |
|
57 | - * |
|
47 | + /** |
|
48 | + * Add additional buttons to editor |
|
49 | + * |
|
50 | + * You can theme them with |
|
51 | + * |
|
52 | + * <code> |
|
53 | + * .markItUp .markItUpButton<Id> a { |
|
54 | + * … |
|
55 | + * } |
|
56 | + * </code> |
|
57 | + * |
|
58 | 58 | /* |
59 | 59 | Configure::write( |
60 | 60 | 'Saito.markItUp.additionalButtons', |
@@ -75,23 +75,23 @@ discard block |
||
75 | 75 | // image in img/markitup/<replacement> |
76 | 76 | 'replacement' => 'resultofbutton1.png' |
77 | 77 | ), |
78 | - * // … |
|
78 | + * // … |
|
79 | 79 | ) |
80 | 80 | ); |
81 | - * |
|
82 | - */ |
|
81 | + * |
|
82 | + */ |
|
83 | 83 | |
84 | - /** |
|
85 | - * Users to notify via email if a new users registers successfully |
|
86 | - * |
|
87 | - * Provide an array with user IDs. To notify the admin (usually user-id 1): |
|
88 | - * |
|
89 | - * [1] |
|
90 | - * |
|
91 | - * To notify the admin with id 1 and the user with the id 5: |
|
92 | - * |
|
93 | - * [1, 5] |
|
94 | - */ |
|
95 | - /* |
|
84 | + /** |
|
85 | + * Users to notify via email if a new users registers successfully |
|
86 | + * |
|
87 | + * Provide an array with user IDs. To notify the admin (usually user-id 1): |
|
88 | + * |
|
89 | + * [1] |
|
90 | + * |
|
91 | + * To notify the admin with id 1 and the user with the id 5: |
|
92 | + * |
|
93 | + * [1, 5] |
|
94 | + */ |
|
95 | + /* |
|
96 | 96 | Configure::write('Saito.Notification.userActivatedAdminNoticeToUserWithID', [1]); |
97 | 97 | */ |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | * to the roles you defined in the roles configuration. |
106 | 106 | */ |
107 | 107 | $config['map'] = array( |
108 | - 'User' => 'User/username', |
|
109 | - 'Role' => 'User/group_id', |
|
108 | + 'User' => 'User/username', |
|
109 | + 'Role' => 'User/group_id', |
|
110 | 110 | ); |
111 | 111 | |
112 | 112 | /** |
@@ -114,22 +114,22 @@ discard block |
||
114 | 114 | * the roles defined in your role configuration. |
115 | 115 | */ |
116 | 116 | $config['alias'] = array( |
117 | - 'Role/4' => 'Role/editor', |
|
117 | + 'Role/4' => 'Role/editor', |
|
118 | 118 | ); |
119 | 119 | |
120 | 120 | /** |
121 | 121 | * role configuration |
122 | 122 | */ |
123 | 123 | $config['roles'] = array( |
124 | - 'Role/admin' => null, |
|
124 | + 'Role/admin' => null, |
|
125 | 125 | ); |
126 | 126 | |
127 | 127 | /** |
128 | 128 | * rule configuration |
129 | 129 | */ |
130 | 130 | $config['rules'] = array( |
131 | - 'allow' => array( |
|
132 | - '*' => 'Role/admin', |
|
133 | - ), |
|
134 | - 'deny' => array(), |
|
131 | + 'allow' => array( |
|
132 | + '*' => 'Role/admin', |
|
133 | + ), |
|
134 | + 'deny' => array(), |
|
135 | 135 | ); |
@@ -29,46 +29,46 @@ |
||
29 | 29 | */ |
30 | 30 | class DbAclSchema extends CakeSchema { |
31 | 31 | |
32 | - public $name = 'DbAcl'; |
|
32 | + public $name = 'DbAcl'; |
|
33 | 33 | |
34 | - public function before($event = array()) { |
|
35 | - return true; |
|
36 | - } |
|
34 | + public function before($event = array()) { |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | |
38 | - public function after($event = array()) { |
|
39 | - } |
|
38 | + public function after($event = array()) { |
|
39 | + } |
|
40 | 40 | |
41 | - public $acos = array( |
|
42 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
43 | - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
44 | - 'model' => array('type'=>'string', 'null' => true), |
|
45 | - 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
46 | - 'alias' => array('type'=>'string', 'null' => true), |
|
47 | - 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
48 | - 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
49 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
50 | - ); |
|
41 | + public $acos = array( |
|
42 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
43 | + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
44 | + 'model' => array('type'=>'string', 'null' => true), |
|
45 | + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
46 | + 'alias' => array('type'=>'string', 'null' => true), |
|
47 | + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
48 | + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
49 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
50 | + ); |
|
51 | 51 | |
52 | - public $aros = array( |
|
53 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
54 | - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
55 | - 'model' => array('type'=>'string', 'null' => true), |
|
56 | - 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
57 | - 'alias' => array('type'=>'string', 'null' => true), |
|
58 | - 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
59 | - 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
60 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
61 | - ); |
|
52 | + public $aros = array( |
|
53 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
54 | + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
55 | + 'model' => array('type'=>'string', 'null' => true), |
|
56 | + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
57 | + 'alias' => array('type'=>'string', 'null' => true), |
|
58 | + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
59 | + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
60 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
61 | + ); |
|
62 | 62 | |
63 | - public $aros_acos = array( |
|
64 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
65 | - 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), |
|
66 | - 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), |
|
67 | - '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
68 | - '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
69 | - '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
70 | - '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
71 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) |
|
72 | - ); |
|
63 | + public $aros_acos = array( |
|
64 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
65 | + 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), |
|
66 | + 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), |
|
67 | + '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
68 | + '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
69 | + '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
70 | + '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
71 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) |
|
72 | + ); |
|
73 | 73 | |
74 | 74 | } |
@@ -29,20 +29,20 @@ |
||
29 | 29 | */ |
30 | 30 | class SessionsSchema extends CakeSchema { |
31 | 31 | |
32 | - public $name = 'Sessions'; |
|
32 | + public $name = 'Sessions'; |
|
33 | 33 | |
34 | - public function before($event = array()) { |
|
35 | - return true; |
|
36 | - } |
|
34 | + public function before($event = array()) { |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | |
38 | - public function after($event = array()) { |
|
39 | - } |
|
38 | + public function after($event = array()) { |
|
39 | + } |
|
40 | 40 | |
41 | - public $cake_sessions = array( |
|
42 | - 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'), |
|
43 | - 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), |
|
44 | - 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), |
|
45 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
46 | - ); |
|
41 | + public $cake_sessions = array( |
|
42 | + 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'), |
|
43 | + 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), |
|
44 | + 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), |
|
45 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
46 | + ); |
|
47 | 47 | |
48 | 48 | } |
@@ -2,269 +2,269 @@ |
||
2 | 2 | |
3 | 3 | class AppSchema extends CakeSchema { |
4 | 4 | |
5 | - public $bookmarks = array( |
|
6 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
7 | - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
8 | - 'entry_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
9 | - 'comment' => array('type' => 'string', 'null' => false, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
10 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
11 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
12 | - 'indexes' => array( |
|
13 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
14 | - 'bookmarks_entryId_userId' => array('column' => array('entry_id', 'user_id'), 'unique' => 0), |
|
15 | - 'bookmarks_userId' => array('column' => 'user_id', 'unique' => 0) |
|
16 | - ), |
|
17 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
18 | - ); |
|
5 | + public $bookmarks = array( |
|
6 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
7 | + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
8 | + 'entry_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
9 | + 'comment' => array('type' => 'string', 'null' => false, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
10 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
11 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
12 | + 'indexes' => array( |
|
13 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
14 | + 'bookmarks_entryId_userId' => array('column' => array('entry_id', 'user_id'), 'unique' => 0), |
|
15 | + 'bookmarks_userId' => array('column' => 'user_id', 'unique' => 0) |
|
16 | + ), |
|
17 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
18 | + ); |
|
19 | 19 | |
20 | - public $categories = array( |
|
21 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
22 | - 'category_order' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
23 | - 'category' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
24 | - 'description' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
25 | - 'accession' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
26 | - 'thread_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
27 | - 'indexes' => array( |
|
28 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
29 | - ), |
|
30 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
31 | - ); |
|
20 | + public $categories = array( |
|
21 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
22 | + 'category_order' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
23 | + 'category' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
24 | + 'description' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
25 | + 'accession' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
26 | + 'thread_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
27 | + 'indexes' => array( |
|
28 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
29 | + ), |
|
30 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
31 | + ); |
|
32 | 32 | |
33 | - public $entries = array( |
|
34 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
35 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
36 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
37 | - 'pid' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false, 'key' => 'index'), |
|
38 | - 'tid' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false, 'key' => 'index'), |
|
39 | - 'time' => array('type' => 'timestamp', 'null' => true, 'default' => null, 'key' => 'index'), |
|
40 | - 'last_answer' => array('type' => 'timestamp', 'null' => true, 'default' => null, 'key' => 'index'), |
|
41 | - 'edited' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
42 | - 'edited_by' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
43 | - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'key' => 'index'), |
|
44 | - 'name' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
45 | - 'subject' => array('type' => 'string', 'null' => true, 'default' => null, 'key' => 'index', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
46 | - 'category_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
47 | - 'text' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
48 | - 'email_notify' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
49 | - 'locked' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
50 | - 'fixed' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
51 | - 'views' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false), |
|
52 | - 'ip' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 39, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
53 | - 'solves' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
54 | - 'indexes' => array( |
|
55 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
56 | - 'tid' => array('column' => 'tid', 'unique' => 0), |
|
57 | - 'entries_userId' => array('column' => 'user_id', 'unique' => 0), |
|
58 | - 'last_answer' => array('column' => 'last_answer', 'unique' => 0), |
|
59 | - 'pft' => array('column' => array('pid', 'fixed', 'time', 'category_id'), 'unique' => 0), |
|
60 | - 'pfl' => array('column' => array('pid', 'fixed', 'last_answer', 'category_id'), 'unique' => 0), |
|
61 | - 'pid_category' => array('column' => array('pid', 'category_id'), 'unique' => 0), |
|
62 | - 'entries_userId_time' => array('column' => array('time', 'user_id'), 'unique' => 0), |
|
63 | - 'fulltext_search' => array('column' => array('subject', 'name', 'text'), 'type' => 'fulltext') |
|
64 | - ), |
|
65 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
66 | - ); |
|
33 | + public $entries = array( |
|
34 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
35 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
36 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
37 | + 'pid' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false, 'key' => 'index'), |
|
38 | + 'tid' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false, 'key' => 'index'), |
|
39 | + 'time' => array('type' => 'timestamp', 'null' => true, 'default' => null, 'key' => 'index'), |
|
40 | + 'last_answer' => array('type' => 'timestamp', 'null' => true, 'default' => null, 'key' => 'index'), |
|
41 | + 'edited' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
42 | + 'edited_by' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
43 | + 'user_id' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'key' => 'index'), |
|
44 | + 'name' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
45 | + 'subject' => array('type' => 'string', 'null' => true, 'default' => null, 'key' => 'index', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
46 | + 'category_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
47 | + 'text' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
48 | + 'email_notify' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
49 | + 'locked' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
50 | + 'fixed' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
51 | + 'views' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false), |
|
52 | + 'ip' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 39, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
53 | + 'solves' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
54 | + 'indexes' => array( |
|
55 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
56 | + 'tid' => array('column' => 'tid', 'unique' => 0), |
|
57 | + 'entries_userId' => array('column' => 'user_id', 'unique' => 0), |
|
58 | + 'last_answer' => array('column' => 'last_answer', 'unique' => 0), |
|
59 | + 'pft' => array('column' => array('pid', 'fixed', 'time', 'category_id'), 'unique' => 0), |
|
60 | + 'pfl' => array('column' => array('pid', 'fixed', 'last_answer', 'category_id'), 'unique' => 0), |
|
61 | + 'pid_category' => array('column' => array('pid', 'category_id'), 'unique' => 0), |
|
62 | + 'entries_userId_time' => array('column' => array('time', 'user_id'), 'unique' => 0), |
|
63 | + 'fulltext_search' => array('column' => array('subject', 'name', 'text'), 'type' => 'fulltext') |
|
64 | + ), |
|
65 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
66 | + ); |
|
67 | 67 | |
68 | - public $esevents = array( |
|
69 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
70 | - 'subject' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
71 | - 'event' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false), |
|
72 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
73 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
74 | - 'indexes' => array( |
|
75 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
76 | - 'subject_event' => array('column' => array('subject', 'event'), 'unique' => 0) |
|
77 | - ), |
|
78 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
79 | - ); |
|
68 | + public $esevents = array( |
|
69 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
70 | + 'subject' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
71 | + 'event' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false), |
|
72 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
73 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
74 | + 'indexes' => array( |
|
75 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
76 | + 'subject_event' => array('column' => array('subject', 'event'), 'unique' => 0) |
|
77 | + ), |
|
78 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
79 | + ); |
|
80 | 80 | |
81 | - public $esnotifications = array( |
|
82 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
83 | - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
84 | - 'esevent_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
85 | - 'esreceiver_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false), |
|
86 | - 'deactivate' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 8, 'unsigned' => false), |
|
87 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
88 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
89 | - 'indexes' => array( |
|
90 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
91 | - 'userid_esreceiverid' => array('column' => array('user_id', 'esreceiver_id'), 'unique' => 0), |
|
92 | - 'eseventid_esreceiverid_userid' => array('column' => array('esevent_id', 'esreceiver_id', 'user_id'), 'unique' => 0) |
|
93 | - ), |
|
94 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
95 | - ); |
|
81 | + public $esnotifications = array( |
|
82 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
83 | + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
84 | + 'esevent_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
85 | + 'esreceiver_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false), |
|
86 | + 'deactivate' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 8, 'unsigned' => false), |
|
87 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
88 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
89 | + 'indexes' => array( |
|
90 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
91 | + 'userid_esreceiverid' => array('column' => array('user_id', 'esreceiver_id'), 'unique' => 0), |
|
92 | + 'eseventid_esreceiverid_userid' => array('column' => array('esevent_id', 'esreceiver_id', 'user_id'), 'unique' => 0) |
|
93 | + ), |
|
94 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
95 | + ); |
|
96 | 96 | |
97 | - public $settings = array( |
|
98 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'), |
|
99 | - 'name' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8', 'key' => 'primary'), |
|
100 | - 'value' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
101 | - 'indexes' => array( |
|
102 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
103 | - ), |
|
104 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
105 | - ); |
|
97 | + public $settings = array( |
|
98 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'), |
|
99 | + 'name' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8', 'key' => 'primary'), |
|
100 | + 'value' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
101 | + 'indexes' => array( |
|
102 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
103 | + ), |
|
104 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
105 | + ); |
|
106 | 106 | |
107 | - public $shouts = array( |
|
108 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
109 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
110 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
111 | - 'text' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
112 | - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false), |
|
113 | - 'time' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
114 | - 'indexes' => array( |
|
115 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
116 | - ), |
|
117 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MEMORY') |
|
118 | - ); |
|
107 | + public $shouts = array( |
|
108 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
109 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
110 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
111 | + 'text' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
112 | + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false), |
|
113 | + 'time' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
114 | + 'indexes' => array( |
|
115 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
116 | + ), |
|
117 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MEMORY') |
|
118 | + ); |
|
119 | 119 | |
120 | - public $smiley_codes = array( |
|
121 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
122 | - 'smiley_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
123 | - 'code' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 32, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
124 | - 'indexes' => array( |
|
125 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
126 | - ), |
|
127 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
128 | - ); |
|
120 | + public $smiley_codes = array( |
|
121 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
122 | + 'smiley_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
123 | + 'code' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 32, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
124 | + 'indexes' => array( |
|
125 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
126 | + ), |
|
127 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
128 | + ); |
|
129 | 129 | |
130 | - public $smilies = array( |
|
131 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
132 | - 'sort' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
133 | - 'icon' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
134 | - 'image' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
135 | - 'title' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
136 | - 'indexes' => array( |
|
137 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
138 | - ), |
|
139 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
140 | - ); |
|
130 | + public $smilies = array( |
|
131 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
132 | + 'sort' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4, 'unsigned' => false), |
|
133 | + 'icon' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
134 | + 'image' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
135 | + 'title' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
136 | + 'indexes' => array( |
|
137 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
138 | + ), |
|
139 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
140 | + ); |
|
141 | 141 | |
142 | - public $uploads = array( |
|
143 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
144 | - 'name' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 200, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
145 | - 'type' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 200, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
146 | - 'size' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), |
|
147 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
148 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
149 | - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), |
|
150 | - 'indexes' => array( |
|
151 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
152 | - ), |
|
153 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
154 | - ); |
|
142 | + public $uploads = array( |
|
143 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
144 | + 'name' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 200, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
145 | + 'type' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 200, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
146 | + 'size' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), |
|
147 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
148 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
149 | + 'user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), |
|
150 | + 'indexes' => array( |
|
151 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1) |
|
152 | + ), |
|
153 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM') |
|
154 | + ); |
|
155 | 155 | |
156 | - public $user_blocks = array( |
|
157 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'primary'), |
|
158 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
159 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
160 | - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'index'), |
|
161 | - 'reason' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
162 | - 'blocked_by_user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => true), |
|
163 | - 'ends' => array('type' => 'datetime', 'null' => true, 'default' => null, 'key' => 'index'), |
|
164 | - 'ended' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
165 | - 'hash' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 32, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
166 | - 'indexes' => array( |
|
167 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
168 | - 'ends' => array('column' => 'ends', 'unique' => 0), |
|
169 | - 'user_id' => array('column' => 'user_id', 'unique' => 0) |
|
170 | - ), |
|
171 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') |
|
172 | - ); |
|
156 | + public $user_blocks = array( |
|
157 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'primary'), |
|
158 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
159 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
160 | + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'index'), |
|
161 | + 'reason' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
162 | + 'blocked_by_user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => true), |
|
163 | + 'ends' => array('type' => 'datetime', 'null' => true, 'default' => null, 'key' => 'index'), |
|
164 | + 'ended' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
165 | + 'hash' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 32, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
166 | + 'indexes' => array( |
|
167 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
168 | + 'ends' => array('column' => 'ends', 'unique' => 0), |
|
169 | + 'user_id' => array('column' => 'user_id', 'unique' => 0) |
|
170 | + ), |
|
171 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') |
|
172 | + ); |
|
173 | 173 | |
174 | - public $user_ignores = array( |
|
175 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'primary'), |
|
176 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
177 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
178 | - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
179 | - 'blocked_user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
180 | - 'timestamp' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
181 | - 'indexes' => array( |
|
182 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
183 | - 'userignores_user_id' => array('column' => 'user_id', 'unique' => 0), |
|
184 | - 'blocked_user_id' => array('column' => 'blocked_user_id', 'unique' => 0) |
|
185 | - ), |
|
186 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') |
|
187 | - ); |
|
174 | + public $user_ignores = array( |
|
175 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'primary'), |
|
176 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
177 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
178 | + 'user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
179 | + 'blocked_user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
180 | + 'timestamp' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
181 | + 'indexes' => array( |
|
182 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
183 | + 'userignores_user_id' => array('column' => 'user_id', 'unique' => 0), |
|
184 | + 'blocked_user_id' => array('column' => 'blocked_user_id', 'unique' => 0) |
|
185 | + ), |
|
186 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') |
|
187 | + ); |
|
188 | 188 | |
189 | - public $user_reads = array( |
|
190 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
191 | - 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
192 | - 'entry_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
193 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
194 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
195 | - 'indexes' => array( |
|
196 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
197 | - 'userread_user_id' => array('column' => 'user_id', 'unique' => 0), |
|
198 | - 'userread_entry_id' => array('column' => 'entry_id', 'unique' => 0) |
|
199 | - ), |
|
200 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') |
|
201 | - ); |
|
189 | + public $user_reads = array( |
|
190 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
191 | + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
192 | + 'entry_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
193 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
194 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
195 | + 'indexes' => array( |
|
196 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
197 | + 'userread_user_id' => array('column' => 'user_id', 'unique' => 0), |
|
198 | + 'userread_entry_id' => array('column' => 'entry_id', 'unique' => 0) |
|
199 | + ), |
|
200 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') |
|
201 | + ); |
|
202 | 202 | |
203 | - public $useronline = array( |
|
204 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'primary'), |
|
205 | - 'uuid' => array('type' => 'string', 'null' => false, 'length' => 32, 'key' => 'unique', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
206 | - 'user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
207 | - 'logged_in' => array('type' => 'boolean', 'null' => false, 'default' => null, 'key' => 'index'), |
|
208 | - 'time' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 14, 'unsigned' => false), |
|
209 | - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
210 | - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
211 | - 'indexes' => array( |
|
212 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
213 | - 'useronline_uuid' => array('column' => 'uuid', 'unique' => 1), |
|
214 | - 'useronline_userId' => array('column' => 'user_id', 'unique' => 0), |
|
215 | - 'useronline_loggedIn' => array('column' => 'logged_in', 'unique' => 0) |
|
216 | - ), |
|
217 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MEMORY') |
|
218 | - ); |
|
203 | + public $useronline = array( |
|
204 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => true, 'key' => 'primary'), |
|
205 | + 'uuid' => array('type' => 'string', 'null' => false, 'length' => 32, 'key' => 'unique', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
206 | + 'user_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'), |
|
207 | + 'logged_in' => array('type' => 'boolean', 'null' => false, 'default' => null, 'key' => 'index'), |
|
208 | + 'time' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 14, 'unsigned' => false), |
|
209 | + 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
210 | + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
211 | + 'indexes' => array( |
|
212 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
213 | + 'useronline_uuid' => array('column' => 'uuid', 'unique' => 1), |
|
214 | + 'useronline_userId' => array('column' => 'user_id', 'unique' => 0), |
|
215 | + 'useronline_loggedIn' => array('column' => 'logged_in', 'unique' => 0) |
|
216 | + ), |
|
217 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MEMORY') |
|
218 | + ); |
|
219 | 219 | |
220 | - public $users = array( |
|
221 | - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
222 | - 'user_type' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
223 | - 'username' => array('type' => 'string', 'null' => true, 'default' => null, 'key' => 'unique', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
224 | - 'user_real_name' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
225 | - 'password' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
226 | - 'user_email' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
227 | - 'user_hp' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
228 | - 'user_place' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
229 | - 'user_place_lat' => array('type' => 'float', 'null' => true, 'default' => null, 'unsigned' => false), |
|
230 | - 'user_place_lng' => array('type' => 'float', 'null' => true, 'default' => null, 'unsigned' => false), |
|
231 | - 'user_place_zoom' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 4, 'unsigned' => false), |
|
232 | - 'signature' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
233 | - 'profile' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
234 | - 'entry_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
235 | - 'logins' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
236 | - 'last_login' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
237 | - 'registered' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
238 | - 'last_refresh' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
239 | - 'last_refresh_tmp' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
240 | - 'personal_messages' => array('type' => 'boolean', 'null' => false, 'default' => '1'), |
|
241 | - 'user_lock' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
242 | - 'activate_code' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 7, 'unsigned' => false), |
|
243 | - 'user_signatures_hide' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
244 | - 'user_signatures_images_hide' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
245 | - 'user_forum_refresh_time' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false), |
|
246 | - 'user_automaticaly_mark_as_read' => array('type' => 'boolean', 'null' => false, 'default' => '1'), |
|
247 | - 'user_sort_last_answer' => array('type' => 'boolean', 'null' => false, 'default' => '1'), |
|
248 | - 'user_color_new_postings' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
249 | - 'user_color_actual_posting' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
250 | - 'user_color_old_postings' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
251 | - 'user_theme' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
252 | - 'slidetab_order' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 512, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
253 | - 'show_userlist' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => 'stores if userlist is shown in front layout'), |
|
254 | - 'show_recentposts' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
255 | - 'show_recententries' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
256 | - 'show_shoutbox' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
257 | - 'inline_view_on_click' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
258 | - 'user_show_thread_collapsed' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
259 | - 'user_category_override' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
260 | - 'user_category_active' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
261 | - 'user_category_custom' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 512, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
262 | - 'ignore_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10, 'unsigned' => true), |
|
263 | - 'indexes' => array( |
|
264 | - 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
265 | - 'username' => array('column' => 'username', 'unique' => 1) |
|
266 | - ), |
|
267 | - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'InnoDB') |
|
268 | - ); |
|
220 | + public $users = array( |
|
221 | + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), |
|
222 | + 'user_type' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
223 | + 'username' => array('type' => 'string', 'null' => true, 'default' => null, 'key' => 'unique', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
224 | + 'user_real_name' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
225 | + 'password' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
226 | + 'user_email' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
227 | + 'user_hp' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
228 | + 'user_place' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
229 | + 'user_place_lat' => array('type' => 'float', 'null' => true, 'default' => null, 'unsigned' => false), |
|
230 | + 'user_place_lng' => array('type' => 'float', 'null' => true, 'default' => null, 'unsigned' => false), |
|
231 | + 'user_place_zoom' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 4, 'unsigned' => false), |
|
232 | + 'signature' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
233 | + 'profile' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), |
|
234 | + 'entry_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
235 | + 'logins' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
236 | + 'last_login' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
237 | + 'registered' => array('type' => 'timestamp', 'null' => true, 'default' => null), |
|
238 | + 'last_refresh' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
239 | + 'last_refresh_tmp' => array('type' => 'datetime', 'null' => true, 'default' => null), |
|
240 | + 'personal_messages' => array('type' => 'boolean', 'null' => false, 'default' => '1'), |
|
241 | + 'user_lock' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
242 | + 'activate_code' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 7, 'unsigned' => false), |
|
243 | + 'user_signatures_hide' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
244 | + 'user_signatures_images_hide' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
245 | + 'user_forum_refresh_time' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false), |
|
246 | + 'user_automaticaly_mark_as_read' => array('type' => 'boolean', 'null' => false, 'default' => '1'), |
|
247 | + 'user_sort_last_answer' => array('type' => 'boolean', 'null' => false, 'default' => '1'), |
|
248 | + 'user_color_new_postings' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
249 | + 'user_color_actual_posting' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
250 | + 'user_color_old_postings' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
251 | + 'user_theme' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
252 | + 'slidetab_order' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 512, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
253 | + 'show_userlist' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => 'stores if userlist is shown in front layout'), |
|
254 | + 'show_recentposts' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
255 | + 'show_recententries' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
256 | + 'show_shoutbox' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
257 | + 'inline_view_on_click' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
258 | + 'user_show_thread_collapsed' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
259 | + 'user_category_override' => array('type' => 'boolean', 'null' => false, 'default' => '0'), |
|
260 | + 'user_category_active' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false), |
|
261 | + 'user_category_custom' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 512, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'), |
|
262 | + 'ignore_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10, 'unsigned' => true), |
|
263 | + 'indexes' => array( |
|
264 | + 'PRIMARY' => array('column' => 'id', 'unique' => 1), |
|
265 | + 'username' => array('column' => 'username', 'unique' => 1) |
|
266 | + ), |
|
267 | + 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'InnoDB') |
|
268 | + ); |
|
269 | 269 | |
270 | 270 | } |
@@ -29,23 +29,23 @@ |
||
29 | 29 | */ |
30 | 30 | class i18nSchema extends CakeSchema { |
31 | 31 | |
32 | - public $name = 'i18n'; |
|
32 | + public $name = 'i18n'; |
|
33 | 33 | |
34 | - public function before($event = array()) { |
|
35 | - return true; |
|
36 | - } |
|
34 | + public function before($event = array()) { |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | |
38 | - public function after($event = array()) { |
|
39 | - } |
|
38 | + public function after($event = array()) { |
|
39 | + } |
|
40 | 40 | |
41 | - public $i18n = array( |
|
42 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
43 | - 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'), |
|
44 | - 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'), |
|
45 | - 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), |
|
46 | - 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'), |
|
47 | - 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), |
|
48 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) |
|
49 | - ); |
|
41 | + public $i18n = array( |
|
42 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
43 | + 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'), |
|
44 | + 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'), |
|
45 | + 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), |
|
46 | + 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'), |
|
47 | + 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), |
|
48 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | } |