@@ -27,12 +27,12 @@ public function index()
27
27
// exit();
28
28
29
29
// $query = $this->projectModel->getQueryByProjectIds($projectIds);
30
- $ query = $ this ->wiki ->getQueryByProjectIds ($ projectIds );
30
+ $ query = $ this ->wikiModel ->getQueryByProjectIds ($ projectIds );
31
31
32
32
33
33
// echo json_encode($query->findAll());
34
34
// exit();
35
- // $wikipages = $this->wiki ->getWikipages($project['id']);
35
+ // $wikipages = $this->wikiModel ->getWikipages($project['id']);
36
36
37
37
$ search = $ this ->request ->getStringParam ('search ' );
38
38
@@ -68,7 +68,7 @@ public function readonly()
68
68
'no_layout ' => true ,
69
69
'not_editable ' => true ,
70
70
'title ' => $ project ['name ' ] .= " " . t ('Wiki ' ),
71
- 'wikipages ' => $ this ->wiki ->getWikipages ($ project ['id ' ]),
71
+ 'wikipages ' => $ this ->wikiModel ->getWikipages ($ project ['id ' ]),
72
72
), 'wiki:wiki/sidebar ' ));
73
73
}
74
74
@@ -86,11 +86,11 @@ public function show()
86
86
$ this ->response ->html ($ this ->helper ->layout ->app ('wiki:wiki/show ' , array (
87
87
'project ' => $ project ,
88
88
'title ' => $ project ['name ' ] .= " " . t ('Wiki ' ),
89
- 'wikipages ' => $ this ->wiki ->getWikipages ($ project ['id ' ]),
89
+ 'wikipages ' => $ this ->wikiModel ->getWikipages ($ project ['id ' ]),
90
90
), 'wiki:wiki/sidebar ' ));
91
91
92
92
// ,array(
93
- // 'wikipages' => $this->wiki ->getWikipages($project['id'])
93
+ // 'wikipages' => $this->wikiModel ->getWikipages($project['id'])
94
94
// )
95
95
}
96
96
@@ -110,7 +110,7 @@ public function editions()
110
110
'project ' => $ project ,
111
111
'title ' => t ('Wiki Editions ' ),
112
112
'wiki_id ' => $ wiki_id ,
113
- 'editions ' => $ this ->wiki ->getEditions ($ wiki_id ),
113
+ 'editions ' => $ this ->wikiModel ->getEditions ($ wiki_id ),
114
114
), 'wiki:wiki/sidebar ' ));
115
115
116
116
}
@@ -120,14 +120,14 @@ public function edit(array $values = array(), array $errors = array())
120
120
121
121
$ wiki_id = $ this ->request ->getIntegerParam ('wiki_id ' );
122
122
123
- $ editwiki = $ this ->wiki ->getWikipage ($ wiki_id );
123
+ $ editwiki = $ this ->wikiModel ->getWikipage ($ wiki_id );
124
124
125
125
// if (empty($values)) {
126
126
// $values['date_creation'] = date('Y-m-d');
127
127
// $values['date_modification'] = date('Y-m-d');
128
128
// }
129
129
130
- $ wikipages = $ this ->wiki ->getWikipages ($ editwiki ['project_id ' ]);
130
+ $ wikipages = $ this ->wikiModel ->getWikipages ($ editwiki ['project_id ' ]);
131
131
132
132
$ wiki_list = array ('' => t ('None ' ));
133
133
@@ -157,7 +157,7 @@ public function detail_readonly() {
157
157
}
158
158
$ wiki_id = $ this ->request ->getIntegerParam ('wiki_id ' );
159
159
160
- $ wikipages = $ this ->wiki ->getWikipages ($ project ['id ' ]);
160
+ $ wikipages = $ this ->wikiModel ->getWikipages ($ project ['id ' ]);
161
161
162
162
foreach ($ wikipages as $ page ) {
163
163
if (t ($ wiki_id ) == t ($ page ['id ' ])) {
@@ -179,9 +179,9 @@ public function detail_readonly() {
179
179
'wiki ' => $ wikipage ,
180
180
'no_layout ' => true ,
181
181
'not_editable ' => true ,
182
- 'files ' => $ this ->wikiFile ->getAllDocuments ($ wiki_id ),
183
- 'images ' => $ this ->wikiFile ->getAllImages ($ wiki_id ),
184
- // 'wikipage' => $this->wiki ->getWikipage($wiki_id),
182
+ 'files ' => $ this ->wikiFileModel ->getAllDocuments ($ wiki_id ),
183
+ 'images ' => $ this ->wikiFileModel ->getAllImages ($ wiki_id ),
184
+ // 'wikipage' => $this->wikiModel ->getWikipage($wiki_id),
185
185
'wikipage ' => $ wikipage ,
186
186
'wikipages ' => $ wikipages ,
187
187
), 'wiki:wiki/sidebar ' ));
@@ -210,7 +210,7 @@ public function detail()
210
210
211
211
$ wiki_id = $ this ->request ->getIntegerParam ('wiki_id ' );
212
212
213
- $ wikipages = $ this ->wiki ->getWikipages ($ project ['id ' ]);
213
+ $ wikipages = $ this ->wikiModel ->getWikipages ($ project ['id ' ]);
214
214
$ wikiPagesResult = array ();
215
215
216
216
foreach ($ wikipages as $ page ) {
@@ -236,9 +236,9 @@ public function detail()
236
236
'title ' => t ('Wikipage ' ),
237
237
'wiki_id ' => $ wiki_id ,
238
238
'wiki ' => $ wikipage ,
239
- 'files ' => $ this ->wikiFile ->getAllDocuments ($ wiki_id ),
240
- 'images ' => $ this ->wikiFile ->getAllImages ($ wiki_id ),
241
- // 'wikipage' => $this->wiki ->getWikipage($wiki_id),
239
+ 'files ' => $ this ->wikiFileModel ->getAllDocuments ($ wiki_id ),
240
+ 'images ' => $ this ->wikiFileModel ->getAllImages ($ wiki_id ),
241
+ // 'wikipage' => $this->wikiModel ->getWikipage($wiki_id),
242
242
'wikipage ' => $ wikipage ,
243
243
'wikipages ' => $ wikiPagesResult ,
244
244
), 'wiki:wiki/sidebar ' ));
@@ -251,13 +251,13 @@ public function detail()
251
251
// 'project' => $project,
252
252
// 'title' => t('Wikipage'),
253
253
// 'wiki_id' => $wiki_id,
254
- // // 'wikipage' => $this->wiki ->getWikipage($wiki_id),
254
+ // // 'wikipage' => $this->wikiModel ->getWikipage($wiki_id),
255
255
// 'wikipage' => $wikipage,
256
256
// 'wikipages' => $wikipages,
257
257
// ), 'wiki:wiki/sidebar'));
258
258
259
259
// ,array(
260
- // 'wikipages' => $this->wiki ->getWikipages($project['id'])
260
+ // 'wikipages' => $this->wikiModel ->getWikipages($project['id'])
261
261
// )
262
262
}
263
263
@@ -270,7 +270,7 @@ public function detail()
270
270
// ->setMax(30)
271
271
// ->setOrder('start')
272
272
// ->setDirection('DESC')
273
- // ->setQuery($this->wiki ->getSubtaskBreakdown($project['id']))
273
+ // ->setQuery($this->wikiModel ->getSubtaskBreakdown($project['id']))
274
274
// ->calculate();
275
275
276
276
// $this->response->html($this->helper->layout->project('wiki:wiki/breakdown', array(
@@ -305,7 +305,7 @@ public function restore()
305
305
// $this->checkCSRFParam();
306
306
$ project = $ this ->getProject ();
307
307
308
- if ($ this ->wiki ->restoreEdition ($ this ->request ->getIntegerParam ('wiki_id ' ), $ this ->request ->getIntegerParam ('edition ' ))) {
308
+ if ($ this ->wikiModel ->restoreEdition ($ this ->request ->getIntegerParam ('wiki_id ' ), $ this ->request ->getIntegerParam ('edition ' ))) {
309
309
$ this ->flash ->success (t ('Edition was restored successfully. ' ));
310
310
$ this ->response ->redirect ($ this ->helper ->url ->to ('WikiController ' , 'detail ' , array ('plugin ' => 'wiki ' , 'project_id ' => $ project ['id ' ], 'wiki_id ' => $ this ->request ->getIntegerParam ('wiki_id ' ))), true );
311
311
// $this->url->link(t($page['title']), 'WikiController', 'detail', array('plugin' => 'wiki', 'project_id' => $project['id'], 'wiki_id' => $page['id']))
@@ -348,16 +348,16 @@ public function save()
348
348
$ project = $ this ->getProject ();
349
349
350
350
$ values = $ this ->request ->getValues ();
351
- list ($ valid , $ errors ) = $ this ->wiki ->validatePageCreation ($ values );
351
+ list ($ valid , $ errors ) = $ this ->wikiModel ->validatePageCreation ($ values );
352
352
353
353
if ($ valid ) {
354
354
355
355
$ newDate = date ('Y-m-d ' );
356
356
357
- $ wiki_id = $ this ->wiki ->createpage ($ values ['project_id ' ], $ values ['title ' ], $ values ['content ' ], $ newDate );
357
+ $ wiki_id = $ this ->wikiModel ->createpage ($ values ['project_id ' ], $ values ['title ' ], $ values ['content ' ], $ newDate );
358
358
if ($ wiki_id > 0 ) {
359
359
360
- $ this ->wiki ->createEdition ($ values , $ wiki_id , 1 , $ newDate );
360
+ $ this ->wikiModel ->createEdition ($ values , $ wiki_id , 1 , $ newDate );
361
361
// don't really care if edition was successful
362
362
363
363
$ this ->flash ->success (t ('The wikipage has been created successfully. ' ));
@@ -389,18 +389,18 @@ public function update()
389
389
// $project = $this->getProject();
390
390
391
391
$ values = $ this ->request ->getValues ();
392
- list ($ valid , $ errors ) = $ this ->wiki ->validatePageUpdate ($ values );
392
+ list ($ valid , $ errors ) = $ this ->wikiModel ->validatePageUpdate ($ values );
393
393
394
394
if ($ valid ) {
395
395
396
396
$ newDate = date ('Y-m-d ' );
397
397
$ editions = $ values ['editions ' ] + 1 ;
398
398
399
- $ wiki_id = $ this ->wiki ->updatepage ($ values , $ editions , $ newDate );
399
+ $ wiki_id = $ this ->wikiModel ->updatepage ($ values , $ editions , $ newDate );
400
400
if ($ wiki_id > 0 ) {
401
401
402
402
// check config if admin wants editions saved
403
- $ this ->wiki ->createEdition ($ values , $ wiki_id , $ editions , $ newDate );
403
+ $ this ->wikiModel ->createEdition ($ values , $ wiki_id , $ editions , $ newDate );
404
404
// don't really care if editions was successful, begin transaction not really needed
405
405
406
406
$ this ->flash ->success (t ('The wikipage has been updated successfully. ' ));
@@ -443,7 +443,7 @@ public function remove()
443
443
$ wiki_id = $ this ->request ->getIntegerParam ('wiki_id ' );
444
444
445
445
// First delete all associated files, then delete the page itself.
446
- if ($ this ->wikiFile ->removeAll ($ wiki_id ) && $ this ->wiki ->removepage ($ wiki_id )) {
446
+ if ($ this ->wikiFileModel ->removeAll ($ wiki_id ) && $ this ->wikiModel ->removepage ($ wiki_id )) {
447
447
$ this ->flash ->success (t ('Wiki page removed successfully. ' ));
448
448
} else {
449
449
$ this ->flash ->failure (t ('Unable to remove this wiki page. ' ));
0 commit comments