@@ -13,11 +13,11 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
13
13
'version ' => '3.0 ' ,
14
14
'table ' => 'register_messages ' ,
15
15
'extends ' => 'xPDO \\Om \\xPDOObject ' ,
16
- 'tableMeta ' =>
16
+ 'tableMeta ' =>
17
17
array (
18
18
'engine ' => 'InnoDB ' ,
19
19
),
20
- 'fields ' =>
20
+ 'fields ' =>
21
21
array (
22
22
'topic ' => NULL ,
23
23
'id ' => NULL ,
@@ -29,9 +29,9 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
29
29
'payload ' => NULL ,
30
30
'kill ' => 0 ,
31
31
),
32
- 'fieldMeta ' =>
32
+ 'fieldMeta ' =>
33
33
array (
34
- 'topic ' =>
34
+ 'topic ' =>
35
35
array (
36
36
'dbtype ' => 'integer ' ,
37
37
'precision ' => '10 ' ,
@@ -40,36 +40,36 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
40
40
'null ' => false ,
41
41
'index ' => 'pk ' ,
42
42
),
43
- 'id ' =>
43
+ 'id ' =>
44
44
array (
45
45
'dbtype ' => 'varchar ' ,
46
46
'precision ' => '191 ' ,
47
47
'phptype ' => 'string ' ,
48
48
'null ' => false ,
49
49
'index ' => 'pk ' ,
50
50
),
51
- 'created ' =>
51
+ 'created ' =>
52
52
array (
53
53
'dbtype ' => 'datetime ' ,
54
54
'phptype ' => 'datetime ' ,
55
55
'null ' => false ,
56
56
'index ' => 'index ' ,
57
57
),
58
- 'valid ' =>
58
+ 'valid ' =>
59
59
array (
60
60
'dbtype ' => 'datetime ' ,
61
61
'phptype ' => 'datetime ' ,
62
62
'null ' => false ,
63
63
'index ' => 'index ' ,
64
64
),
65
- 'accessed ' =>
65
+ 'accessed ' =>
66
66
array (
67
67
'dbtype ' => 'timestamp ' ,
68
68
'phptype ' => 'timestamp ' ,
69
69
'attributes ' => 'ON UPDATE CURRENT_TIMESTAMP ' ,
70
70
'index ' => 'index ' ,
71
71
),
72
- 'accesses ' =>
72
+ 'accesses ' =>
73
73
array (
74
74
'dbtype ' => 'integer ' ,
75
75
'precision ' => '10 ' ,
@@ -79,7 +79,7 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
79
79
'default ' => 0 ,
80
80
'index ' => 'index ' ,
81
81
),
82
- 'expires ' =>
82
+ 'expires ' =>
83
83
array (
84
84
'dbtype ' => 'integer ' ,
85
85
'precision ' => '20 ' ,
@@ -88,13 +88,13 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
88
88
'default ' => 0 ,
89
89
'index ' => 'index ' ,
90
90
),
91
- 'payload ' =>
91
+ 'payload ' =>
92
92
array (
93
93
'dbtype ' => 'mediumtext ' ,
94
94
'phptype ' => 'string ' ,
95
95
'null ' => false ,
96
96
),
97
- 'kill ' =>
97
+ 'kill ' =>
98
98
array (
99
99
'dbtype ' => 'tinyint ' ,
100
100
'precision ' => '1 ' ,
@@ -104,103 +104,103 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
104
104
'default ' => 0 ,
105
105
),
106
106
),
107
- 'indexes ' =>
107
+ 'indexes ' =>
108
108
array (
109
- 'PRIMARY ' =>
109
+ 'PRIMARY ' =>
110
110
array (
111
111
'alias ' => 'PRIMARY ' ,
112
112
'primary ' => true ,
113
113
'unique ' => true ,
114
114
'type ' => 'BTREE ' ,
115
- 'columns ' =>
115
+ 'columns ' =>
116
116
array (
117
- 'topic ' =>
117
+ 'topic ' =>
118
118
array (
119
119
'length ' => '' ,
120
120
'collation ' => 'A ' ,
121
121
'null ' => false ,
122
122
),
123
- 'id ' =>
123
+ 'id ' =>
124
124
array (
125
125
'length ' => '' ,
126
126
'collation ' => 'A ' ,
127
127
'null ' => false ,
128
128
),
129
129
),
130
130
),
131
- 'created ' =>
131
+ 'created ' =>
132
132
array (
133
133
'alias ' => 'created ' ,
134
134
'primary ' => false ,
135
135
'unique ' => false ,
136
136
'type ' => 'BTREE ' ,
137
- 'columns ' =>
137
+ 'columns ' =>
138
138
array (
139
- 'created ' =>
139
+ 'created ' =>
140
140
array (
141
141
'length ' => '' ,
142
142
'collation ' => 'A ' ,
143
143
'null ' => false ,
144
144
),
145
145
),
146
146
),
147
- 'valid ' =>
147
+ 'valid ' =>
148
148
array (
149
149
'alias ' => 'valid ' ,
150
150
'primary ' => false ,
151
151
'unique ' => false ,
152
152
'type ' => 'BTREE ' ,
153
- 'columns ' =>
153
+ 'columns ' =>
154
154
array (
155
- 'valid ' =>
155
+ 'valid ' =>
156
156
array (
157
157
'length ' => '' ,
158
158
'collation ' => 'A ' ,
159
159
'null ' => false ,
160
160
),
161
161
),
162
162
),
163
- 'accessed ' =>
163
+ 'accessed ' =>
164
164
array (
165
165
'alias ' => 'accessed ' ,
166
166
'primary ' => false ,
167
167
'unique ' => false ,
168
168
'type ' => 'BTREE ' ,
169
- 'columns ' =>
169
+ 'columns ' =>
170
170
array (
171
- 'accessed ' =>
171
+ 'accessed ' =>
172
172
array (
173
173
'length ' => '' ,
174
174
'collation ' => 'A ' ,
175
175
'null ' => false ,
176
176
),
177
177
),
178
178
),
179
- 'accesses ' =>
179
+ 'accesses ' =>
180
180
array (
181
181
'alias ' => 'accesses ' ,
182
182
'primary ' => false ,
183
183
'unique ' => false ,
184
184
'type ' => 'BTREE ' ,
185
- 'columns ' =>
185
+ 'columns ' =>
186
186
array (
187
- 'accesses ' =>
187
+ 'accesses ' =>
188
188
array (
189
189
'length ' => '' ,
190
190
'collation ' => 'A ' ,
191
191
'null ' => false ,
192
192
),
193
193
),
194
194
),
195
- 'expires ' =>
195
+ 'expires ' =>
196
196
array (
197
197
'alias ' => 'expires ' ,
198
198
'primary ' => false ,
199
199
'unique ' => false ,
200
200
'type ' => 'BTREE ' ,
201
- 'columns ' =>
201
+ 'columns ' =>
202
202
array (
203
- 'expires ' =>
203
+ 'expires ' =>
204
204
array (
205
205
'length ' => '' ,
206
206
'collation ' => 'A ' ,
@@ -209,9 +209,9 @@ class modDbRegisterMessage extends \MODX\Revolution\Registry\Db\modDbRegisterMes
209
209
),
210
210
),
211
211
),
212
- 'aggregates ' =>
212
+ 'aggregates ' =>
213
213
array (
214
- 'Topic ' =>
214
+ 'Topic ' =>
215
215
array (
216
216
'class ' => 'MODX \\Revolution \\Registry \\Db \\modDbRegisterTopic ' ,
217
217
'local ' => 'topic ' ,
@@ -239,7 +239,7 @@ public static function getValidMessages(
239
239
$ register ->modx ,
240
240
"SELECT msg.* FROM {$ msgTable } msg JOIN {$ topicTable } topic ON msg.valid <= :now AND (topic.name = :topic OR (topic.name = :topicbase AND msg.id = :topicmsg)) AND topic.id = msg.topic ORDER BY msg.created ASC {$ limitClause }" ,
241
241
[
242
- ':now ' => strftime ( ' %Y-%m-%d %H:%M:%S ' ),
242
+ ':now ' => date ( ' Y-m-d H:i:s ' ),
243
243
':topic ' => $ topic ,
244
244
':topicbase ' => $ topicBase ,
245
245
':topicmsg ' => $ topicMsg ,
0 commit comments