aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/MeetController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-02-18 00:17:07 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-02-18 00:17:07 +0000
commit0f42e1a7816893e083f49c933d1393a102a3510e (patch)
tree70ec94d02d098e75453d5961d9b6a9c0b77be469 /h-source/Application/Controllers/MeetController.php
parent265e0708d6eea9de98b36035fff1287a01221a00 (diff)
improved wiki
Diffstat (limited to 'h-source/Application/Controllers/MeetController.php')
-rw-r--r--h-source/Application/Controllers/MeetController.php40
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