ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilWikiPage.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/COPage/classes/class.ilPageObject.php");
5 include_once("./Modules/Wiki/classes/class.ilWikiUtil.php");
14 class ilWikiPage extends ilPageObject
15 {
16  protected $blocked = false;
17 
23  function getParentType()
24  {
25  return "wpg";
26  }
27 
34  function afterConstructor()
35  {
36  $this->getPageConfig()->configureByObjectId($this->getParentId());
37  }
38 
44  function setTitle($a_title)
45  {
46  $this->title = ilWikiUtil::makeDbTitle($a_title);
47  }
48 
54  function getTitle()
55  {
56  return $this->title;
57  }
58 
64  function setWikiId($a_wikiid)
65  {
66  $this->setParentId($a_wikiid);
67  }
68 
74  function getWikiId()
75  {
76  return $this->getParentId();
77  }
78 
84  function setWikiRefId($a_wiki_ref_id)
85  {
86  $this->parent_ref_id = $a_wiki_ref_id;
87  }
88 
94  function getWikiRefId()
95  {
96  return $this->parent_ref_id;
97  }
98 
104  public function setBlocked($a_val)
105  {
106  $this->blocked = $a_val;
107  }
108 
114  public function getBlocked()
115  {
116  return $this->blocked;
117  }
118 
124  public function setRating($a_val)
125  {
126  $this->rating = (bool)$a_val;
127  }
128 
134  public function getRating()
135  {
136  return $this->rating;
137  }
138 
142  function createFromXML()
143  {
144  global $ilDB;
145 
146  // ilWikiDataset creates wiki pages without copage objects
147  // (see create function in this class, parameter $a_prevent_page_creation)
148  // The ilCOPageImporter will call createFromXML without running through the read
149  // method -> we will miss the important wiki id, thus we read it now
150  // see also bug #12224
151  $set = $ilDB->query("SELECT id FROM il_wiki_page ".
152  " WHERE id = ".$ilDB->quote($this->getId(), "integer")
153  );
154  if ($rec = $ilDB->fetchAssoc($set))
155  {
156  $this->read(true);
157  }
158 
160  }
161 
165  function create($a_prevent_page_creation = false)
166  {
167  global $ilDB;
168 
169  $id = $ilDB->nextId("il_wiki_page");
170  $this->setId($id);
171  $query = "INSERT INTO il_wiki_page (".
172  "id".
173  ", title".
174  ", wiki_id".
175  ", blocked".
176  ", rating".
177  " ) VALUES (".
178  $ilDB->quote($this->getId(), "integer")
179  .",".$ilDB->quote($this->getTitle(), "text")
180  .",".$ilDB->quote((int) $this->getWikiId(), "integer")
181  .",".$ilDB->quote((int) $this->getBlocked(), "integer")
182  .",".$ilDB->quote((int) $this->getRating(), "integer")
183  .")";
184  $ilDB->manipulate($query);
185 
186  // create page object
187  if (!$a_prevent_page_creation)
188  {
189  parent::create();
190  $this->saveInternalLinks($this->getDomDoc());
191 
192  include_once "./Services/Notification/classes/class.ilNotification.php";
194  }
195 
196  $this->updateNews();
197  }
198 
205  function update($a_validate = true, $a_no_history = false)
206  {
207  global $ilDB;
208 
209  // update wiki page data
210  $query = "UPDATE il_wiki_page SET ".
211  " title = ".$ilDB->quote($this->getTitle(), "text").
212  ",wiki_id = ".$ilDB->quote((int) $this->getWikiId(), "integer").
213  ",blocked = ".$ilDB->quote((int) $this->getBlocked(), "integer").
214  ",rating = ".$ilDB->quote((int) $this->getRating(), "integer").
215  " WHERE id = ".$ilDB->quote($this->getId(), "integer");
216  $ilDB->manipulate($query);
217  $updated = parent::update($a_validate, $a_no_history);
218 
219  if ($updated === true)
220  {
221  include_once "./Services/Notification/classes/class.ilNotification.php";
223  $this->updateNews(true);
224  }
225  else
226  {
227  return $updated;
228  }
229 
230  return true;
231  }
232 
236  function read($a_omit_page_read = false)
237  {
238  global $ilDB;
239 
240  $query = "SELECT * FROM il_wiki_page WHERE id = ".
241  $ilDB->quote($this->getId(), "integer");
242  $set = $ilDB->query($query);
243  $rec = $ilDB->fetchAssoc($set);
244 
245  $this->setTitle($rec["title"]);
246  $this->setWikiId($rec["wiki_id"]);
247  $this->setBlocked($rec["blocked"]);
248  $this->setRating($rec["rating"]);
249 
250  // get co page
251  if (!$a_omit_page_read)
252  {
253  parent::read();
254  }
255  }
256 
257 
263  function delete()
264  {
265  global $ilDB;
266 
267  // get other pages that link to this page
268  $linking_pages = ilWikiPage::getLinksToPage($this->getWikiId(),
269  $this->getId());
270 
271  // delete internal links information to this page
272  include_once("./Services/COPage/classes/class.ilInternalLink.php");
274 
275  include_once "./Services/Notification/classes/class.ilNotification.php";
277 
278  // remove all notifications
279  include_once "./Services/Notification/classes/class.ilNotification.php";
281 
282  // delete record of table il_wiki_data
283  $query = "DELETE FROM il_wiki_page".
284  " WHERE id = ".$ilDB->quote($this->getId(), "integer");
285  $ilDB->manipulate($query);
286 
287  // delete co page
288  parent::delete();
289 
290  // make links of other pages to this page a missing link
291  foreach($linking_pages as $lp)
292  {
293  $ilDB->manipulateF("DELETE FROM il_wiki_missing_page ".
294  " WHERE wiki_id = %s AND source_id = %s AND target_name = %s ",
295  array("integer", "integer", "text"),
296  array($this->getWikiId(), $lp["id"], $this->getTitle()));
297  $ilDB->manipulateF("INSERT INTO il_wiki_missing_page ".
298  "(wiki_id, source_id, target_name) VALUES ".
299  "(%s,%s,%s)",
300  array("integer", "integer", "text"),
301  array($this->getWikiId(), $lp["id"], $this->getTitle()));
302  }
303 
304  return true;
305  }
306 
312  static function deleteAllPagesOfWiki($a_wiki_id)
313  {
314  global $ilDB;
315 
316  // delete record of table il_wiki_data
317  $query = "SELECT * FROM il_wiki_page".
318  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer");
319  $set = $ilDB->query($query);
320 
321  while($rec = $ilDB->fetchAssoc($set))
322  {
323  $wiki_page = new ilWikiPage($rec["id"]);
324  $wiki_page->delete();
325 
326 
327  }
328  }
329 
333  static function exists($a_wiki_id, $a_title)
334  {
335  global $ilDB;
336 
337  $a_title = ilWikiUtil::makeDbTitle($a_title);
338 
339  $query = "SELECT id FROM il_wiki_page".
340  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
341  " AND title = ".$ilDB->quote($a_title, "text");
342  $set = $ilDB->query($query);
343  if($rec = $ilDB->fetchAssoc($set))
344  {
345  return true;
346  }
347 
348  return false;
349  }
350 
354  static function getIdForPageTitle($a_wiki_id, $a_title)
355  {
356  global $ilDB;
357 
358  $a_title = ilWikiUtil::makeDbTitle($a_title);
359 
360  $query = "SELECT id FROM il_wiki_page".
361  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
362  " AND title = ".$ilDB->quote($a_title, "text");
363  $set = $ilDB->query($query);
364  if($rec = $ilDB->fetchAssoc($set))
365  {
366  return $rec["id"];
367  }
368 
369  return false;
370  }
371 
375  static function getPageIdForTitle($a_wiki_id, $a_title)
376  {
377  global $ilDB;
378 
379  $a_title = ilWikiUtil::makeDbTitle($a_title);
380 
381  $query = "SELECT * FROM il_wiki_page".
382  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
383  " AND title = ".$ilDB->quote($a_title, "text");
384  $set = $ilDB->query($query);
385  if($rec = $ilDB->fetchAssoc($set))
386  {
387  return $rec["id"];
388  }
389 
390  return false;
391  }
392 
396  static function lookupTitle($a_page_id)
397  {
398  global $ilDB;
399 
400  $query = "SELECT * FROM il_wiki_page".
401  " WHERE id = ".$ilDB->quote($a_page_id, "integer");
402  $set = $ilDB->query($query);
403  if($rec = $ilDB->fetchAssoc($set))
404  {
405  return $rec["title"];
406  }
407 
408  return false;
409  }
410 
414  static function lookupWikiId($a_page_id)
415  {
416  global $ilDB;
417 
418  $query = "SELECT wiki_id FROM il_wiki_page".
419  " WHERE id = ".$ilDB->quote($a_page_id, "integer");
420  $set = $ilDB->query($query);
421  if ($rec = $ilDB->fetchAssoc($set))
422  {
423  return $rec["wiki_id"];
424  }
425 
426  return false;
427  }
428 
434  static function getAllPages($a_wiki_id)
435  {
436  global $ilDB;
437 
438  $pages = parent::getAllPages("wpg", $a_wiki_id);
439 
440  $query = "SELECT * FROM il_wiki_page".
441  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
442  " ORDER BY title";
443  $set = $ilDB->query($query);
444 
445  $pg = array();
446  while($rec = $ilDB->fetchAssoc($set))
447  {
448  if (isset($pages[$rec["id"]]))
449  {
450  $pg[$rec["id"]] = $pages[$rec["id"]];
451  $pg[$rec["id"]]["title"] = $rec["title"];
452  }
453  }
454 
455  return $pg;
456  }
457 
461  static function getLinksToPage($a_wiki_id, $a_page_id)
462  {
463  global $ilDB;
464 
465  include_once("./Services/COPage/classes/class.ilInternalLink.php");
466  $sources = ilInternalLink::_getSourcesOfTarget("wpg", $a_page_id, 0);
467 
468  $ids = array();
469  foreach ($sources as $source)
470  {
471  if ($source["type"] == "wpg:pg")
472  {
473  $ids[] = $source["id"];
474  }
475  }
476  // get wiki page record
477  $query = "SELECT * FROM il_wiki_page wp, page_object p".
478  " WHERE ".$ilDB->in("wp.id", $ids, false, "integer").
479  " AND wp.id = p.page_id AND p.parent_type = ".$ilDB->quote("wpg", "text").
480  " AND wp.wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
481  " ORDER BY title";
482  $set = $ilDB->query($query);
483 
484  $pages = array();
485  while ($rec = $ilDB->fetchAssoc($set))
486  {
487  $pages[] = array_merge($rec, array("user" => $rec["last_change_user"],
488  "date" => $rec["last_change"]));
489  }
490 
491  return $pages;
492  }
493 
499  static function getOrphanedPages($a_wiki_id)
500  {
501  global $ilDB;
502 
503  $pages = ilWikiPage::getAllPages($a_wiki_id);
504 
505  include_once("./Services/COPage/classes/class.ilInternalLink.php");
506 
507  $orphaned = array();
508  foreach ($pages as $k => $page)
509  {
510  $sources = ilInternalLink::_getSourcesOfTarget("wpg", $page["id"], 0);
511 
512  $ids = array();
513  foreach ($sources as $source)
514  {
515  if ($source["type"] == "wpg:pg")
516  {
517  $ids[] = $source["id"];
518  }
519  }
520  $query = "SELECT count(*) cnt FROM il_wiki_page".
521  " WHERE ".$ilDB->in("id", $ids, false, "integer").
522  " AND wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
523  " GROUP BY wiki_id";
524  $set = $ilDB->query($query);
525  $rec = $ilDB->fetchAssoc($set);
526  if ($rec["cnt"] == 0 &&
527  ilObjWiki::_lookupStartPage($a_wiki_id) != $page["title"])
528  {
529  $orphaned[] = $page;
530  }
531  }
532 
533  return $orphaned;
534  }
535 
541  static function _wikiPageExists($a_wiki_id, $a_title)
542  {
543  global $ilDB;
544 
545  $a_title = ilWikiUtil::makeDbTitle($a_title);
546 
547  $query = "SELECT id FROM il_wiki_page".
548  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
549  " AND title = ".$ilDB->quote($a_title, "text");
550  $set = $ilDB->query($query);
551 
552  $pages = array();
553  if ($rec = $ilDB->fetchAssoc($set))
554  {
555  return true;
556  }
557 
558  return false;
559  }
560 
566  static function getParentObjectContributors($a_wiki_id)
567  {
568  global $ilDB;
569 
570  $contributors = parent::getParentObjectContributors("wpg", $a_wiki_id);
571 
572  return $contributors;
573  }
574 
580  static function getPageContributors($a_page_id)
581  {
582  global $ilDB;
583 
584  $contributors = parent::getPageContributors("wpg", $a_page_id);
585 
586  return $contributors;
587  }
588 
589 
595  function saveInternalLinks($a_domdoc)
596  {
597  global $ilDB;
598 
599 
600  // *** STEP 1: Standard Processing ***
601 
602  parent::saveInternalLinks($a_domdoc);
603 
604 
605  // *** STEP 2: Other Pages -> This Page ***
606 
607  // Check, whether ANOTHER page links to this page as a "missing" page
608  // (this is the case, when this page is created newly)
609  $set = $ilDB->queryF("SELECT * FROM il_wiki_missing_page WHERE ".
610  " wiki_id = %s AND target_name = %s",
611  array("integer", "text"),
612  array($this->getWikiId(), ilWikiUtil::makeDbTitle($this->getTitle())));
613  while ($anmiss = $ilDB->fetchAssoc($set)) // insert internal links instead
614  {
615 //echo "adding link";
616  ilInternalLink::_saveLink("wpg:pg", $anmiss["source_id"], "wpg",
617  $this->getId(), 0);
618  }
619 //exit;
620  // now remove the missing page entries
621  $ilDB->manipulateF("DELETE FROM il_wiki_missing_page WHERE ".
622  " wiki_id = %s AND target_name = %s",
623  array("integer", "text"),
624  array($this->getWikiId(), $this->getTitle()));
625 
626 
627  // *** STEP 3: This Page -> Other Pages ***
628 
629  // remove the exising "missing page" links for THIS page (they will be re-inserted below)
630  $ilDB->manipulateF("DELETE FROM il_wiki_missing_page WHERE ".
631  " wiki_id = %s AND source_id = %s",
632  array("integer", "integer"),
633  array($this->getWikiId(), $this->getId()));
634 
635  // collect the wiki links of the page
636  include_once("./Modules/Wiki/classes/class.ilWikiUtil.php");
637  $xml = $a_domdoc->saveXML();
638  $int_wiki_links = ilWikiUtil::collectInternalLinks($xml, $this->getWikiId(), true);
639  foreach($int_wiki_links as $wlink)
640  {
641  $page_id = ilWikiPage::_getPageIdForWikiTitle($this->getWikiId(), $wlink);
642 
643  if ($page_id > 0) // save internal link for existing page
644  {
645  ilInternalLink::_saveLink("wpg:pg", $this->getId(), "wpg",
646  $page_id, 0);
647  }
648  else // save missing link for non-existing page
649  {
650  $ilDB->manipulateF("DELETE FROM il_wiki_missing_page WHERE".
651  " wiki_id = %s AND source_id = %s AND target_name = %s",
652  array("integer", "integer", "text"),
653  array($this->getWikiId(), $this->getId(), $wlink));
654  $ilDB->manipulateF("INSERT INTO il_wiki_missing_page (wiki_id, source_id, target_name)".
655  " VALUES (%s,%s,%s)",
656  array("integer", "integer", "text"),
657  array($this->getWikiId(), $this->getId(), $wlink));
658  }
659  }
660  }
661 
665  static function _getPageIdForWikiTitle($a_wiki_id, $a_title)
666  {
667  global $ilDB;
668 
669  $query = "SELECT id FROM il_wiki_page".
670  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
671  " AND title = ".$ilDB->quote($a_title, "text");
672  $set = $ilDB->query($query);
673  if($rec = $ilDB->fetchAssoc($set))
674  {
675  return $rec["id"];
676  }
677 
678  return false;
679  }
680 
686  static function getPopularPages($a_wiki_id)
687  {
688  global $ilDB;
689 
690  $query = "SELECT wp.*, po.view_cnt as cnt FROM il_wiki_page wp, page_object po".
691  " WHERE wp.wiki_id = ".$ilDB->quote($a_wiki_id, "integer").
692  " AND wp.id = po.page_id ".
693  " AND po.parent_type = ".$ilDB->quote("wpg", "text")." ".
694  " ORDER BY po.view_cnt";
695  $set = $ilDB->query($query);
696 
697  $pages = array();
698  while($rec = $ilDB->fetchAssoc($set))
699  {
700  $pages[] = $rec;
701  }
702 
703  return $pages;
704  }
705 
711  static function countPages($a_wiki_id)
712  {
713  global $ilDB;
714 
715  // delete record of table il_wiki_data
716  $query = "SELECT count(*) as cnt FROM il_wiki_page".
717  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer");
718  $s = $ilDB->query($query);
719  $r = $ilDB->fetchAssoc($s);
720 
721  return $r["cnt"];
722  }
723 
729  static function getRandomPage($a_wiki_id)
730  {
731  global $ilDB;
732 
733  $cnt = ilWikiPage::countPages($a_wiki_id);
734 
735  if ($cnt < 1)
736  {
737  return "";
738  }
739 
740  $rand = rand(1, $cnt);
741 
742  // delete record of table il_wiki_data
743  $ilDB->setLimit(1, $rand);
744  $query = "SELECT title FROM il_wiki_page".
745  " WHERE wiki_id = ".$ilDB->quote($a_wiki_id, "integer");
746  $s = $ilDB->query($query);
747  $r = $ilDB->fetchAssoc($s);
748 
749  return $r["title"];
750  }
751 
757  static function getNewPages($a_wiki_id)
758  {
759  global $ilDB;
760 
761  $pages = parent::getNewPages("wpg", $a_wiki_id);
762 
763  foreach($pages as $k => $page)
764  {
765  $pages[$k]["title"] = ilWikiPage::lookupTitle($page["id"]);
766  }
767 
768  return $pages;
769  }
770 
771 
778  public static function lookupObjIdByPage($a_page_id)
779  {
780  global $ilDB;
781 
782  $query = "SELECT wiki_id FROM il_wiki_page".
783  " WHERE id = ".$ilDB->quote($a_page_id, "integer");
784  $set = $ilDB->query($query);
785  if($rec = $ilDB->fetchAssoc($set))
786  {
787  return $rec["wiki_id"];
788  }
789 
790  return false;
791  }
792 
796  function rename($a_new_name)
797  {
798  global $ilDB;
799 
800  // replace unallowed characters
801  $a_new_name = str_replace(array("<", ">"), '', $a_new_name);
802 
803  // replace multiple whitespace characters by one single space
804  $a_new_name = trim(preg_replace('!\s+!', ' ', $a_new_name));
805 
806  $page_title = ilWikiUtil::makeDbTitle($a_new_name);
807  $pg_id = ilWikiPage::_getPageIdForWikiTitle($this->getWikiId(), $page_title);
808 
809  $xml_new_name = str_replace("&", "&amp;", $a_new_name);
810 
811  if ($pg_id == 0 || $pg_id == $this->getId())
812  {
813  include_once("./Services/COPage/classes/class.ilInternalLink.php");
814  $sources = ilInternalLink::_getSourcesOfTarget("wpg", $this->getId(), 0);
815 
816  foreach ($sources as $s)
817  {
818  if ($s["type"] == "wpg:pg" && ilPageObject::_exists("wpg", $s["id"]))
819  {
820  $wpage = new ilWikiPage($s["id"]);
821 
822  $col = ilWikiUtil::processInternalLinks($wpage->getXmlContent(), 0,
824  $new_content = $wpage->getXmlContent();
825  foreach ($col as $c)
826  {
827 
828  // this complicated procedure is needed due to the fact
829  // that depending on the collation e = é is true
830  // in the (mysql) database
831  // see bug http://www.ilias.de/mantis/view.php?id=11227
832  $t1 = ilWikiUtil::makeDbTitle($c["nt"]->mTextform);
833  $t2 = ilWikiUtil::makeDbTitle($this->getTitle());
834 
835  // this one replaces C2A0 (&nbsp;) by a usual space
836  // otherwise the comparision will fail, since you
837  // get these characters from tiny if more than one
838  // space is repeated in a string. This may not be
839  // 100% but we do not store $t1 anywhere and only
840  // modify it for the comparison
841  $t1 = preg_replace('/\xC2\xA0/', ' ', $t1);
842  $t2 = preg_replace('/\xC2\xA0/', ' ', $t2);
843 
844  $set = $ilDB->query($q = "SELECT ".$ilDB->quote($t1, "text")." = ".$ilDB->quote($t2, "text")." isequal");
845  $rec = $ilDB->fetchAssoc($set);
846 
847  if ($rec["isequal"])
848  {
849  $new_content =
850  str_replace("[[".$c["nt"]->mTextform."]]",
851  "[[".$xml_new_name."]]", $new_content);
852  if ($c["text"] != "")
853  {
854  $new_content =
855  str_replace("[[".$c["text"]."]]",
856  "[[".$xml_new_name."]]", $new_content);
857  }
858  $add = ($c["text"] != "")
859  ? "|".$c["text"]
860  : "";
861  $new_content =
862  str_replace("[[".$c["nt"]->mTextform.$add."]]",
863  "[[".$xml_new_name.$add."]]", $new_content);
864  }
865  }
866  $wpage->setXmlContent($new_content);
867 //echo htmlentities($new_content);
868  $wpage->update();
869  }
870  }
871 
872  include_once("./Modules/Wiki/classes/class.ilObjWiki.php");
873  if (ilObjWiki::_lookupStartPage($this->getWikiId()) == $this->getTitle())
874  {
875  ilObjWiki::writeStartPage($this->getWikiId(), $a_new_name);
876  }
877 
878  $this->setTitle($a_new_name);
879 
880  $this->update();
881  }
882 
883  return $a_new_name;
884  }
885 
886 
890  function updateNews($a_update = false)
891  {
892  global $ilUser;
893 
894  $news_set = new ilSetting("news");
895  $default_visibility = ($news_set->get("default_visibility") != "")
896  ? $news_set->get("default_visibility")
897  : "users";
898 
899  include_once("./Services/News/classes/class.ilNewsItem.php");
900  if (!$a_update)
901  {
902  $news_item = new ilNewsItem();
903  $news_item->setContext(
904  $this->getWikiId(), "wiki",
905  $this->getId(), "wpg");
906  $news_item->setPriority(NEWS_NOTICE);
907  $news_item->setTitle($this->getTitle());
908  $news_item->setContentTextIsLangVar(true);
909  $news_item->setContent("wiki_news_page_created");
910  $news_item->setUserId($ilUser->getId());
911  $news_item->setVisibility($default_visibility);
912  $news_item->create();
913  }
914  else
915  {
916  // get last news item of the day (if existing)
918  $this->getWikiId(), "wiki",
919  $this->getId(), "wpg", true);
920 
921  if ($news_id > 0)
922  {
923  $news_item = new ilNewsItem($news_id);
924  $news_item->setContent("wiki_news_page_changed");
925  $news_item->setUserId($ilUser->getId());
926  $news_item->setTitle($this->getTitle());
927  $news_item->setContentTextIsLangVar(true);
928  $news_item->update(true);
929  }
930  else
931  {
932  $news_item = new ilNewsItem();
933  $news_item->setContext(
934  $this->getWikiId(), "wiki",
935  $this->getId(), "wpg");
936  $news_item->setPriority(NEWS_NOTICE);
937  $news_item->setTitle($this->getTitle());
938  $news_item->setContentTextIsLangVar(true);
939  $news_item->setContent("wiki_news_page_changed");
940  $news_item->setUserId($ilUser->getId());
941  $news_item->setVisibility($default_visibility);
942  $news_item->create();
943  }
944  }
945  }
946 
950  function getNewsContent()
951  {
952  return "12.1.1: Test User, Max";
953  }
954 
961  static function getGotoForWikiPageTarget($a_target, $a_offline = false)
962  {
963  if (!$a_offline)
964  {
965  $href = "./goto.php?target=wiki_wpage_".$a_target;
966  }
967  else
968  {
969  $href = ILIAS_HTTP_PATH."/goto.php?target=wiki_wpage_".$a_target;
970  }
971  return $href;
972  }
973 
974 }
975 ?>