ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilWikiHandlerGUI.php
Go to the documentation of this file.
1
<?
php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
24
35
class
ilWikiHandlerGUI
36
{
40
protected
$ctrl
;
41
45
protected
$lng
;
46
50
protected
$access
;
51
55
protected
$tpl
;
56
60
protected
$nav_history
;
61
62
public
function
__construct
()
63
{
64
global
$DIC
;
65
66
$this->lng = $DIC->language();
67
$this->access = $DIC->access();
68
$this->tpl = $DIC[
"tpl"
];
69
$this->nav_history = $DIC[
"ilNavigationHistory"
];
70
$ilCtrl
= $DIC->ctrl();
71
72
// initialisation stuff
73
$this->ctrl =
$ilCtrl
;
74
}
75
79
public
function
executeCommand
()
80
{
81
$lng
=
$this->lng
;
82
$ilAccess =
$this->access
;
83
$tpl
=
$this->tpl
;
84
$ilNavigationHistory =
$this->nav_history
;
85
86
$cmd = $this->ctrl->getCmd();
87
$next_class = $this->ctrl->getNextClass($this);
88
if
($next_class ==
""
) {
89
$this->ctrl->setCmdClass(
"ilobjwikigui"
);
90
$next_class = $this->ctrl->getNextClass($this);
91
}
92
93
// add entry to navigation history
94
if
($ilAccess->checkAccess(
"read"
,
""
,
$_GET
[
"ref_id"
])) {
95
$obj_id =
ilObject::_lookupObjId
(
$_GET
[
"ref_id"
]);
96
$title
=
ilObject::_lookupTitle
($obj_id);
97
98
if
(
$_GET
[
"page"
] !=
""
) {
99
$page =
$_GET
[
"page"
];
100
}
else
{
101
include_once(
"./Modules/Wiki/classes/class.ilObjWiki.php"
);
102
$page =
ilObjWiki::_lookupStartPage
($obj_id);
103
}
104
105
include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php"
);
106
if
(
ilWikiPage::exists
($obj_id, $page)) {
107
include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php"
);
108
109
$add =
"_"
. rawurlencode($page);
110
111
$page_id =
ilWikiPage::getPageIdForTitle
($obj_id, $page);
112
$ptitle =
ilWikiPage::lookupTitle
($page_id);
113
114
$title
.=
": "
. $ptitle;
115
116
$append = (
$_GET
[
"page"
] !=
""
)
117
?
"_"
.
ilWikiUtil::makeUrlTitle
($page)
118
:
""
;
119
include_once(
'./Services/Link/classes/class.ilLink.php'
);
120
$goto =
ilLink::_getStaticLink
(
121
$_GET
[
"ref_id"
],
122
"wiki"
,
123
true
,
124
$append
125
);
126
//var_dump($goto);
127
$ilNavigationHistory->addItem(
128
$_GET
[
"ref_id"
],
129
"./goto.php?target=wiki_"
.
$_GET
[
"ref_id"
] . $add,
130
"wiki"
,
131
$title
,
132
$page_id,
133
$goto
134
);
135
}
136
}
137
138
switch
($next_class) {
139
case
'ilobjwikigui'
:
140
require_once
"./Modules/Wiki/classes/class.ilObjWikiGUI.php"
;
141
$mc_gui =
new
ilObjWikiGUI
(
""
, (
int
)
$_GET
[
"ref_id"
],
true
,
false
);
142
$this->ctrl->forwardCommand($mc_gui);
143
break
;
144
}
145
146
$tpl
->show();
147
}
148
}
ilWikiPage\lookupTitle
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
Definition:
class.ilWikiPage.php:466
ilWikiHandlerGUI\executeCommand
executeCommand()
execute command
Definition:
class.ilWikiHandlerGUI.php:79
ilWikiHandlerGUI\$tpl
$tpl
Definition:
class.ilWikiHandlerGUI.php:55
$DIC
global $DIC
Definition:
saml.php:7
$_GET
$_GET["client_id"]
Definition:
cfg.phpunit.template.php:12
ilLink\_getStaticLink
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
Definition:
class.ilLink.php:53
ilObjWiki\_lookupStartPage
static _lookupStartPage($a_wiki_id)
Lookup start page.
Definition:
class.ilObjWiki.php:622
ilWikiHandlerGUI\$lng
$lng
Definition:
class.ilWikiHandlerGUI.php:45
ilObject\_lookupTitle
static _lookupTitle($a_id)
lookup object title
Definition:
class.ilObject.php:988
ilWikiPage\getPageIdForTitle
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
Definition:
class.ilWikiPage.php:444
$ilCtrl
global $ilCtrl
Definition:
ilias.php:18
ilWikiHandlerGUI\$nav_history
$nav_history
Definition:
class.ilWikiHandlerGUI.php:60
ilWikiHandlerGUI\$access
$access
Definition:
class.ilWikiHandlerGUI.php:50
ilWikiUtil\makeUrlTitle
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
Definition:
class.ilWikiUtil.php:588
ilObject\_lookupObjId
static _lookupObjId($a_id)
Definition:
class.ilObject.php:1107
ilWikiHandlerGUI\$ctrl
$ctrl
Definition:
class.ilWikiHandlerGUI.php:40
ilWikiPage\exists
static exists($a_wiki_id, $a_title)
Checks whether a page with given title exists.
Definition:
class.ilWikiPage.php:400
ilWikiHandlerGUI
Handles user interface for wikis.
Definition:
class.ilWikiHandlerGUI.php:35
php
$title
$title
Definition:
memcachestat.tpl.php:28
ilWikiHandlerGUI\__construct
__construct()
Definition:
class.ilWikiHandlerGUI.php:62
ilObjWikiGUI
Class ilObjWikiGUI.
Definition:
class.ilObjWikiGUI.php:23
Modules
Wiki
classes
class.ilWikiHandlerGUI.php
Generated on Thu Jan 16 2025 19:02:14 for ILIAS by
1.8.13 (using
Doxyfile
)