diff options
Diffstat (limited to 'h-source/Application/Controllers/MeetController.php')
-rw-r--r-- | h-source/Application/Controllers/MeetController.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/MeetController.php b/h-source/Application/Controllers/MeetController.php index 72e9006..5395a21 100644 --- a/h-source/Application/Controllers/MeetController.php +++ b/h-source/Application/Controllers/MeetController.php @@ -37,6 +37,7 @@ class MeetController extends BaseController $this->model('IssuesModel'); $this->model('MessagesModel'); $this->model('TalkModel'); + $this->model('WikiModel'); $argKeys = array( 'page:forceNat' => 1, @@ -120,11 +121,14 @@ class MeetController extends BaseController $messNumb = $this->m['MessagesModel']->select('id_mes,messages.id_issue,messages.creation_date')->where(array('created_by'=>$clean['id_user'],'deleted'=>'no'))->rowNumber(); $talkNumb = $this->m['TalkModel']->select('talk.title')->where(array('created_by'=>$clean['id_user'],'deleted'=>'no'))->rowNumber(); + + $wikiNumb = $this->m['WikiModel']->select()->where($this->whereArray)->rowNumber(); $data['hasHardware'] = $hardNumb > 0 ? true : false; $data['hasIssues'] = $issuesNumb > 0 ? true : false; $data['hasMessages'] = $messNumb > 0 ? true : false; $data['hasTalk'] = $talkNumb > 0 ? true : false; + $data['hasWiki'] = $wikiNumb > 0 ? true : false; $this->append($data); $this->load('contributions'); @@ -258,4 +262,40 @@ class MeetController extends BaseController $this->right(); } } + + //hardware contributions + public function wiki($lang = 'en', $user = '') + { + $clean['user'] = ctype_alnum($user) ? sanitizeAll($user) : ''; + $data['title'] = "wiki contributions - ".Website::$generalName; + + $this->shift(2); + + if ($this->userExists($clean['user'])) + { + //load the Pages helper + $this->helper('Pages','meet/wiki/'.$this->lang.'/'.$clean['user'],'page'); + + $this->whereArray['username'] = $clean['user']; + + $data['table'] = $this->m['WikiModel']->select('wiki.*,regusers.username')->where($this->whereArray)->orderBy('wiki.id_wiki desc'); + + $recordNumber = $this->m['WikiModel']->rowNumber(); + $page = $this->viewArgs['page']; + + $this->m['WikiModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30); + + $data['table'] = $this->m['WikiModel']->send(); + + $data['meet_username'] = $clean['user']; + + $data['pageList'] = $this->h['Pages']->render($page-5,11); + + $this->append($data); + $this->load('wiki'); + $this->right(); + } + + } + }
\ No newline at end of file |