MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
* Class for conversion between charsets.
|
||||
*
|
||||
* Typo Id: class.t3lib_cs.php 3439 2008-03-16 19:16:51Z flyguide $
|
||||
* Moodle $Id$
|
||||
*
|
||||
* @author Kasper Skaarhoj <[email protected]>
|
||||
* @author Martin Kutschker <[email protected]>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
* Contains the reknown class "t3lib_div" with general purpose functions
|
||||
*
|
||||
* Typo Id: class.t3lib_div.php 3797 2008-06-11 06:39:13Z stucki $
|
||||
* Moodle $Id$
|
||||
* Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
|
||||
* XHTML compliant
|
||||
* Usage counts are based on search 22/2 2003 through whole source including tslib/
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ Unassigned or not ready:
|
||||
- Wiki HTML: http://moodle.org/mod/forum/discuss.php?d=8920
|
||||
- http://moodle.org/mod/forum/discuss.php?d=7768#36954
|
||||
- Image Thumbnails http://moodle.org/mod/forum/discuss.php?d=8351
|
||||
|
||||
|
||||
|
||||
|
||||
ewiki Preparation:
|
||||
- Current Version: 1.01d
|
||||
|
||||
+2
-2
@@ -132,7 +132,7 @@
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$PAGE->navbar->add(get_string("administration","wiki"));
|
||||
$PAGE->set_title($wiki_entry->pagename);
|
||||
$PAGE->set_focuscontrol($focus);
|
||||
@@ -370,4 +370,4 @@
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
<?PHP //$Id$
|
||||
<?php
|
||||
//This php script contains all the stuff to backup/restore
|
||||
//wiki mods
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $status;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if (is_numeric($wiki)) {
|
||||
$wiki = $DB->get_record('wiki', array('id'=>$wiki));
|
||||
}
|
||||
|
||||
|
||||
//Start mod
|
||||
fwrite ($bf,start_tag("MOD",3,true));
|
||||
//Print assignment data
|
||||
@@ -68,16 +68,16 @@
|
||||
fwrite ($bf,full_tag("REVERTCHANGES",4,false,$wiki->revertchanges));
|
||||
fwrite ($bf,full_tag("INITIALCONTENT",4,false,$wiki->initialcontent));
|
||||
fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$wiki->timemodified));
|
||||
|
||||
|
||||
//backup entries and pages
|
||||
if (backup_userdata_selected($preferences,'wiki',$wiki->id)) {
|
||||
$status = backup_wiki_entries($bf,$preferences,$wiki->id, $preferences->mods["wiki"]->userinfo);
|
||||
$status = backup_wiki_files_instance($bf,$preferences,$wiki->id);
|
||||
}
|
||||
|
||||
|
||||
//End mod
|
||||
fwrite ($bf,end_tag("MOD",3,true));
|
||||
|
||||
|
||||
return $status;
|
||||
}
|
||||
|
||||
@@ -171,12 +171,12 @@
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
|
||||
function backup_wiki_files_instance($bf,$preferences,$instanceid) {
|
||||
global $CFG, $DB;
|
||||
|
||||
|
||||
$status = true;
|
||||
|
||||
|
||||
//First we check to moddata exists and create it as necessary
|
||||
//in temp/backup/$backup_code dir
|
||||
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
||||
@@ -240,4 +240,4 @@
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* This script is called through AJAX. It confirms that a user is still
|
||||
* This script is called through AJAX. It confirms that a user is still
|
||||
* trying to edit a page that they have locked (they haven't closed
|
||||
* their browser window or something).
|
||||
* their browser window or something).
|
||||
*
|
||||
* @copyright © 2006 The Open University
|
||||
* @author [email protected]
|
||||
@@ -15,7 +15,7 @@ require_once("../../config.php");
|
||||
|
||||
$PAGE->set_url($CFG->wwwroot.'/mod/wiki/confirmlock.php');
|
||||
|
||||
header('Content-Type: text/plain');
|
||||
header('Content-Type: text/plain');
|
||||
|
||||
$lockid = optional_param('lockid', 0, PARAM_INT);
|
||||
|
||||
@@ -27,9 +27,8 @@ if($lockid == 0) {
|
||||
if($lock=$DB->get_record('wiki_locks', array('id'=>$lockid))) {
|
||||
$lock->lockedseen=time();
|
||||
$DB->update_record('wiki_locks',$lock);
|
||||
print 'ok';
|
||||
print 'ok';
|
||||
} else {
|
||||
print 'cancel'; // Tells user their lock has been cancelled.
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
/**
|
||||
* Capability definitions for the wiki module.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ $capabilities = array(
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
'mod/wiki:overridelock' => array(
|
||||
|
||||
'riskbitmask' => 0,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php //$Id$
|
||||
<?php
|
||||
|
||||
// This file replaces:
|
||||
// * STATEMENTS section in db/install.xml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php //$Id$
|
||||
<?php
|
||||
|
||||
// This file keeps track of upgrades to
|
||||
// This file keeps track of upgrades to
|
||||
// the wiki module
|
||||
//
|
||||
// Sometimes, changes between versions involve
|
||||
@@ -71,4 +71,4 @@ function xmldb_wiki_upgrade($oldversion) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+264
-264
File diff suppressed because it is too large
Load Diff
+211
-211
@@ -1,7 +1,7 @@
|
||||
|
||||
README.de
|
||||
¯¯¯¯¯¯¯¯¯
|
||||
Dies ist eine teilweise Übersetzung der README Datei, die weiterhin als
|
||||
���������
|
||||
Dies ist eine teilweise �bersetzung der README Datei, die weiterhin als
|
||||
Referenz verwendet sollte, da hier nur ein paar allgemeine und Setup-
|
||||
Informationen enthalten sind.
|
||||
|
||||
@@ -28,9 +28,9 @@ Informationen enthalten sind.
|
||||
|
||||
6.1.2 Ohne MySQL DB verwenden (WICHTIG)
|
||||
6.1.3 db_fast_files
|
||||
7.3.3 BöseBäckSläshes \\\\" (WICHTIG)
|
||||
7.3.3 B�seB�ckSl�shes \\\\" (WICHTIG)
|
||||
|
||||
9.5.5 Paßwörter und tools/
|
||||
9.5.5 Pa�w�rter und tools/
|
||||
|
||||
|
||||
|
||||
@@ -39,65 +39,65 @@ Informationen enthalten sind.
|
||||
|
||||
|
||||
Was ist das?
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
������������
|
||||
Dies ist eine "WikiWikiWeb" Bibliothek, die in der PHP Webskriptsprache
|
||||
implementiert ist. Ein WikiWiki ist eine Webseite, die von wirklich jedem
|
||||
verändert/ergänzt werden kann, der dort vorbeischaut (ohne vorhergehenden
|
||||
ver�ndert/erg�nzt werden kann, der dort vorbeischaut (ohne vorhergehenden
|
||||
Registrierungskram).
|
||||
|
||||
Es sollte relativ einfach in bestehende Websites integrierbar sein,
|
||||
weil es eben kein komplettes Script sondern vielmehr eine Bibliothek
|
||||
ist, die kein fertiges Seitenlayout erzwingt. Stattdessen können die
|
||||
ist, die kein fertiges Seitenlayout erzwingt. Stattdessen k�nnen die
|
||||
erzeugten WikiSeiten als Inhalt in das Layout einer bestehenden Seite
|
||||
eingebunden werden.
|
||||
|
||||
|
||||
|
||||
Warum "ErfurtWiki"?
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
�������������������
|
||||
Meine Heimatstadt (Erfurt liegt nahe bei Weimar.de) - und das ist wirklich
|
||||
nix weiter als ein Name! Der interne Projektname ist übrigens "ewiki".
|
||||
nix weiter als ein Name! Der interne Projektname ist �brigens "ewiki".
|
||||
|
||||
|
||||
Warum sollte man ausgerechnet dieses Wiki verwenden wollen?
|
||||
|
||||
- es ist wirklich alles notwendige in einer einzigen Skriptdatei, so
|
||||
daß keine 20 anderen Dateien mit herumliegen müssen, wenn man es
|
||||
da� keine 20 anderen Dateien mit herumliegen m�ssen, wenn man es
|
||||
in die eigene Site einbindet
|
||||
|
||||
- vordefinierte Layouts werden nicht aufgezwungen, es gibt Beispielseiten
|
||||
aber keine Skins oder Themes aus denen man wählen müßte; das Wiki paßt
|
||||
aber keine Skins oder Themes aus denen man w�hlen m��te; das Wiki pa�t
|
||||
sich wirklich in eine existierende Seite ein
|
||||
|
||||
- es ist vergleichsweise schnell, reguläre Ausdrücke werden zwar auch hier
|
||||
- es ist vergleichsweise schnell, regul�re Ausdr�cke werden zwar auch hier
|
||||
verwendet, aber nicht so exzessiv wie in anderen Wikis
|
||||
(hauptsächlich einfache und flinke String-Funktionen)
|
||||
(haupts�chlich einfache und flinke String-Funktionen)
|
||||
|
||||
- der Funktionsumfang ist inzwischen beachtlich :)
|
||||
|
||||
|
||||
|
||||
WikiAlternativen
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Es gibt auch noch andere hübsche WikiWare, falls jemand hiermit nicht
|
||||
glücklich werden tut:
|
||||
����������������
|
||||
Es gibt auch noch andere h�bsche WikiWare, falls jemand hiermit nicht
|
||||
gl�cklich werden tut:
|
||||
|
||||
* PhpWiki ist deutlich vollständiger,
|
||||
* PhpWiki ist deutlich vollst�ndiger,
|
||||
siehe http://freshmeat.net/projects/phpwiki,
|
||||
unterstützt versch. Datenbanktypen, Lokalisierung, integrierter
|
||||
unterst�tzt versch. Datenbanktypen, Lokalisierung, integrierter
|
||||
Administrationsbereich
|
||||
|
||||
* Miki ist eine kleine WikiImplementierung in PHP von Jukka
|
||||
Zitting. http://miki.sourceforge.net/
|
||||
|
||||
* http://coWiki.org/ ist tatsächlich mehr ein CMS denn ein Wiki
|
||||
* http://coWiki.org/ ist tats�chlich mehr ein CMS denn ein Wiki
|
||||
|
||||
* Und schließlich: sfWiki - das sourceforge Wiki (daher auch zu finden
|
||||
* Und schlie�lich: sfWiki - das sourceforge Wiki (daher auch zu finden
|
||||
bei http://sfwiki.sourceforge.net/). Teile der WikiSyntax sieht ein
|
||||
wenig merkwürdig aus, ein paar andere Sachen sind ganz nett; und es
|
||||
unterstützt Benutzerauthentifizierung
|
||||
wenig merkw�rdig aus, ein paar andere Sachen sind ganz nett; und es
|
||||
unterst�tzt Benutzerauthentifizierung
|
||||
|
||||
* für andere Wikis in anderen Programmiersprachen einfach mal die
|
||||
* f�r andere Wikis in anderen Programmiersprachen einfach mal die
|
||||
Suchmaschienen nerven:
|
||||
http://www.freshmeat.net/search/?q=wiki§ion=projects
|
||||
http://www.google.com/search?q=wiki
|
||||
@@ -105,19 +105,19 @@ gl
|
||||
|
||||
|
||||
Autor
|
||||
¯¯¯¯¯
|
||||
Mario Salzer <milky*erphesfurt·de>
|
||||
�����
|
||||
Mario Salzer <milky*erphesfurt�de>
|
||||
ICQ95596825 und Yahoo: icq95596825
|
||||
|
||||
Und alle anderen wurden in die Datei CREDITS verbannt ;->
|
||||
|
||||
Dies ist ein relativ neues Projekt. Um es zu verbessern, bin ich sehr
|
||||
auf Rückmeldungen angewiesen. Jede Mail ist ein wertvoller Beitrag!
|
||||
auf R�ckmeldungen angewiesen. Jede Mail ist ein wertvoller Beitrag!
|
||||
|
||||
|
||||
|
||||
ProjektSeiten
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
�������������
|
||||
freshmeat
|
||||
- http://freshmeat.net/ewiki
|
||||
|
||||
@@ -130,37 +130,37 @@ neueste Versionen (instabile EnwicklerVersionen):
|
||||
|
||||
|
||||
Support bekommen
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Hilfe bei der Installation gibt's natürlich, und selbstverständlich sind
|
||||
wir auch dankbar für jeden Hinweis über bestehende Probleme und Fehler
|
||||
(bekanntermaßen ist die REAMDE noch nicht ausführlich genug und stellenweise
|
||||
überhaupt keine Hilfe).
|
||||
����������������
|
||||
Hilfe bei der Installation gibt's nat�rlich, und selbstverst�ndlich sind
|
||||
wir auch dankbar f�r jeden Hinweis �ber bestehende Probleme und Fehler
|
||||
(bekannterma�en ist die REAMDE noch nicht ausf�hrlich genug und stellenweise
|
||||
�berhaupt keine Hilfe).
|
||||
Bevor du aber einen BugReport versendest, lies dir bitte folgende Anleitung
|
||||
durch (absolut notwendig um KOSTENLOSEN support zu bekommen):
|
||||
|
||||
http://www.lugbz.org/documents/smart-questions_de.html
|
||||
|
||||
Danach bitte nicht zögern, einen der Autoren zu kontakten oder einfach eine
|
||||
Danach bitte nicht z�gern, einen der Autoren zu kontakten oder einfach eine
|
||||
Nachricht in BugReports oder UserSuggestion auf unserer ProjektSeite zu
|
||||
hinterlassen.
|
||||
Wenn du dich auf unserer http://erfurtwiki.sourceforge.net/?MailingList
|
||||
anmeldest, hast du die Möglichkeit Hilfe für dein Problem von einer größeren
|
||||
anmeldest, hast du die M�glichkeit Hilfe f�r dein Problem von einer gr��eren
|
||||
Gruppe von Leuten zu bekommen (an- und wieder abmelden geht schnell).
|
||||
|
||||
|
||||
|
||||
Lizens
|
||||
¯¯¯¯¯¯
|
||||
������
|
||||
Dieses "Programm" wird als "Public Domain" vertrieben. Public Domain
|
||||
ist wie "FreeWare", nur ein bischen mehr frei ;-> Man kann sich das
|
||||
vorstellen, wie die GPL ohne an die GPL gebunden zu sein. (Tatsächlich
|
||||
wollte ich einfach keine LICENSE Datei mitreinpacken, die größer ist als
|
||||
vorstellen, wie die GPL ohne an die GPL gebunden zu sein. (Tats�chlich
|
||||
wollte ich einfach keine LICENSE Datei mitreinpacken, die gr��er ist als
|
||||
das eigentliche Programm.)
|
||||
|
||||
Da dies ein freies (Bier) Stück Software ist, kann mich natürlich
|
||||
niemand für irgendwelche Fehler oder all die WIRKLICH SCHLIMMEN
|
||||
FESTPLATTEN-SCHÄDEN verantwortlich machen, die bei der Verwendung
|
||||
entstehen könnten ;>
|
||||
Da dies ein freies (Bier) St�ck Software ist, kann mich nat�rlich
|
||||
niemand f�r irgendwelche Fehler oder all die WIRKLICH SCHLIMMEN
|
||||
FESTPLATTEN-SCH�DEN verantwortlich machen, die bei der Verwendung
|
||||
entstehen k�nnten ;>
|
||||
|
||||
|
||||
|
||||
@@ -171,29 +171,29 @@ entstehen k
|
||||
|
||||
|
||||
Wie jetzt?
|
||||
¯¯¯¯¯¯¯¯¯¯
|
||||
ewiki benötigt:
|
||||
����������
|
||||
ewiki ben�tigt:
|
||||
|
||||
- Webserver (Apache, Nanoweb, ...)
|
||||
- PHP 4.1 oder neuer
|
||||
- nach Mglk. eine MySQL Datenbank (läuft aber auch ohne)
|
||||
- nach Mglk. eine MySQL Datenbank (l�uft aber auch ohne)
|
||||
- deine bereits exitierenden Webseite
|
||||
- die wundervollen "magic slashes" in antiken PHP version sollten wirklich
|
||||
abgeschalten sein
|
||||
|
||||
Wenn du keine MySQL-Datenbank hast, dann verwende die Erweiterung für
|
||||
Wenn du keine MySQL-Datenbank hast, dann verwende die Erweiterung f�r
|
||||
die Datei-Datenbank.
|
||||
|
||||
|
||||
|
||||
In yoursite.php integrieren
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
In den nächsten Abschitten, soll mit dem Begriff "yoursite.php" der
|
||||
���������������������������
|
||||
In den n�chsten Abschitten, soll mit dem Begriff "yoursite.php" der
|
||||
Teil deiner bestehenden Seite verstanden werden, der das Seitenlayout
|
||||
erzeugt (der also zumindest die <html><body> Tags um die Ausgaben von
|
||||
ewiki.php bastelt).
|
||||
Die schlichteste Lösung findet sich auch noch mal in example-2.php:
|
||||
|
||||
Die schlichteste L�sung findet sich auch noch mal in example-2.php:
|
||||
|
||||
<HTML>
|
||||
<BODY>
|
||||
<?php
|
||||
@@ -211,41 +211,41 @@ Die schlichteste L
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
Die ersten beiden Befehle öffnen eine Verbindung zur MySQL-Datenbank,
|
||||
normalerweise würde man das Ergebnis von mysql_conect() in einer Variable
|
||||
|
||||
Die ersten beiden Befehle �ffnen eine Verbindung zur MySQL-Datenbank,
|
||||
normalerweise w�rde man das Ergebnis von mysql_conect() in einer Variable
|
||||
wie "$db" ablegen, aber da PHP ohnehin nicht auf deren Verwendung besteht,
|
||||
wenn es nur eine DB-Verbindung gibt, wird eine solche Variable in
|
||||
"ewiki.php" auch gar nicht verwendet (und der Name dieser Variable wäre
|
||||
"ewiki.php" auch gar nicht verwendet (und der Name dieser Variable w�re
|
||||
damit hier egal).
|
||||
|
||||
Der Wert in der define() Zeile sagt ewiki wie die Hyperlinks zu den
|
||||
referenzierten WikiSeiten lauten müssen, damit ewiki.php auch für die
|
||||
nächste angeklickte WikiSeite aufgerufen wird.
|
||||
referenzierten WikiSeiten lauten m�ssen, damit ewiki.php auch f�r die
|
||||
n�chste angeklickte WikiSeite aufgerufen wird.
|
||||
Wenn du nur ein einziges "yoursite.php" Skript hast, wirst du den Wert
|
||||
direkt in "ewiki.php" verändern wollen.
|
||||
direkt in "ewiki.php" ver�ndern wollen.
|
||||
|
||||
Das error_reporting(0) wird sehr empfohlen.
|
||||
|
||||
Das include("ewiki.php") lädt endlich die ewiki "Bibliothek" und setzt
|
||||
Das include("ewiki.php") l�dt endlich die ewiki "Bibliothek" und setzt
|
||||
alle bis hierher noch nicht definierten EWIKI_ Konstanten.
|
||||
|
||||
Der Aufruf der ewiki_page() Funktion gibt diejenige WikiSeite zurück, die
|
||||
vom Browser angefragt wurde. Du mußt hier "echo" davorsetzen, denn sonst
|
||||
Der Aufruf der ewiki_page() Funktion gibt diejenige WikiSeite zur�ck, die
|
||||
vom Browser angefragt wurde. Du mu�t hier "echo" davorsetzen, denn sonst
|
||||
wird der Text nicht ausgegeben (verpufft im PHP-Nirvana) - ewiki gibt die
|
||||
erzeugte Seite nicht selber aus.
|
||||
|
||||
|
||||
|
||||
Den WikiSeitenNamen bestimmen
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
�����������������������������
|
||||
Wenn du ewiki_page() einfach so aufrufst wie im oberen Beispiel angegeben
|
||||
(empfohlen), dann wird es versuchen, den Namen der angefragten Seite selber
|
||||
zu ermmitteln ($_SERVER["PATH_INFO"] oder GET-Variablen '?id=' oder '?name='
|
||||
oder '?page=' oder '?file=' in $_REQUEST["name"]).
|
||||
oder '?page=' oder '?file=' in $_REQUEST["name"]).
|
||||
|
||||
Wenn yoursite.php aber einen anderen Weg benutzt (andere Parameternamen),
|
||||
um den WikiSeitenNamen zu übergeben, dann kann man ihn schlicht als ersten
|
||||
um den WikiSeitenNamen zu �bergeben, dann kann man ihn schlicht als ersten
|
||||
Parameter angeben:
|
||||
|
||||
ewiki_page( $id = "WikiSeitenNanem" );
|
||||
@@ -259,19 +259,19 @@ Seiten einzubinden.
|
||||
|
||||
|
||||
WikiSprache einstellen (deutsch)
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Ich hab es jetzt schon einige Leute behaupten hören, aber auch beim
|
||||
��������������������������������
|
||||
Ich hab es jetzt schon einige Leute behaupten h�ren, aber auch beim
|
||||
IntranetExplodierer kann man die "bevorzugten Sprachen" irgendwo einstellen.
|
||||
Wers nicht findet, kann ja auch gleichmal auf einen aktuellen Browser
|
||||
wechseln - das lohnt sich nicht nur wegen der vielen Seiten, die es dann
|
||||
plötzlich doch auf Deutsch gibt!
|
||||
pl�tzlich doch auf Deutsch gibt!
|
||||
|
||||
Wer es partou nicht hinbekommt, kann natürlich die deutsche Sprache für
|
||||
ewiki erzwingen; hilfreich hierfür ist z.B. die include()-Datei
|
||||
Wer es partou nicht hinbekommt, kann nat�rlich die deutsche Sprache f�r
|
||||
ewiki erzwingen; hilfreich hierf�r ist z.B. die include()-Datei
|
||||
"fragments/force_lang_de.php".
|
||||
|
||||
Es funktioniert aber auch mit diesem Befehl, der irgendwo in ewiki.php,
|
||||
config.php oder yoursite.php eingefügt werden kann (nicht empfohlen):
|
||||
config.php oder yoursite.php eingef�gt werden kann (nicht empfohlen):
|
||||
|
||||
$_SERVER["HTTP_ACCEPT_LANGUAGE"] = "de; q=1.0, en; q=0.2, eo, nl";
|
||||
|
||||
@@ -284,10 +284,10 @@ $_SERVER["HTTP_ACCEPT_LANGUAGE"] = "de; q=1.0, en; q=0.2, eo, nl";
|
||||
|
||||
|
||||
Im Detail
|
||||
¯¯¯¯¯¯¯¯¯
|
||||
���������
|
||||
Die MySQL DB Tabellenstruktur ist zu einem gewissen Grad kompatibel mit der
|
||||
des allseits bekannten »PHPWiki« (normalerweise reicht es EWIKI_DB_TABLE_NAME
|
||||
auf "wiki" zu ändern, um PhpWikis DB weiterzuverwenden).
|
||||
des allseits bekannten �PHPWiki� (normalerweise reicht es EWIKI_DB_TABLE_NAME
|
||||
auf "wiki" zu �ndern, um PhpWikis DB weiterzuverwenden).
|
||||
Dies ist der MySQL Befehl, der die DB-Tabelle erstellt (beim ersten Start,
|
||||
automatisch):
|
||||
|
||||
@@ -307,40 +307,40 @@ automatisch):
|
||||
|
||||
Den Spaltennamen {pagename} mochte ich eigentlich nicht, aber weil das der
|
||||
offensichtlich einzige Unterschied zur PhpWiki-Tabelle war, kam mir die Idee
|
||||
mit der Kombatibilität un so hab ich das adaptiert.
|
||||
Dummerweise muß nun die ewiki_database() Funktion "pagename" ständig von
|
||||
und nach "id" übersetzen.
|
||||
mit der Kombatibilit�t un so hab ich das adaptiert.
|
||||
Dummerweise mu� nun die ewiki_database() Funktion "pagename" st�ndig von
|
||||
und nach "id" �bersetzen.
|
||||
|
||||
Die Spalte {version} wird zur Speicherung der verschiedenen abgelegten
|
||||
Seitenänderungen verwendet. In anderen Wikis gibt es zu diesem Zweck eine
|
||||
Seiten�nderungen verwendet. In anderen Wikis gibt es zu diesem Zweck eine
|
||||
Bonus-tabelle wie "backup" oder "history", aber ich hab den Sinn von sowas
|
||||
bisher nicht verstanden; und daher gibt es in ewiki nur diese eine Tabelle
|
||||
(und das scheint absolut zu reichen)!
|
||||
Die erste {version} einer Seite erhält die Nummer 1. Eine bestehende
|
||||
Seiten {version} wird niemals überschrieben werden => sehr sicherer MySQL-
|
||||
Die erste {version} einer Seite erh�lt die Nummer 1. Eine bestehende
|
||||
Seiten {version} wird niemals �berschrieben werden => sehr sicherer MySQL-
|
||||
Einsatz.
|
||||
|
||||
Mehr über die {flags} in dem entsprechenden Abschnitt in der README. Das
|
||||
Feld {content} enthält natürlich den WikiSeitenQuelltext. {created} und
|
||||
Mehr �ber die {flags} in dem entsprechenden Abschnitt in der README. Das
|
||||
Feld {content} enth�lt nat�rlich den WikiSeitenQuelltext. {created} und
|
||||
{lastmodified} enthalten die entsprechenden Zeitangaben im UNIX format.
|
||||
|
||||
{refs} enthälte eine "\n" - getrennte Liste von referenzierten WikiSeiten.
|
||||
Der Code um diese List zu erzeugen ist etwas unsauber, so daß oftmals
|
||||
GeisterSeiten aufgeführt sind. Wieauchimmer, daß beeinträchtigt ewiki
|
||||
nicht wirklich, und eine Korrektur wäre Zeit- und Geschwindigkeits-
|
||||
{refs} enth�lte eine "\n" - getrennte Liste von referenzierten WikiSeiten.
|
||||
Der Code um diese List zu erzeugen ist etwas unsauber, so da� oftmals
|
||||
GeisterSeiten aufgef�hrt sind. Wieauchimmer, da� beeintr�chtigt ewiki
|
||||
nicht wirklich, und eine Korrektur w�re Zeit- und Geschwindigkeits-
|
||||
verschwendung.
|
||||
|
||||
{meta} kann Bonusinfos enth, so daß die Tabellenstruktur nicht bei jeder
|
||||
Erweiterung geändert werden muß. Aktuell nur für Binärdaten (Bilder)
|
||||
{meta} kann Bonusinfos enth, so da� die Tabellenstruktur nicht bei jeder
|
||||
Erweiterung ge�ndert werden mu�. Aktuell nur f�r Bin�rdaten (Bilder)
|
||||
verwendet.
|
||||
|
||||
{hits} zählt die Seitenaufrufe, und ist nicht in {meta} integriert, weil
|
||||
{hits} z�hlt die Seitenaufrufe, und ist nicht in {meta} integriert, weil
|
||||
separat schneller und einfacher zu verwenden.
|
||||
|
||||
Die ewiki DB Tabelle kann nicht nur Texteseiten enthalten, sondern auch
|
||||
binären Inhalt (vornehmlich Bilder), siehe {flags}.
|
||||
bin�ren Inhalt (vornehmlich Bilder), siehe {flags}.
|
||||
|
||||
Das Ein-Tabellen-Konzept hat es übrigens auch recht einfach gemacht, das
|
||||
Das Ein-Tabellen-Konzept hat es �brigens auch recht einfach gemacht, das
|
||||
Datei-basierte DB-Backend zu entwickeln. Eine Beispieldatei:
|
||||
|
||||
id: WikiPageName
|
||||
@@ -350,7 +350,7 @@ Datei-basierte DB-Backend zu entwickeln. Eine Beispieldatei:
|
||||
created: 1046532697
|
||||
lastmodified: 1046532697
|
||||
refs: \nErfurtWiki\nNewestPages\n
|
||||
|
||||
|
||||
!! WikiSourceContent
|
||||
<more-text>...
|
||||
|
||||
@@ -358,8 +358,8 @@ Datei-basierte DB-Backend zu entwickeln. Eine Beispieldatei:
|
||||
|
||||
|
||||
ewiki_ Funktionen
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Einige der Basis-Funktionen aus ewiki.php können getrennt von den anderen
|
||||
�����������������
|
||||
Einige der Basis-Funktionen aus ewiki.php k�nnen getrennt von den anderen
|
||||
verwendet werden, andere sind ausgelegt um durch bessere Implementierungen
|
||||
ersetzt zu werden.
|
||||
|
||||
@@ -370,13 +370,13 @@ ersetzt zu werden.
|
||||
angegebene) aus der DB holt, und mit ewiki_format() die fertige
|
||||
HTML-Seite erzeugt.
|
||||
Wenn die angefragte Seite nicht existert, wird eine edit-Box
|
||||
zurückgegeben.
|
||||
zur�ckgegeben.
|
||||
|
||||
|
||||
ewiki_page_...()
|
||||
----------------
|
||||
Die meisten Fkt. mit diesem Prefix wurden aus der Hauptfkt.
|
||||
herausgetrennt, um ewiki übersichtlicher und leichter erweiterbar
|
||||
herausgetrennt, um ewiki �bersichtlicher und leichter erweiterbar
|
||||
zu machen.
|
||||
Die meisten enthalten Code um spezielle/interne Seiten zu erzeugen
|
||||
(Suche, Neuest, Info, und das Edit <FORMular>, ...)
|
||||
@@ -385,24 +385,24 @@ ersetzt zu werden.
|
||||
ewiki_script()
|
||||
--------------
|
||||
Erzeugt URL aus angegebener Seiten $id und $action, verwendet dazu
|
||||
die EWIKI_SCRIPT-Konstante. Dieser wrapper ermöglicht es auch die
|
||||
eigentlich reservierten Schrägstriche in Seitennamen zu verwenden.
|
||||
die EWIKI_SCRIPT-Konstante. Dieser wrapper erm�glicht es auch die
|
||||
eigentlich reservierten Schr�gstriche in Seitennamen zu verwenden.
|
||||
|
||||
|
||||
ewiki_control_links($id, $data)
|
||||
-------------------------------
|
||||
Gibt die Zeile mit "DieseSeiteÄndern, SeitenInfo, ... links" aus.
|
||||
Gibt die Zeile mit "DieseSeite�ndern, SeitenInfo, ... links" aus.
|
||||
|
||||
|
||||
ewiki_format($wiki_source, $scan_links=1, $html_allowed=0)
|
||||
----------------------------------------------------------
|
||||
Erzeugt die formatierten (HTML) Ausgabe für den übergebenen
|
||||
Erzeugt die formatierten (HTML) Ausgabe f�r den �bergebenen
|
||||
WikiQuelltext.
|
||||
|
||||
Der zweite Parameter gibt an, ob nach denen im Quelltext referenzierten
|
||||
WikiLinks in der DB nachgesehen werden soll. Wenn dieser Parameter 0
|
||||
ist, dann wird eine bereits vorh. $ewiki_links Array stattdessen
|
||||
verwendet, um zu prüfen ob eine Seite in der DB vorh. ist.
|
||||
verwendet, um zu pr�fen ob eine Seite in der DB vorh. ist.
|
||||
|
||||
|
||||
ewiki_link_regex_callback()
|
||||
@@ -426,13 +426,13 @@ ersetzt zu werden.
|
||||
--------------
|
||||
erzeugt einen String, der mit REMOTE_ADDR und $ewiki_author
|
||||
angereichert wurde.
|
||||
|
||||
|
||||
|
||||
ewiki_database($FUNCTION, $args=array() )
|
||||
------------------------------------------
|
||||
Diese Funktion ist die "Datenbankabstraktion" in ewiki. Sie enthält
|
||||
''only'' sechs SQL Kommandos, die ersetzt werden müßtem, wenn du eine
|
||||
andere DB verwenden mußt.
|
||||
Diese Funktion ist die "Datenbankabstraktion" in ewiki. Sie enth�lt
|
||||
''only'' sechs SQL Kommandos, die ersetzt werden m��tem, wenn du eine
|
||||
andere DB verwenden mu�t.
|
||||
Die einzelnen "atomaren" Funktionen sind beschrieben in der
|
||||
orignialen README-Datei.
|
||||
|
||||
@@ -441,41 +441,41 @@ ersetzt zu werden.
|
||||
|
||||
|
||||
$GLOBALS Verschmutzung
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
����������������������
|
||||
Zumindest die ewiki_page() Funktion erzeugt einige Variablen im globalen
|
||||
Namensraum. Natürlich haben auch diese Namen, die sich mit irgendetwas
|
||||
aus yoursite.php überschneiden sollten:
|
||||
Namensraum. Nat�rlich haben auch diese Namen, die sich mit irgendetwas
|
||||
aus yoursite.php �berschneiden sollten:
|
||||
|
||||
$ewiki_id - Enthält die DB-$id der aktuellen Seite, ist nicht
|
||||
$ewiki_id - Enth�lt die DB-$id der aktuellen Seite, ist nicht
|
||||
immer identisch mit $ewiki_title.
|
||||
|
||||
$ewiki_action - Der $action-Parameter, mit dem die Seite angefordert
|
||||
wurde.
|
||||
|
||||
$ewiki_title - Wird nach dem ersten Aufruf von ewiki_page() gestzt,
|
||||
am nützlichsten um in dem <TITLE> Tag ausgegeben
|
||||
zu werden - dafür muß aber ewiki_page() schon im
|
||||
am n�tzlichsten um in dem <TITLE> Tag ausgegeben
|
||||
zu werden - daf�r mu� aber ewiki_page() schon im
|
||||
Kopfbereich aufgerufen werden, die Ausgabe gepuffert,
|
||||
damit der Seitentitel noch innerhalb von <HEAD>
|
||||
ausgegeben werden kann.
|
||||
|
||||
$ewiki_script - Eine Kopie von EWIKI_SCRIPT.
|
||||
|
||||
$ewiki_links - Ist ein Arraym daß in ewiki_format() prodiziert wird, und
|
||||
$ewiki_links - Ist ein Arraym da� in ewiki_format() prodiziert wird, und
|
||||
alle gesuchten WikiSeitenNamen mit einem Wert von 0 oder 1
|
||||
assoziiert, je nach dem, ob die Seite existiert oder nicht.
|
||||
Wird diese variable jedoch auf ==true gesetzt (also kein
|
||||
Array), wird angenommen, daß alle WikiSeiten existieren.
|
||||
Array), wird angenommen, da� alle WikiSeiten existieren.
|
||||
|
||||
$ewiki_author - Der Inhalt dieser Variable wird in der {author}-Spalte
|
||||
von gespeicherten WikiSeiten abgelegt (zusammen mit
|
||||
IP:PORT).
|
||||
Wenn yoursite.php Benutzer kennt und authentifizieren
|
||||
kann, sollte der Nutzername hier abgelegt werden.
|
||||
Diese Feld sollte aber NICHT ZUGEMÜLLT werden mit
|
||||
Diese Feld sollte aber NICHT ZUGEM�LLT werden mit
|
||||
irgendwelchen Bonusinfos.
|
||||
|
||||
$ewiki_auth_user - Enthält Namen eines wirklich authentifizierten
|
||||
$ewiki_auth_user - Enth�lt Namen eines wirklich authentifizierten
|
||||
Benutzers im _PROTECTED_MODE. Nicht notwendig, wird aber
|
||||
u.a. gerne von ewiki_auth() und ewiki_auth_user() zur
|
||||
Vereinfachung verwendet.
|
||||
@@ -483,14 +483,14 @@ aus yoursite.php
|
||||
$ewiki_ring - Berechtigungslevel im _PROTECTED_MODE
|
||||
3 = nur lesen
|
||||
2 = normaler Benutzer (lesen, editieren, ...)
|
||||
1 = Moderator (auch Seiten löschen?)
|
||||
1 = Moderator (auch Seiten l�schen?)
|
||||
0 = Administrator (darf alles)
|
||||
|
||||
$ewiki_plugins - Dieses array verbindet Aufgabengruppen (z.B. "database"
|
||||
oder "image_resize") mit Funktionsnamen.
|
||||
Dies stellt einen wirklich einfachen und dennoch mächtigen
|
||||
Dies stellt einen wirklich einfachen und dennoch m�chtigen
|
||||
Weg dar, um ewiki zu erweitern.
|
||||
Es gibt ein eigenes Kapitel darüber in der orig. README.
|
||||
Es gibt ein eigenes Kapitel dar�ber in der orig. README.
|
||||
|
||||
$ewiki_config - Ersetzt teilweise die EWIKI_ Konstanten.
|
||||
|
||||
@@ -499,47 +499,47 @@ Folgende gibt's nich mehr (teilweise in $ewiki_config):
|
||||
$ewiki_data, $ewiki_interwiki, $ewiki_internal_pages,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EWIKI_ Konstanten
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
�����������������
|
||||
- - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - -
|
||||
WARNUNG: Dieser Abschnitt ist grundsätzlich besonders inaktuell! Von daher
|
||||
WARNUNG: Dieser Abschnitt ist grunds�tzlich besonders inaktuell! Von daher
|
||||
sollte ein Studium des gleichnamigen Abschnitts in der orig. README-Datei
|
||||
wirklich vorgezogen werden!! Viele der neu hinzugekommenen Konstanten werden
|
||||
hier schlichtweg nicht erwähnt, oder inzwischen sogar __falsch__ beschrieben.
|
||||
hier schlichtweg nicht erw�hnt, oder inzwischen sogar __falsch__ beschrieben.
|
||||
- - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - -
|
||||
|
||||
Dieser Abschnitt erklärt einige der Konstanten und wie man sie verwenden
|
||||
Dieser Abschnitt erkl�rt einige der Konstanten und wie man sie verwenden
|
||||
kann, um ewiki nach der eigenen Pfeife tanzen zu lassen.
|
||||
|
||||
Normalerweise solltest diese innherhalb von "ewiki.php" angepaßt werden, einige
|
||||
Normalerweise solltest diese innherhalb von "ewiki.php" angepa�t werden, einige
|
||||
sind jedoch mehr wie Statusvariablen ausgelegt und sollten von "yoursite.php"
|
||||
in Abhängigkeit von dort vorhanden Infos gesetzt werden (wenn dort Benutzer
|
||||
in Abh�ngigkeit von dort vorhanden Infos gesetzt werden (wenn dort Benutzer
|
||||
eingeloggt sind z.B.).
|
||||
Dann ist es gut einige der Konstanten vorzudefinieren (einmal def. Konst.
|
||||
können nicht wieder geändert werden).
|
||||
k�nnen nicht wieder ge�ndert werden).
|
||||
|
||||
|
||||
EWIKI_SCRIPT
|
||||
Wichtigste Einstellung. Wird von ewiki.php verwendet, um Links zu
|
||||
anderen WikiSeiten zu erzeugen.
|
||||
|
||||
Es benötigt den Namen von yourscript.php, daß selbst wiederrum
|
||||
Es ben�tigt den Namen von yourscript.php, da� selbst wiederrum
|
||||
ewiki.php geeignet einbindet.
|
||||
Der Name der angefragten WikiSeite wird immer schlicht an den hier
|
||||
definierten TextString angehängt, daher sollter dieser immer in
|
||||
definierten TextString angeh�ngt, daher sollter dieser immer in
|
||||
"/" oder "?" oder "?id=" oder "?name=" oder "?page=" enden, damit
|
||||
eine gültige URL dabei herauskommt und der SeitenName von ewiki_page()
|
||||
eine g�ltige URL dabei herauskommt und der SeitenName von ewiki_page()
|
||||
gefunden wird.
|
||||
|
||||
Wenn auf deinem Server mod_rewrite vorhanden ist und funktioniert,
|
||||
könntest du diese Konst. auch leer lassen, so alle Anfragen zu
|
||||
http://wiki.example.com/ an das richtige Skript übergeben werden.
|
||||
k�nntest du diese Konst. auch leer lassen, so alle Anfragen zu
|
||||
http://wiki.example.com/ an das richtige Skript �bergeben werden.
|
||||
Ansonsten ist es gut, wenn eine URL absolut zum Server-Hauptpfad
|
||||
angegeben ist, also z.B. "/~user/wiki/index.php/", damit Browser
|
||||
keine ungültigen URLs erzeugen, sobald eine $action vor den
|
||||
keine ung�ltigen URLs erzeugen, sobald eine $action vor den
|
||||
Seitennamen gesetzt wird (z.B. "edit/DieseSeite").
|
||||
|
||||
Die Konstante wird von ewiki_script() eingesetzt um URLs zu den
|
||||
@@ -560,23 +560,23 @@ k
|
||||
Definiert den Namen der WikiSeite, die als Startseite angezeigt werden
|
||||
soll.
|
||||
EWIKI_PAGE_NEWEST
|
||||
Name (intern erzeugt) der Seite, die List der zuletzt hinzugefügten
|
||||
Seiten enthält.
|
||||
Name (intern erzeugt) der Seite, die List der zuletzt hinzugef�gten
|
||||
Seiten enth�lt.
|
||||
EWIKI_PAGE_SEARCH
|
||||
Enthält den WikiSeitenNamen für dei SuchFunktion.
|
||||
Enth�lt den WikiSeitenNamen f�r dei SuchFunktion.
|
||||
|
||||
|
||||
EWIKI_CONTROL_LINE
|
||||
Wenn auf 0 gestzt, wird die Zeile unter einer WikiSeite mit
|
||||
"DieseSeiteÄndern, SeitenInfo, ..." nicht angezeigt.
|
||||
"DieseSeite�ndern, SeitenInfo, ..." nicht angezeigt.
|
||||
In diesem Fall sollte der Edit-Link in yoursite.php erzeugt werden.
|
||||
Besser ist es normalerweise das Aussehen der Ausgabe in
|
||||
ewiki_control_links() selbst zu ändern.
|
||||
ewiki_control_links() selbst zu �ndern.
|
||||
|
||||
EWIKI_AUTO_EDIT
|
||||
Bei 1 (voreinstellung) wird automatisch eine Edit-Box für
|
||||
Bei 1 (voreinstellung) wird automatisch eine Edit-Box f�r
|
||||
nicht-exisiterende Seiten angezeigt, ansonsten wird eine ZwischenSeite
|
||||
("Bitte ändere mich!") angezeigt (wie in PhpWiki).
|
||||
("Bitte �ndere mich!") angezeigt (wie in PhpWiki).
|
||||
|
||||
EWIKI_LIST_LIMIT
|
||||
Maximale Anzahl von Seiten, die in den generierten Listen angezeigt
|
||||
@@ -588,54 +588,54 @@ k
|
||||
|
||||
|
||||
EWIKI_ALLOW_HTML
|
||||
Normalerweise sollte im Wiki keine HTML erlaubt sein - böses JavaScript
|
||||
Normalerweise sollte im Wiki keine HTML erlaubt sein - b�ses JavaScript
|
||||
und <brokenHTML/>, andere Leute nerven.
|
||||
|
||||
Siehe orig. README für mehr Informationen.
|
||||
|
||||
Siehe orig. README f�r mehr Informationen.
|
||||
|
||||
|
||||
EWIKI_RESCUE_HTML
|
||||
Überholt, siehe plugins/markup_rescuehtml.php
|
||||
�berholt, siehe plugins/markup_rescuehtml.php
|
||||
|
||||
|
||||
EWIKI_DB_F_TEXT
|
||||
Dieses Flag wird für normale WikiSeiten in der DB gesetzt.
|
||||
Dieses Flag wird f�r normale WikiSeiten in der DB gesetzt.
|
||||
|
||||
EWIKI_DB_F_BINARY
|
||||
Für binären Inhalt in der DB.
|
||||
|
||||
F�r bin�ren Inhalt in der DB.
|
||||
|
||||
EWIKI_DB_F_DISABLED
|
||||
DB-Eintrage werden hiermit ausgeknippst.
|
||||
|
||||
EWIKI_DB_F_HTML
|
||||
Erlaubt die Verwendung von HTML im WikiQuelltext, unabhängig von
|
||||
Erlaubt die Verwendung von HTML im WikiQuelltext, unabh�ngig von
|
||||
EWIKI_ALLOW_HTML.
|
||||
|
||||
EWIKI_DB_F_READONLY
|
||||
WikiSeite kann nicht verändert werden, so dieses Flag gesetzt ist.
|
||||
WikiSeite kann nicht ver�ndert werden, so dieses Flag gesetzt ist.
|
||||
|
||||
EWIKI_DB_F_WRITEABLE
|
||||
Umkehrung von READONLY, nur nützlich wenn zuvor alle Seiten mit
|
||||
EWIKI_EDIT_AUTHENTICATE schriebgeschützt wurden.
|
||||
Umkehrung von READONLY, nur n�tzlich wenn zuvor alle Seiten mit
|
||||
EWIKI_EDIT_AUTHENTICATE schriebgesch�tzt wurden.
|
||||
|
||||
|
||||
EWIKI_ALLOW_OVERWRITE
|
||||
Für eingeloggte nutzer kann yoursite.php diese Konst. auf 1 setzen, um
|
||||
auch das Ändern von schreibgeschützten Seiten zu erlauben.
|
||||
F�r eingeloggte nutzer kann yoursite.php diese Konst. auf 1 setzen, um
|
||||
auch das �ndern von schreibgesch�tzten Seiten zu erlauben.
|
||||
|
||||
EWIKI_EDIT_AUTHENTICATE
|
||||
Hiermit kann man ewiki dahingehend kaputt machen, daß alle Seiten
|
||||
schreibgeschützt werden, und nur veränderbar sind, so yoursite.php
|
||||
Hiermit kann man ewiki dahingehend kaputt machen, da� alle Seiten
|
||||
schreibgesch�tzt werden, und nur ver�nderbar sind, so yoursite.php
|
||||
$ewiki_author setzt.
|
||||
|
||||
|
||||
EWIKI_SCRIPT_BINARY
|
||||
Um binäre Daten ausgeben zu können, muß hier ein wrapper-script
|
||||
angegeben werden, daß ein Datenbank-Verbindung öffnet und keine
|
||||
Um bin�re Daten ausgeben zu k�nnen, mu� hier ein wrapper-script
|
||||
angegeben werden, da� ein Datenbank-Verbindung �ffnet und keine
|
||||
Textausgaben erzeugt, bevor nicht ewiki.php eingebunden wurde,
|
||||
da sonst nur Datenmüll ausgegeben würde.
|
||||
da sonst nur Datenm�ll ausgegeben w�rde.
|
||||
|
||||
Um alle binary-Funktionalität (Bilder hochladen / cachen) loszuwerden,
|
||||
Um alle binary-Funktionalit�t (Bilder hochladen / cachen) loszuwerden,
|
||||
einfach diese Konstante auf "" setzen, und die folgenden zwei auf 0:
|
||||
|
||||
|
||||
@@ -643,47 +643,47 @@ k
|
||||
Bilder zwischenspeichern.
|
||||
|
||||
EWIKI_IMAGE_MAXSIZE
|
||||
Maximale Größe von Bildern die in der DB abgelegt werden sollen.
|
||||
Maximale Gr��e von Bildern die in der DB abgelegt werden sollen.
|
||||
|
||||
EWIKI_IMAGE_RESIZE
|
||||
Bilder herunterskalieren, wenn zu groß.
|
||||
Bilder herunterskalieren, wenn zu gro�.
|
||||
|
||||
EWIKI_IDF_INTERNAL
|
||||
EWIKI_IDF_INTERNAL
|
||||
Wird verwendet um hochgeladene Bilder zu identifizieren. Bitte
|
||||
im laufenden Betrieb nicht ändern.
|
||||
|
||||
im laufenden Betrieb nicht �ndern.
|
||||
|
||||
|
||||
EWIKI_ADDPARAMDELIM
|
||||
Automatisch definiert, enthält entweder "?" oder "&", abhängig von
|
||||
Automatisch definiert, enth�lt entweder "?" oder "&", abh�ngig von
|
||||
EWIKI_SCRIPT.
|
||||
|
||||
|
||||
EWIKI_T_*
|
||||
überholt, siehe ewiki_t() und $ewiki_t[] in der englischen README
|
||||
�berholt, siehe ewiki_t() und $ewiki_t[] in der englischen README
|
||||
|
||||
|
||||
EWIKI_CHARS_U
|
||||
EWIKI_CHARS_L
|
||||
Erlaubte Zeichen in WikiSeitenNamen (große und kleine Letter). Hiermit
|
||||
Erlaubte Zeichen in WikiSeitenNamen (gro�e und kleine Letter). Hiermit
|
||||
kann man das wiki lokalisieren; deutsche Umlaute sind schon enthalten.
|
||||
|
||||
UNIX_MILLENNIUM
|
||||
Sehr wichtiges Ereignis ;)
|
||||
|
||||
|
||||
Im tools/ Ordner ist ein kleines Script, mit dem man die erwähnten
|
||||
SeitenFlags ändern kann.
|
||||
|
||||
Im tools/ Ordner ist ein kleines Script, mit dem man die erw�hnten
|
||||
SeitenFlags �ndern kann.
|
||||
|
||||
|
||||
|
||||
$ewiki_config[] array
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Einige der EWIKI_ Konstanten wurden durch Einträge im $ewiki_config[] Array
|
||||
ersetzt oder ergänzt (die Konstanten können weiterhin zur Voreinstellung
|
||||
verwendet werden). Der Vorteil dieses Arrays ist, daß die Einstellungen auch
|
||||
zur Laufzeit geändert werden können.
|
||||
���������������������
|
||||
Einige der EWIKI_ Konstanten wurden durch Eintr�ge im $ewiki_config[] Array
|
||||
ersetzt oder erg�nzt (die Konstanten k�nnen weiterhin zur Voreinstellung
|
||||
verwendet werden). Der Vorteil dieses Arrays ist, da� die Einstellungen auch
|
||||
zur Laufzeit ge�ndert werden k�nnen.
|
||||
|
||||
Für eine komplette und (einigermaßen) aktuelle Übersicht bemühe bitte die
|
||||
F�r eine komplette und (einigerma�en) aktuelle �bersicht bem�he bitte die
|
||||
englischsprachige README.
|
||||
|
||||
|
||||
@@ -695,16 +695,16 @@ englischsprachige README.
|
||||
|
||||
|
||||
Nur WikiQuelltextTransformation einsetzen
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Die ewiki_format Funktion war entworfen, um sie auch unabhängig von dem
|
||||
restlichen WikiSkript einsetzen zu können.
|
||||
Benötigt normalerweise nur den "wiki_source" Parmeter und erzeugt die
|
||||
�����������������������������������������
|
||||
Die ewiki_format Funktion war entworfen, um sie auch unabh�ngig von dem
|
||||
restlichen WikiSkript einsetzen zu k�nnen.
|
||||
Ben�tigt normalerweise nur den "wiki_source" Parmeter und erzeugt die
|
||||
HTML-Seite daraus.
|
||||
ewiki_format($wiki_source, 0);
|
||||
|
||||
Alles was man noch anpassen muß ist die $ewiki_links Variable. Setze
|
||||
$ewiki_links=true ("true" und nicht "1") so daß ewiki_format() später
|
||||
annimmt alle WikiSeiten würden existieren.
|
||||
Alles was man noch anpassen mu� ist die $ewiki_links Variable. Setze
|
||||
$ewiki_links=true ("true" und nicht "1") so da� ewiki_format() sp�ter
|
||||
annimmt alle WikiSeiten w�rden existieren.
|
||||
|
||||
Wers eilig hat, kann auch die extrahierte Variante fragments/wiki_format.inc
|
||||
verwenden, die Frank Luithle beigesteuert hat.
|
||||
@@ -718,21 +718,21 @@ verwenden, die Frank Luithle beigesteuert hat.
|
||||
|
||||
|
||||
Ohne MySQL DB verwenden
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Sollte dein Provider keine MySQL Datenbank für dich bereithalten, kannst
|
||||
�����������������������
|
||||
Sollte dein Provider keine MySQL Datenbank f�r dich bereithalten, kannst
|
||||
du das plugin "db_flat_files.php" verwenden (einfach include("plugins/...");
|
||||
aufrufen um es zu laden).
|
||||
|
||||
Alle WikiSeiten werden dann in Textdateien in einem nur dafür
|
||||
Alle WikiSeiten werden dann in Textdateien in einem nur daf�r
|
||||
bereitgestelltem Ordner gespeichert. Stelle hierzu noch die Konstante
|
||||
EWIKI_DBFILES_DIRECTORY in der Datei "ewiki.php" passend ein ("/tmp" würde
|
||||
jedesmal gelöscht, wenn der Server neu startet).
|
||||
Das Verzeichnus muß relativ zum ewiki.php script angegeben werden, oder
|
||||
EWIKI_DBFILES_DIRECTORY in der Datei "ewiki.php" passend ein ("/tmp" w�rde
|
||||
jedesmal gel�scht, wenn der Server neu startet).
|
||||
Das Verzeichnus mu� relativ zum ewiki.php script angegeben werden, oder
|
||||
absolut zum Serverhauptverzeichnis, nicht aber relativ zum DocumentRoot
|
||||
deines Webspeicherplatzes! In diesem Beispiel wäre "./pages" richtig:
|
||||
deines Webspeicherplatzes! In diesem Beispiel w�re "./pages" richtig:
|
||||
|
||||
Erstelle ein neues Verzeichnis (via FTP-Programm) und gib dem Webserver
|
||||
Schreibzugriff dafür mit dem Befehl " chmod 777 ./pages ".
|
||||
Schreibzugriff daf�r mit dem Befehl " chmod 777 ./pages ".
|
||||
ftp> cd .../ewiki
|
||||
ftp> mkdir pages
|
||||
ftp> chmod 777 pages
|
||||
@@ -751,27 +751,27 @@ Mit einem graphischem FTP-Programm gibt es auch immer die Mglk. die
|
||||
|
||||
|
||||
db_fast_files
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
�������������
|
||||
Diese neuere Version von db_flat_files, speichert die WikiSeiten
|
||||
komprimiert in einem Binär-Format (kann man nicht mehr mit Editor
|
||||
ansehen und bearbeiten). Zusätzlich wurde der HitZähler aktiviert.
|
||||
komprimiert in einem Bin�r-Format (kann man nicht mehr mit Editor
|
||||
ansehen und bearbeiten). Zus�tzlich wurde der HitZ�hler aktiviert.
|
||||
|
||||
db_fast_files wurde in db_flat_files integriert, so daß das neue
|
||||
Format jetzt nur noch über eine Konstante aktiviert werden muß
|
||||
(beide Dateiformate können gleichzeitig in der DB vorhanden sein).
|
||||
Für die schnellere Variante aktiviere in "plugins/db_flat_files.php"
|
||||
db_fast_files wurde in db_flat_files integriert, so da� das neue
|
||||
Format jetzt nur noch �ber eine Konstante aktiviert werden mu�
|
||||
(beide Dateiformate k�nnen gleichzeitig in der DB vorhanden sein).
|
||||
F�r die schnellere Variante aktiviere in "plugins/db_flat_files.php"
|
||||
die entsprechende Konstante:
|
||||
define("EWIKI_DB_FAST_FILES", 1);
|
||||
(Diese Einstellung könntest du aber auch schon in der "config.php"
|
||||
(Diese Einstellung k�nntest du aber auch schon in der "config.php"
|
||||
eintragen.)
|
||||
|
||||
Zusätzliche Konstante: EWIKI_DBFILES_GZLEVEL sagt wieviel Zeit
|
||||
Zus�tzliche Konstante: EWIKI_DBFILES_GZLEVEL sagt wieviel Zeit
|
||||
beim Komprimieren verschwendet werden soll:
|
||||
0 - keine Komprimierung
|
||||
1 - ein ganz klein wenig Kompr.
|
||||
2 - Voreinstellung, schnell
|
||||
5 - normaler Wert in zlib, gute Komprimierung
|
||||
9 - langsam für allerbeste Kompression
|
||||
9 - langsam f�r allerbeste Kompression
|
||||
|
||||
Dieses plugin wurde von Carsten Senf beigesteuert.
|
||||
|
||||
@@ -783,18 +783,18 @@ Dieses plugin wurde von Carsten Senf beigesteuert.
|
||||
|
||||
|
||||
|
||||
BöseBäckSläshes
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Wenn auf deinen Seiten pötzlich viele "\" RückwärtsSchrägStriche
|
||||
auftauchen liegt das an einer Fehlkonfiguration von PHP. In älteren
|
||||
B�seB�ckSl�shes
|
||||
���������������
|
||||
Wenn auf deinen Seiten p�tzlich viele "\" R�ckw�rtsSchr�gStriche
|
||||
auftauchen liegt das an einer Fehlkonfiguration von PHP. In �lteren
|
||||
Versionen war leider immer die Option "magic_slashes_gpc" aktiviert
|
||||
(siehe auch php.ini).
|
||||
|
||||
Bitte am besten deinen WebserverProvider das zu ändern. Wenn du aber bei
|
||||
Bitte am besten deinen WebserverProvider das zu �ndern. Wenn du aber bei
|
||||
einem der BilligHoster (umsonst wie sourceforge.net oder tripod.com) bist,
|
||||
gilt wie immer: einem geschenkten Gaul...
|
||||
Dann verwende bitte "fragements/strip_wonderful_slashes.php", um das
|
||||
Problem zumindest zu umschiffen, oder ändere deine .htaccess Datei (Apache)
|
||||
Problem zumindest zu umschiffen, oder �ndere deine .htaccess Datei (Apache)
|
||||
wie darin beschrieben.
|
||||
|
||||
|
||||
@@ -803,16 +803,16 @@ wie darin beschrieben.
|
||||
|
||||
|
||||
|
||||
Paßwörter und tools/
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
Die tools/ sind gefährlich und daher per Voreinstellung nicht ohne weiteres
|
||||
Pa�w�rter und tools/
|
||||
��������������������
|
||||
Die tools/ sind gef�hrlich und daher per Voreinstellung nicht ohne weiteres
|
||||
Nutzbar. In der Datei "tools/t_config.php" wird das Script
|
||||
"fragmenst/funcs/auth.php" geladen, daß für den Browser-Login-Dialog
|
||||
verantwortlich ist. Wenn du also die tools/ verwenden willst, mußt du dort
|
||||
zuerst einen Benutzer mit Paßwort eintragen, sonst geht nix.
|
||||
"fragmenst/funcs/auth.php" geladen, da� f�r den Browser-Login-Dialog
|
||||
verantwortlich ist. Wenn du also die tools/ verwenden willst, mu�t du dort
|
||||
zuerst einen Benutzer mit Pa�wort eintragen, sonst geht nix.
|
||||
|
||||
Um hingegen dein Wiki zu schützen, so daß nur einige wenige Personen die
|
||||
Seiten editieren können, ließ dir bitte die Datei "plugins/auth/README.auth"
|
||||
Um hingegen dein Wiki zu sch�tzen, so da� nur einige wenige Personen die
|
||||
Seiten editieren k�nnen, lie� dir bitte die Datei "plugins/auth/README.auth"
|
||||
durch (leider nur in Englisch). Sie beschreibt den _PROTECTED_MODE und
|
||||
stellt die entsprechenden Plugins vor.
|
||||
|
||||
|
||||
+71
-71
@@ -85,8 +85,8 @@
|
||||
|
||||
#-- allowed WikiPageNameCharacters
|
||||
|
||||
#### BEGIN MOODLE CHANGES - to remove auto-camelcase linking.
|
||||
global $moodle_disable_camel_case;
|
||||
#### BEGIN MOODLE CHANGES - to remove auto-camelcase linking.
|
||||
global $moodle_disable_camel_case;
|
||||
if ($moodle_disable_camel_case) {
|
||||
define("EWIKI_CHARS_L", "");
|
||||
define("EWIKI_CHARS_U", "");
|
||||
@@ -97,10 +97,10 @@
|
||||
define("EWIKI_CHARS_L", "a-z_µ¤$\337-\377");
|
||||
define("EWIKI_CHARS_U", "A-Z0-9\300-\336");
|
||||
|
||||
#### BEGIN MOODLE CHANGES
|
||||
#### BEGIN MOODLE CHANGES
|
||||
}
|
||||
#### END MOODLE CHANGES
|
||||
|
||||
|
||||
define("EWIKI_CHARS", EWIKI_CHARS_L.EWIKI_CHARS_U);
|
||||
|
||||
#-- database
|
||||
@@ -216,7 +216,7 @@
|
||||
(?<![~!])
|
||||
((?:(?:\w+:)*['.EWIKI_CHARS_U.']+['.EWIKI_CHARS_L.']+){2,}[\w\d]*)
|
||||
|\^([-'.EWIKI_CHARS_L.EWIKI_CHARS_U.']{3,})
|
||||
|\[ (?:"[^\]\"]+" | \s+ | [^:\]#]+\|)* ([^\|\"\[\]\#]+) (?:\s+ | "[^\]\"]+")* [\]\#]
|
||||
|\[ (?:"[^\]\"]+" | \s+ | [^:\]#]+\|)* ([^\|\"\[\]\#]+) (?:\s+ | "[^\]\"]+")* [\]\#]
|
||||
|(\w{3,9}:\/\/[^?#\s\[\]\'\"\)\,<]+) /x',
|
||||
|
||||
"wiki_link_regex" => "\007 [!~]?(
|
||||
@@ -382,8 +382,8 @@
|
||||
más adelante si piensa que es necesario.<br />",
|
||||
"EDIT_FORM_2" => "<br />Por favor no escriba cosas, que puedan
|
||||
enfadar a otras personas. Y por favor tenga en mente que
|
||||
usted no es del todo anónimo en Internet
|
||||
(encuentre más sobre
|
||||
usted no es del todo anónimo en Internet
|
||||
(encuentre más sobre
|
||||
'<a href=\"http://google.com/search?q=my+computers+IP+address\">IP address</a>' de su computador con Google).",
|
||||
"BIN_IMGTOOLARGE" => "¡La gráfica es demasiado grande!",
|
||||
"BIN_NOIMG" => "¡No es un archivo con una gráfica (formato de archivo inaceptable)!",
|
||||
@@ -766,7 +766,7 @@ function ewiki_page_view($id, &$data, $action, $all=1) {
|
||||
$o = ewiki_t("THANKSFORCONTRIBUTION") . $o;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (EWIKI_HIT_COUNTING) {
|
||||
ewiki_database("HIT", $data);
|
||||
}
|
||||
@@ -812,7 +812,7 @@ function ewiki_id() {
|
||||
## MOODLE-CHANGE: $asid="", Knows the devil why....
|
||||
function ewiki_script($asid="", $id=false, $params="", $bin=0, $html=1, $script=NULL) {
|
||||
global $ewiki_config, $ewiki_plugins;
|
||||
|
||||
|
||||
#-- get base script url from config vars
|
||||
if (empty($script)) {
|
||||
$script = &$ewiki_config[!$bin?"script":"script_binary"];
|
||||
@@ -880,7 +880,7 @@ function ewiki_script($asid="", $id=false, $params="", $bin=0, $html=1, $script=
|
||||
$url = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/","&", $url);
|
||||
} else {
|
||||
//This is going to be used in some header or meta redirect, so It cannot use & (bug 2620)
|
||||
$url = preg_replace('/&/', '&', $url);
|
||||
$url = preg_replace('/&/', '&', $url);
|
||||
}
|
||||
return($url);
|
||||
}
|
||||
@@ -936,7 +936,7 @@ function ewiki_script_url() {
|
||||
else {
|
||||
return(NULL); #-- could not guess it
|
||||
}
|
||||
|
||||
|
||||
#$url = "http://" . $_SERVER["SERVER_NAME"] . $url;
|
||||
return($url);
|
||||
}
|
||||
@@ -1059,10 +1059,10 @@ function ewiki_page_ordered_list($orderby="created", $asc=0, $print, $title) {
|
||||
if ($asc != 0) { arsort($sorted); }
|
||||
else { asort($sorted); }
|
||||
|
||||
foreach ($sorted as $name => $value) {
|
||||
foreach ($sorted as $name => $value) {
|
||||
if (empty($value)) { $value = "0"; }
|
||||
##### BEGIN MOODLE ADDITION #####
|
||||
#$sorted[$name] = strftime(str_replace('%n', $value, $print), $value);
|
||||
#$sorted[$name] = strftime(str_replace('%n', $value, $print), $value);
|
||||
if($print=="LASTCHANGED") {
|
||||
$value=strftime("%c",$value);
|
||||
}
|
||||
@@ -1070,7 +1070,7 @@ function ewiki_page_ordered_list($orderby="created", $asc=0, $print, $title) {
|
||||
##### BEGIN MOODLE ADDITION #####
|
||||
}
|
||||
$o .= ewiki_list_pages($sorted);
|
||||
|
||||
|
||||
return($o);
|
||||
}
|
||||
|
||||
@@ -1143,7 +1143,7 @@ function ewiki_page_search($id, &$data, $action) {
|
||||
|
||||
$o .= ewiki_list_pages($found);
|
||||
}
|
||||
|
||||
|
||||
return($o);
|
||||
}
|
||||
|
||||
@@ -1162,7 +1162,7 @@ function ewiki_page_info($id, &$data, $action) {
|
||||
$pnum = optional_param(EWIKI_UP_PAGENUM, 0, PARAM_INT);
|
||||
$pend = optional_param(EWIKI_UP_PAGEEND, 0, PARAM_INT);
|
||||
|
||||
$o = ewiki_make_title($id, ewiki_t("INFOABOUTPAGE")." '{$id}'", 2, $action,"", "_MAY_SPLIT=1");
|
||||
$o = ewiki_make_title($id, ewiki_t("INFOABOUTPAGE")." '{$id}'", 2, $action,"", "_MAY_SPLIT=1");
|
||||
|
||||
$flagnames = array(
|
||||
"TEXT", "BIN", "DISABLED", "HTML", "READONLY", "WRITEABLE",
|
||||
@@ -1371,7 +1371,7 @@ function ewiki_page_edit($id, $data, $action) {
|
||||
$version = optional_param('version', '', PARAM_CLEAN);
|
||||
$preview = optional_param('preview', false, PARAM_BOOL);
|
||||
$save = optional_param('save', false, PARAM_BOOL);
|
||||
|
||||
|
||||
$hidden_postdata = array();
|
||||
|
||||
#-- previous version come back
|
||||
@@ -1398,7 +1398,7 @@ function ewiki_page_edit($id, $data, $action) {
|
||||
#-- permission checks
|
||||
if (isset($ewiki_ring)) {
|
||||
$ring = $ewiki_ring;
|
||||
} else {
|
||||
} else {
|
||||
$ring = 3;
|
||||
}
|
||||
$flags = @$data["flags"];
|
||||
@@ -1491,7 +1491,7 @@ function ewiki_page_edit($id, $data, $action) {
|
||||
|
||||
if (EWIKI_EDIT_REDIRECT) {
|
||||
$url = ewiki_script("", $id, "thankyou=1", 0, 0, EWIKI_HTTP_HEADERS?ewiki_script_url():0);
|
||||
|
||||
|
||||
if (EWIKI_HTTP_HEADERS && !headers_sent()) {
|
||||
header("Status: 303 Redirect for GET");
|
||||
header("Location: $url");
|
||||
@@ -1542,13 +1542,13 @@ function ewiki_data_update(&$data, $author="") {
|
||||
|
||||
#-- edit <textarea>
|
||||
function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
|
||||
global $ewiki_plugins, $ewiki_config, $moodle_format;
|
||||
global $ewiki_plugins, $ewiki_config, $moodle_format;
|
||||
|
||||
$content = optional_param('content', '', PARAM_CLEAN);
|
||||
$version = optional_param('version', '', PARAM_CLEAN);
|
||||
|
||||
$o='';
|
||||
|
||||
|
||||
#-- previously edited, or db fetched content
|
||||
if ($content || $version) {
|
||||
$data = array(
|
||||
@@ -1600,8 +1600,8 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
|
||||
print_textarea($usehtmleditor, $rows, $cols, 680, 400, "content", $oldtext);
|
||||
echo '</td></tr></table>';
|
||||
|
||||
$o .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
$o .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
} else {
|
||||
##### END MOODLE ADDITION #####
|
||||
@@ -1613,7 +1613,7 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
|
||||
##### BEGIN MOODLE ADDITION #####
|
||||
}
|
||||
##### END MOODLE ADDITION #####
|
||||
|
||||
|
||||
#-- more <input> elements before the submit button
|
||||
if ($pf_a = $ewiki_plugins["edit_form_insert"]) foreach ($pf_a as $pf) {
|
||||
$o .= $pf($id, $data, $action);
|
||||
@@ -1660,8 +1660,8 @@ function ewiki_page_edit_form_final_imgupload(&$o, &$id, &$data, &$action) {
|
||||
|
||||
|
||||
function ewiki_page_edit_preview(&$data) {
|
||||
#### BEGIN MOODLE CHANGES
|
||||
global $moodle_format;
|
||||
#### BEGIN MOODLE CHANGES
|
||||
global $moodle_format;
|
||||
$preview_text=$GLOBALS["ewiki_plugins"]["render"][0](optional_param("content", null, PARAM_CLEAN), 1, EWIKI_ALLOW_HTML || (@$data["flags"]&EWIKI_DB_F_HTML));
|
||||
return( '<div class="preview">'
|
||||
. "<hr noshade>"
|
||||
@@ -1670,7 +1670,7 @@ function ewiki_page_edit_preview(&$data) {
|
||||
. "<br /><br /><hr noshade><br />"
|
||||
. "</div>"
|
||||
);
|
||||
#### END MOODLE CHANGES
|
||||
#### END MOODLE CHANGES
|
||||
}
|
||||
|
||||
|
||||
@@ -1709,7 +1709,7 @@ function ewiki_control_links($id, &$data, $action) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($data["lastmodified"] >= UNIX_MILLENNIUM) {
|
||||
if ($data["lastmodified"] >= UNIX_MILLENNIUM) {
|
||||
$o .= '<small>' . strftime(ewiki_t("LASTCHANGED"), @$data["lastmodified"]) . '</small>';
|
||||
}
|
||||
|
||||
@@ -1766,7 +1766,7 @@ function ewiki_format (
|
||||
"close" => array(),
|
||||
);
|
||||
#-- aliases
|
||||
$in = &$s["in"];
|
||||
$in = &$s["in"];
|
||||
$line = &$s["line"];
|
||||
$lines = &$s["lines"];
|
||||
$para = &$s["para"];
|
||||
@@ -1774,7 +1774,7 @@ function ewiki_format (
|
||||
$list = &$s["list"];
|
||||
|
||||
#-- input and output arrays
|
||||
if ($wiki_source[0] == "<") { # also prepend an empty line
|
||||
if ($wiki_source[0] == "<") { # also prepend an empty line
|
||||
$wiki_source = "\n" . $wiki_source; # for faster strpos() searchs
|
||||
}
|
||||
$iii = array(
|
||||
@@ -1861,7 +1861,7 @@ function ewiki_format (
|
||||
while ((++$in) < count($iii)) {
|
||||
if (($btype = $iii[$in][2]) && ($pf_a = $ewiki_plugins["format_block"][$btype])) {
|
||||
$c = &$iii[$in][0];
|
||||
foreach ($pf_a as $pf) {
|
||||
foreach ($pf_a as $pf) {
|
||||
# current buffer $c and pointer $in into $iii[] and state $s
|
||||
$pf($c, $in, $iii, $s, $btype);
|
||||
}
|
||||
@@ -1870,7 +1870,7 @@ function ewiki_format (
|
||||
|
||||
#-- wiki markup ------------------------------------------------------
|
||||
$para = "";
|
||||
$in = -1;
|
||||
$in = -1;
|
||||
while ((++$in) < count($iii)) {
|
||||
#-- wikimarkup
|
||||
if ($iii[$in][1] & 0x0001) {
|
||||
@@ -1920,13 +1920,13 @@ function ewiki_format (
|
||||
$s["list"] = "";
|
||||
}
|
||||
$line = substr($line, 1, -1);
|
||||
if ($pf_tbl) {
|
||||
if ($pf_tbl) {
|
||||
$pf_tbl($line, $ooo, $s);
|
||||
}
|
||||
else {
|
||||
if (!$s["tbl"]) {
|
||||
if (!$s["tbl"]) {
|
||||
$out .= "<table " . $wm_table_defaults . ">\n";
|
||||
$s["close"][] = "\n</table>";
|
||||
$s["close"][] = "\n</table>";
|
||||
}
|
||||
$line = "<tr>\n<td>" . str_replace("|", "</td>\n<td>", $line) . "</td>\n</tr>";
|
||||
}
|
||||
@@ -1940,7 +1940,7 @@ function ewiki_format (
|
||||
|
||||
#-- headlines
|
||||
if (($c0 == "!") && ($excl = strspn($line, "!"))) {
|
||||
if ($excl > 3) {
|
||||
if ($excl > 3) {
|
||||
$excl = 3;
|
||||
}
|
||||
$line = substr($line, $excl);
|
||||
@@ -1961,12 +1961,12 @@ function ewiki_format (
|
||||
$n_indent = 0;
|
||||
if (!$list && (!$s["block"]) && ($n_indent = strspn($line, " "))) {
|
||||
$n_indent = (int) ($n_indent / 2.65);
|
||||
while ($n_indent > $s["indent"]) {
|
||||
while ($n_indent > $s["indent"]) {
|
||||
$out .= $wm_indent;
|
||||
$s["indent"]++;
|
||||
}
|
||||
}
|
||||
while ($n_indent < $s["indent"]) {
|
||||
while ($n_indent < $s["indent"]) {
|
||||
$out .= "";
|
||||
$s["indent"]--;
|
||||
}
|
||||
@@ -2018,7 +2018,7 @@ function ewiki_format (
|
||||
list($lopen, $ltag1, $ltag2) = $wm_list[$lchar];
|
||||
$lclose = strtok($lopen, " ");
|
||||
$lspace = str_repeat(" ", $new_len);
|
||||
|
||||
|
||||
$out .= "\n$lspace<$lopen>\n" . "$lspace". $linsert . "<$ltag2>";
|
||||
$s["close"][] = "$lspace</$lclose>";
|
||||
$s["close"][] = "$lspace</$ltag2>";
|
||||
@@ -2129,7 +2129,7 @@ function ewiki_format (
|
||||
if ($ooo[$in][1] & 0x0002) {
|
||||
##### BEGIN MOODLE ADDITION #####
|
||||
# No WikiLinks in Editor
|
||||
#################################
|
||||
#################################
|
||||
global $ewiki_use_editor, $ewiki_editor_content;
|
||||
if(!($ewiki_use_editor && $ewiki_editor_content)) {
|
||||
##### END MOODLE ADDITION #####
|
||||
@@ -2186,7 +2186,7 @@ function ewiki_format_close_para(&$ooo, &$s) {
|
||||
|
||||
function ewiki_format_close_tags(&$ooo, &$s, $count=100) {
|
||||
$out = &$ooo[$s["in"]][0];
|
||||
if (!is_array($s) || !is_array($s["close"])) {
|
||||
if (!is_array($s) || !is_array($s["close"])) {
|
||||
die("\$s is garbaged == $s!!");
|
||||
}
|
||||
while (($count--) && ($add = array_pop($s["close"]))) {
|
||||
@@ -2203,7 +2203,7 @@ function ewiki_format_pre(&$str, &$in, &$iii, &$s, $btype) {
|
||||
function ewiki_format_html(&$str, &$in, &$iii, &$s) {
|
||||
$he = array_reverse($GLOBALS["ewiki_config"]["htmlentities"]);
|
||||
$str = strtr($str, array_flip($he));
|
||||
$str = "<span class=\"markup html\">" . $str . "\n</span>\n";
|
||||
$str = "<span class=\"markup html\">" . $str . "\n</span>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -2272,7 +2272,7 @@ function ewiki_render_wiki_links(&$o) {
|
||||
*/
|
||||
function ewiki_merge_links(&$ewiki_links) {
|
||||
global $ewiki_plugins;
|
||||
#### BEGIN MOODLE CHANGES
|
||||
#### BEGIN MOODLE CHANGES
|
||||
global $ewiki_link_case;
|
||||
$ewiki_link_case=array();
|
||||
#### END MOODLE CHANGES
|
||||
@@ -2280,11 +2280,11 @@ function ewiki_merge_links(&$ewiki_links) {
|
||||
foreach ($ewiki_plugins["page"] as $page=>$uu) {
|
||||
$ewiki_links[$page] = 1;
|
||||
}
|
||||
#### BEGIN MOODLE CHANGES
|
||||
#### BEGIN MOODLE CHANGES
|
||||
foreach($ewiki_links as $page => $uu) {
|
||||
if($uu) {
|
||||
$ewiki_link_case[strtolower($page)]=$page;
|
||||
}
|
||||
$ewiki_link_case[strtolower($page)]=$page;
|
||||
}
|
||||
}
|
||||
#### END MOODLE CHANGES
|
||||
$ewiki_links = ewiki_array($ewiki_links);
|
||||
@@ -2348,7 +2348,7 @@ function ewiki_link_regex_callback($uu, $force_noimg=0) {
|
||||
$href = str_replace($f, $t, $href);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-- anchors
|
||||
$href2 = "";
|
||||
if (($p = strrpos($href, "#")) && ($p) && ($href[$p-1] != "&")) {
|
||||
@@ -2394,9 +2394,9 @@ function ewiki_link_regex_callback($uu, $force_noimg=0) {
|
||||
#-- ordinary internal WikiLinks
|
||||
elseif (($ewiki_links === true) || @$ewiki_links[$href_i]) {
|
||||
$type = array("wikipage");
|
||||
#### BEGIN MOODLE CHANGES
|
||||
#### BEGIN MOODLE CHANGES
|
||||
global $ewiki_link_case;
|
||||
$href_realcase=array_key_exists($href_i,$ewiki_link_case) ? $ewiki_link_case[$href_i] : $href;
|
||||
$href_realcase=array_key_exists($href_i,$ewiki_link_case) ? $ewiki_link_case[$href_i] : $href;
|
||||
$str = '<a href="' . ewiki_script("", $href_realcase) . s($href2)
|
||||
. '">' . $title . '</a>';
|
||||
#### END MOODLE CHANGES
|
||||
@@ -2426,7 +2426,7 @@ function ewiki_link_regex_callback($uu, $force_noimg=0) {
|
||||
}
|
||||
|
||||
#-- convert standard URLs
|
||||
foreach ($ewiki_config["idf"]["url"] as $find)
|
||||
foreach ($ewiki_config["idf"]["url"] as $find)
|
||||
if (strpos($href, $find)===0) {
|
||||
$type[-2] = "url";
|
||||
$type[-1] = strtok($find, ":");
|
||||
@@ -2527,7 +2527,7 @@ function ewiki_interwiki($href, &$type) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
implements FeatureWiki:InterMapWalking
|
||||
*/
|
||||
function ewiki_intermap_walking($id, &$data, $action) {
|
||||
@@ -2579,23 +2579,23 @@ function ewiki_binary($break=0) {
|
||||
}
|
||||
|
||||
#-- what are we doing here?
|
||||
if (($id == EWIKI_IDF_INTERNAL) && ($upload_file)) {
|
||||
if (($id == EWIKI_IDF_INTERNAL) && ($upload_file)) {
|
||||
$do = "upload";
|
||||
}
|
||||
else {
|
||||
$data = ewiki_database("GET", array("id" => $id));
|
||||
$flags = @$data["flags"];
|
||||
if (EWIKI_DB_F_BINARY == ($flags & EWIKI_DB_F_TYPE)) {
|
||||
if (EWIKI_DB_F_BINARY == ($flags & EWIKI_DB_F_TYPE)) {
|
||||
$do = "get";
|
||||
}
|
||||
elseif (empty($data["version"]) and EWIKI_CACHE_IMAGES) {
|
||||
$do = "cache";
|
||||
}
|
||||
else {
|
||||
else {
|
||||
$do = "nop";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-- auth only happens when enforced with _PROTECTED_MODE_XXL setting
|
||||
# (authentication for inline images in violation of the WWW spirit)
|
||||
if ((EWIKI_PROTECTED_MODE>=5) && !ewiki_auth($id, $data, "binary-{$do}")) {
|
||||
@@ -2624,12 +2624,12 @@ EOF;
|
||||
|
||||
#-- request for contents from the db
|
||||
elseif ($do == "get") {
|
||||
#### CHANGED FOR MOODLE
|
||||
#### CHANGED FOR MOODLE
|
||||
if (EWIKI_HIT_COUNTING) {
|
||||
$tmp["id"]=$id;
|
||||
ewiki_database("HIT", $tmp);
|
||||
}
|
||||
#### CHANGED FOR MOODLE
|
||||
#### CHANGED FOR MOODLE
|
||||
|
||||
#-- send http_headers from meta
|
||||
if (is_array($data["meta"])) {
|
||||
@@ -2642,10 +2642,10 @@ EOF;
|
||||
|
||||
#-- fetch from binary store
|
||||
if ($pf_a = $ewiki_plugins["binary_get"]) {
|
||||
#### CHANGED FOR MOODLE
|
||||
#### CHANGED FOR MOODLE
|
||||
foreach ($pf_a as $pf) { $pf($id, $data["meta"]); }
|
||||
|
||||
#### END CHANGED FOR MOODLE
|
||||
#### END CHANGED FOR MOODLE
|
||||
}
|
||||
|
||||
#-- else fpassthru
|
||||
@@ -2677,7 +2677,7 @@ EOF;
|
||||
|
||||
$result = ewiki_binary_save_image($filename, $id, "RETURN", $add_meta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-- deliver
|
||||
if ($result && !$break) {
|
||||
@@ -2687,7 +2687,7 @@ EOF;
|
||||
else {
|
||||
$data = array(
|
||||
"id" => $id,
|
||||
"version" => 1,
|
||||
"version" => 1,
|
||||
"flags" => EWIKI_DB_F_DISABLED,
|
||||
"lastmodified" => time(),
|
||||
"created" => time(),
|
||||
@@ -2700,7 +2700,7 @@ EOF;
|
||||
header("Location: $id");
|
||||
ewiki_log("imgcache: did not find '$id', and marked it now in database as DISABLED", 2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#-- "we don't sell this!"
|
||||
@@ -2829,7 +2829,7 @@ $add_meta=array(), $accept_all=EWIKI_ACCEPT_BINARY, $care_for_images=1)
|
||||
#-- database entry
|
||||
$data = array(
|
||||
"id" => $id,
|
||||
"version" => "1",
|
||||
"version" => "1",
|
||||
"author" => ewiki_author(),
|
||||
"userid" => $USER->id,
|
||||
"flags" => EWIKI_DB_F_BINARY | EWIKI_DB_F_READONLY,
|
||||
@@ -2838,7 +2838,7 @@ $add_meta=array(), $accept_all=EWIKI_ACCEPT_BINARY, $care_for_images=1)
|
||||
"meta" => &$meta,
|
||||
"content" => &$content,
|
||||
);
|
||||
|
||||
|
||||
#-- write if not exist
|
||||
$exists = ewiki_database("FIND", array($id));
|
||||
if (! $exists[$id] ) {
|
||||
@@ -2912,11 +2912,11 @@ function ewiki_t($const, $repl=array(), $pref_langs=array()) {
|
||||
"_" => "",
|
||||
" " => "",
|
||||
"+" => "");
|
||||
|
||||
|
||||
$translation=get_string(strtolower(strtr($const,$replacechars)),"wiki",$repl);
|
||||
return $translation;
|
||||
##### END MOODLE ADDITION #####
|
||||
|
||||
|
||||
/* global $ewiki_t;
|
||||
|
||||
#-- use default language wishes
|
||||
@@ -3096,7 +3096,7 @@ function ewiki_auth($id, &$data, $action, $ring=false, $request_auth=0) {
|
||||
#echo "_a($id,dat,$action,$ring,$request_auth)<br />\n";
|
||||
|
||||
if (EWIKI_PROTECTED_MODE) {
|
||||
|
||||
|
||||
#-- set required vars
|
||||
if (!isset($ewiki_ring)) {
|
||||
$ewiki_ring = (int)EWIKI_AUTH_DEFAULT_RING;
|
||||
@@ -3177,7 +3177,7 @@ function ewiki_auth_user($username, $password) {
|
||||
|
||||
#-- return if it matches
|
||||
if ($success) {
|
||||
if (isset($entry[1])) {
|
||||
if (isset($entry[1])) {
|
||||
$ewiki_ring = (int)($entry[1]);
|
||||
} else {
|
||||
$ewiki_ring = 2; //(EWIKI_AUTH_DEFAULT_RING - 1);
|
||||
@@ -3289,7 +3289,7 @@ function ewiki_eventually_initialize(&$id, &$data, &$action) {
|
||||
function ewiki_database($action, $args, $sw1=0, $sw2=0, $pf=false) {
|
||||
|
||||
#-- normalize (fetch bad parameters)
|
||||
if (($action=="GET") && !is_array($args) && is_string($args)) {
|
||||
if (($action=="GET") && !is_array($args) && is_string($args)) {
|
||||
$args = array("id" => $args);
|
||||
}
|
||||
|
||||
@@ -3395,13 +3395,13 @@ class ewiki_dbquery_result {
|
||||
foreach ($this->keys as $key) {
|
||||
$row[$key] = $r[$key];
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
$row = $r;
|
||||
}
|
||||
}
|
||||
unset($r);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
return(NULL); // no more entries
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
# http user space authentication layer
|
||||
# ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
# ������������������������������������
|
||||
# can be used with the tools/, if you don't want to
|
||||
# set up the .htaccess and .htpasswd files
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#-- check password
|
||||
$_success = false;
|
||||
if (strlen($_a_u) && strlen($_a_p) && ($_a_p == @$passwords[$_a_u])) {
|
||||
$_success = $_a_u;
|
||||
$_success = $_a_u;
|
||||
}
|
||||
|
||||
#-- request HTTP Basic authentication otherwise
|
||||
@@ -39,4 +39,3 @@
|
||||
die();
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -19,4 +19,3 @@
|
||||
|
||||
include("ewiki.php");
|
||||
|
||||
?>
|
||||
@@ -27,7 +27,7 @@
|
||||
td.caltoday{
|
||||
background-color:#D7CFC7;
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 8pt;
|
||||
font-size: 8pt;
|
||||
text-align:right;
|
||||
}
|
||||
a.calpg{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# It uses the mod_rewrite to look a bit more professionall than
|
||||
# the usual GET-vars at the end of our URLs. This is highly
|
||||
# recommended as things like "script.php?edit=1&id=page" usually
|
||||
# recommended as things like "script.php?edit=1&id=page" usually
|
||||
# scare search engines and may prevent your Wiki from getting
|
||||
# indexed.
|
||||
#
|
||||
|
||||
@@ -26,7 +26,7 @@ fi
|
||||
|
||||
|
||||
#-- choose size
|
||||
N=$1
|
||||
N=$1
|
||||
if [ -z "$N" ] ; then
|
||||
N=0
|
||||
fi
|
||||
|
||||
@@ -55,4 +55,4 @@ CloseTable(); # strange function names ;)
|
||||
include("footer.php");
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#-- the wiki module itself to add them before
|
||||
#-- insert. Strange triple add-strip-add but
|
||||
#-- this was the best way to solve problems
|
||||
#-- without changing how the rest of the
|
||||
#-- without changing how the rest of the
|
||||
#-- module works.
|
||||
|
||||
$superglobals = array(
|
||||
@@ -49,4 +49,4 @@
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
* Wiki-Engine from "ErfurtWiki", Mario Salzer <[email protected]>
|
||||
* Adapted by Frank Luithle <[email protected]>
|
||||
*
|
||||
@@ -288,4 +288,4 @@ function wiki_link_regex_callback( $uu ) {
|
||||
return($str);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -10,13 +10,12 @@ $ewiki_plugins["view_append"][] = "ewiki_view_append_backlinks";
|
||||
|
||||
function ewiki_view_append_backlinks($id, $data, $action) {
|
||||
$pages = ewiki_get_backlinks($id);
|
||||
|
||||
|
||||
$o="";
|
||||
foreach ($pages as $id) {
|
||||
$o .= ' <a href="'.ewiki_script("",$id).'">'.$id.'</a>';
|
||||
}
|
||||
($o) && ($o = "<div class=\"wiki_backlinks\"><small>".get_string('backlinks', 'wiki').":</small><br />$o</div>\n");
|
||||
|
||||
|
||||
return($o);
|
||||
}
|
||||
?>
|
||||
@@ -13,7 +13,7 @@ if (!defined("EWIKI_AUTOVIEW") || !EWIKI_AUTOVIEW) {
|
||||
|
||||
|
||||
$ewiki_t["en"]["ATTACHMENTS"] = "attachments";
|
||||
$ewiki_t["de"]["ATTACHMENTS"] = "Anhänge";
|
||||
$ewiki_t["de"]["ATTACHMENTS"] = "Anh�nge";
|
||||
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@ function ewiki_view_append_attachments($id, $data, $action) {
|
||||
// }
|
||||
// arsort($ord);
|
||||
//
|
||||
// foreach ($ord as $id => $uu) {
|
||||
// foreach ($ord as $id => $uu) {
|
||||
// $row = ewiki_database("GET", array("id"=>$id));
|
||||
// if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $row, "view")) {
|
||||
// continue;
|
||||
// }
|
||||
// $o .= ewiki_entry_downloads($row, "*");
|
||||
// }
|
||||
// $o .= ewiki_entry_downloads($row, "*");
|
||||
// }
|
||||
#### END MOODLE CHANGES
|
||||
|
||||
@@ -58,4 +58,4 @@ function ewiki_attachments() {
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#
|
||||
# Additionally it generates faked/trap email addresses to annoy the
|
||||
# marketing mafia.
|
||||
|
||||
|
||||
|
||||
#-- change these from time to time:
|
||||
define("EWIKI_PAGE_EMAIL", "ProtectedEmail");
|
||||
@@ -188,7 +188,7 @@
|
||||
case -1: // decode
|
||||
$string = base64_decode($string);
|
||||
$string = str_rot17($string);
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2: // url
|
||||
$string = ewiki_script("", EWIKI_PAGE_EMAIL,
|
||||
@@ -236,7 +236,7 @@
|
||||
global $ewiki_config;
|
||||
|
||||
$ewiki_up_requestlv = optional_param(EWIKI_UP_REQUESTLV, 0, PARAM_CLEAN);
|
||||
|
||||
|
||||
$html = "";
|
||||
srand(time()/17-1000*microtime());
|
||||
|
||||
@@ -310,4 +310,4 @@
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ function ewiki_binary_resize_image_gd(&$filename, &$mime, $return=0) {
|
||||
/*** this disallows Win32 ***/
|
||||
if ( (DIRECTORY_SEPARATOR!="/") && !EWIKI_IMAGERESIZE_WIN
|
||||
|| (strpos($mime, "image/")!==0) )
|
||||
{
|
||||
{
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -119,4 +119,3 @@ function ewiki_binary_resize_image_gd(&$filename, &$mime, $return=0) {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
You need this plugin to run only once (when you first run the Wiki),
|
||||
afterwards you can and should comment out the include() directive which
|
||||
enabled it.
|
||||
enabled it.
|
||||
*/
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ function ewiki_initialization_wizard($id, &$data, &$action) {
|
||||
$o .= '<tr><td>WikiSoftware</td><td>ewiki '.EWIKI_VERSION."</td></tr>";
|
||||
$o .= "</table>";
|
||||
|
||||
#-- more diagnosis
|
||||
#-- more diagnosis
|
||||
if (ini_get("magic_quotes")) {
|
||||
$o.= "<b>Warning</b>: Your PHP interpreter has enabled the ugly and outdated '<i>magic_quotes</i>'. This will lead to problems, so please ask your provider to correct it; or fix it yourself with .htaccess settings as documented in the README. Otherwise don't forget to include() the <tt>fragments/strip_wonderful_slashes.php</tt> (it's ok to proceed for the moment).<br /><br />";
|
||||
}
|
||||
@@ -122,4 +122,4 @@ function ewiki_initialization_wizard($id, &$data, &$action) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
that cannot detect this themselfes).
|
||||
*/
|
||||
|
||||
#-- config
|
||||
#-- config
|
||||
define("EWIKI_JUMP_HTTP", 1); #-- issue a HTTP redirect, or jump in place
|
||||
define("EWIKI_UP_REDIRECT_COUNT", "redir");
|
||||
|
||||
#-- text
|
||||
$ewiki_t["en"]["REDIRECTION_LOOP"] = "<h2>Redirection loop detected<h2>\nOperation stopped, because we're traped in an infinite redirection loop with page \$id.";
|
||||
|
||||
#-- plugin glue
|
||||
#-- plugin glue
|
||||
$ewiki_plugins["handler"][] = "ewiki_handler_jump";
|
||||
$ewiki_config["interwiki"]["jump"] = "";
|
||||
$ewiki_config["interwiki"]["goto"] = "";
|
||||
@@ -35,7 +35,7 @@ function ewiki_handler_jump(&$id, &$data, &$action) {
|
||||
|
||||
global $ewiki_config;
|
||||
static $redirect_count = 5;
|
||||
|
||||
|
||||
$redirect_count = optional_param("EWIKI_UP_REDIRECT_COUNT", $redirect_count, PARAM_INT);
|
||||
|
||||
$jump_markup = array("jump", "goto", "redirect", "location");
|
||||
@@ -98,4 +98,3 @@ function ewiki_handler_jump(&$id, &$data, &$action) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -89,12 +89,12 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "TADS", "application/x-tads-game"),
|
||||
array(0, 2, 0, "\x01\x10", "application/x-executable-file"),
|
||||
array(0, 2, 0, "\x01\x11", "application/x-executable-file"),
|
||||
array(0, 2, 0, "\x01ƒ", "application/x-executable-file"),
|
||||
array(0, 2, 0, "\x01�", "application/x-executable-file"),
|
||||
array(0, 5, 0, "Core\001", "application/x-executable-file"),
|
||||
array(0, 22, 0, "AMANDA: TAPESTART DATE", "application/x-amanda-header"),
|
||||
array(0, 2, 0xfff0, 0xf0ff, "audio/mpeg"),
|
||||
array(4, 2, 0, "¯\x11", "video/fli"),
|
||||
array(4, 2, 0, "¯\x12", "video/flc"),
|
||||
array(4, 2, 0, "�\x11", "video/fli"),
|
||||
array(4, 2, 0, "�\x12", "video/flc"),
|
||||
array(0, 4, 0, "MOVI", "video/x-sgi-movie"),
|
||||
array(4, 4, 0, "moov", "video/quicktime"),
|
||||
array(4, 4, 0, "mdat", "video/quicktime"),
|
||||
@@ -107,13 +107,13 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "\x07\x16\x05\x00", "application/data"),
|
||||
array(257, 6, 0, "ustar\0", "application/x-tar"),
|
||||
array(257, 8, 0, "ustar\040\040\0", "application/x-gtar"),
|
||||
array(0, 2, 0, "qÇ", "application/x-cpio"),
|
||||
array(0, 2, 0, "Çq", "application/x-bcpio"),
|
||||
array(0, 2, 0, "q�", "application/x-cpio"),
|
||||
array(0, 2, 0, "�q", "application/x-bcpio"),
|
||||
array(0, 6, 0, "070707", "application/x-cpio"),
|
||||
array(0, 6, 0, "070701", "application/x-cpio"),
|
||||
array(0, 6, 0, "070702", "application/x-cpio"),
|
||||
array(0, 2, 0, "ÿm", "application/data"),
|
||||
array(0, 2, 0, "ÿe", "application/data"),
|
||||
array(0, 2, 0, "�m", "application/data"),
|
||||
array(0, 2, 0, "�e", "application/data"),
|
||||
array(0, 5, 0, "=<ar>", "application/x-ar"),
|
||||
array(0, 19, 0, "!<arch>\n__________E", "application/x-ar"),
|
||||
array(0, 3, 0, "-h-", "application/data"),
|
||||
@@ -121,8 +121,8 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "<ar>", "application/x-ar"),
|
||||
array(0, 4, 0, ">ra<", "application/x-ar"),
|
||||
array(0, 4, 0, "!<ar", "application/x-ar"),
|
||||
array(0, 4, 0, "\x00\x03ݒ", "application/data"),
|
||||
array(0, 4, 0, "\x00\x03ݔ", "application/data"),
|
||||
array(0, 4, 0, "\x00\x03��", "application/data"),
|
||||
array(0, 4, 0, "\x00\x03��", "application/data"),
|
||||
array(0, 4, 0x8080ffff, 0x81a, "application/x-arc"),
|
||||
array(0, 4, 0x8080ffff, 0x91a, "application/x-arc"),
|
||||
array(0, 4, 0x8080ffff, 0x21a, "application/x-arc"),
|
||||
@@ -130,7 +130,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0x8080ffff, 0x41a, "application/x-arc"),
|
||||
array(0, 4, 0x8080ffff, 0x61a, "application/x-arc"),
|
||||
array(0, 8, 0, "\032archive", "application/data"),
|
||||
array(0, 2, 0, "ê`", "application/x-arj"),
|
||||
array(0, 2, 0, "�`", "application/x-arj"),
|
||||
array(0, 4, 0, "HPAK", "application/data"),
|
||||
array(0, 8, 0, "\351,\001JAM\ ", "application/data"),
|
||||
array(2, 5, 0, "-lh0-", "application/x-lha"),
|
||||
@@ -148,7 +148,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "SQSH", "application/data"),
|
||||
array(0, 4, 0, "UC2\x1a", "application/data"),
|
||||
array(0, 4, 0, "PK\003\004", "application/zip"),
|
||||
array(20, 4, 0, "ýħÜ", "application/x-zoo"),
|
||||
array(20, 4, 0, "�ħ�", "application/x-zoo"),
|
||||
array(10, 25, 0, "# This is a shell archive", "application/x-shar"),
|
||||
array(0, 4, 0, "*STA", "application/data"),
|
||||
array(0, 4, 0, "2278", "application/data"),
|
||||
@@ -164,7 +164,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "KRTN", "audio/x-multitrack"),
|
||||
array(0, 4, 0, "RIFF", "audio/x-wav"),
|
||||
array(0, 4, 0, "EMOD", "audio/x-emod"),
|
||||
array(0, 4, 0, "ýar.", "audio/x-pn-realaudio"),
|
||||
array(0, 4, 0, "�ar.", "audio/x-pn-realaudio"),
|
||||
array(0, 3, 0, "MTM", "audio/x-multitrack"),
|
||||
array(0, 2, 0, "if", "audio/x-669-mod"),
|
||||
array(0, 3, 0, "FAR", "audio/mod"),
|
||||
@@ -274,13 +274,13 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 2, 0, "\037\213", "application/x-gzip"),
|
||||
array(0, 2, 0, "\037\036", "application/data"),
|
||||
array(0, 2, 0, "\x1f\x1f", "application/data"),
|
||||
array(0, 2, 0, "\x1fÿ", "application/data"),
|
||||
array(0, 2, 0, "\x1f�", "application/data"),
|
||||
array(0, 2, 0, "\377\037", "application/data"),
|
||||
array(0, 2, 0, "Ë\x05", "application/data"),
|
||||
array(0, 2, 0, "�\x05", "application/data"),
|
||||
array(0, 3, 0, "BZh", "application/x-bzip2"),
|
||||
array(0, 2, 0, "ÿv", "application/data"),
|
||||
array(0, 2, 0, "þv", "application/data"),
|
||||
array(0, 2, 0, "ýv", "application/x-lzh"),
|
||||
array(0, 2, 0, "�v", "application/data"),
|
||||
array(0, 2, 0, "�v", "application/data"),
|
||||
array(0, 2, 0, "�v", "application/x-lzh"),
|
||||
array(0, 2, 0, "\037\237", "application/data"),
|
||||
array(0, 2, 0, "\037\236", "application/data"),
|
||||
array(0, 2, 0, "\037\240", "application/data"),
|
||||
@@ -288,7 +288,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 9, 0, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", "application/data"),
|
||||
array(0, 4, 0, "W\x12\x01\x00", "application/core"),
|
||||
array(0, 4, 0, "ΚW\x13", "application/x-gdbm"),
|
||||
array(0, 4, 0, "\x13WšÎ", "application/x-gdbm"),
|
||||
array(0, 4, 0, "\x13W��", "application/x-gdbm"),
|
||||
array(0, 4, 0, "GDBM", "application/x-gdbm"),
|
||||
array(0, 4, 0, "a\x15\x06\x00", "application/x-db"),
|
||||
array(0, 4, 0, "b1\x05\x00", "application/x-db"),
|
||||
@@ -298,8 +298,8 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 8, 0, "Only in ", "text/x-patch"),
|
||||
array(0, 23, 0, "Common subdirectories: ", "text/x-patch"),
|
||||
array(0, 19, 0, "!<arch>\n________64E", "application/data"),
|
||||
array(0, 2, 0, "\x01ˆ", "application/x-executable-file"),
|
||||
array(0, 2, 0, "\x01�", "application/x-object-file"),
|
||||
array(0, 2, 0, "\x01�", "application/x-executable-file"),
|
||||
array(0, 2, 0, "\x01�", "application/x-object-file"),
|
||||
array(0, 3, 0, "\377\377\177", "application/data"),
|
||||
array(0, 3, 0, "\377\377\174", "application/data"),
|
||||
array(0, 3, 0, "\377\377\176", "application/data"),
|
||||
@@ -310,12 +310,12 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "\177ELF", "application/x-executable-file"),
|
||||
array(0, 2, 0, "\x01T", "application/data"),
|
||||
array(0, 2, 0, "\x01U", "application/x-executable-file"),
|
||||
array(0x438, 2, 0, "ïS", "application/x-linux-ext2fs"),
|
||||
array(0x438, 2, 0, "�S", "application/x-linux-ext2fs"),
|
||||
array(0, 4, 0, "\366\366\366\366", "application/x-pc-floppy"),
|
||||
array(0774, 2, 0, "¾Ú", "application/data"),
|
||||
array(0x1FE, 2, 0, "ªU", "application/data"),
|
||||
array(0774, 2, 0, "��", "application/data"),
|
||||
array(0x1FE, 2, 0, "�U", "application/data"),
|
||||
array(0x410, 2, 0, "\x13", "application/x-filesystem"),
|
||||
array(0x410, 2, 0, "\x13�", "application/x-filesystem"),
|
||||
array(0x410, 2, 0, "\x13�", "application/x-filesystem"),
|
||||
array(0x410, 2, 0, "\x24h", "application/x-filesystem"),
|
||||
array(0x410, 2, 0, "\x24x", "application/x-filesystem"),
|
||||
array(0, 9, 0, "-rom1fs-\0", "application/x-filesystem"),
|
||||
@@ -332,7 +332,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 3, 0, "flf", "font/x-figlet"),
|
||||
array(0, 3, 0, "flc", "application/x-font"),
|
||||
array(0, 4, 0, "\x19Y\x02\x14", "font/x-libgrx"),
|
||||
array(0, 4, 0, "NOFÿ", "font/x-dos"),
|
||||
array(0, 4, 0, "NOF�", "font/x-dos"),
|
||||
array(7, 4, 0, "AGE\x00", "font/x-dos"),
|
||||
array(7, 4, 0, "DIV\x00", "font/x-dos"),
|
||||
array(0, 10, 0, "<MakerFile", "application/x-framemaker"),
|
||||
@@ -354,8 +354,8 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(20, 4, 0, "GIMP", "application/x-gimp-brush"),
|
||||
array(0, 4, 0, "\336\22\4\225", "application/x-locale"),
|
||||
array(0, 4, 0, "\225\4\22\336", "application/x-locale"),
|
||||
array(0, 2, 0, "—\x01", "application/x-executable-file"),
|
||||
array(0, 2, 0, "”\x01", "application/x-executable-file"),
|
||||
array(0, 2, 0, "�\x01", "application/x-executable-file"),
|
||||
array(0, 2, 0, "�\x01", "application/x-executable-file"),
|
||||
array(0, 5, 0, "\000\001\000\000\000", "font/ttf"),
|
||||
array(0, 4, 0, "\x0a\x0f\x08\x0e", "application/data"),
|
||||
array(0, 4, 0, "\x0f\x0a\x0e\x08", "application/data"),
|
||||
@@ -391,11 +391,11 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "\x07\x01\x0a\x02", "application/x-executable-file"),
|
||||
array(0, 4, 0, "\x0e\x01\x0c\x02", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x0d\x01\x0c\x02", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x02\x0aÿe", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x02\x0cÿe", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x02\x08ÿe", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x01X!¦", "application/core"),
|
||||
array(0, 4, 0, "M§îè", "font/x-hp-windows"),
|
||||
array(0, 4, 0, "\x02\x0a�e", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x02\x0c�e", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x02\x08�e", "application/x-library-file"),
|
||||
array(0, 4, 0, "\x01X!�", "application/core"),
|
||||
array(0, 4, 0, "M���", "font/x-hp-windows"),
|
||||
array(0, 10, 0, "Bitmapfile", "image/unknown"),
|
||||
array(0, 4, 0, "\x02\x0c\x01\x0c", "application/x-lisp"),
|
||||
array(0, 8, 0, "msgcat01", "application/x-locale"),
|
||||
@@ -412,12 +412,12 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(1, 3, 0, "PNG", "image/x-png"),
|
||||
array(0, 4, 0, "GIF8", "image/gif"),
|
||||
array(0, 4, 0, "\361\0\100\273", "image/x-cmu-raster"),
|
||||
array(0, 2, 0, "Øÿ", "image/jpeg"),
|
||||
array(0, 2, 0, "��", "image/jpeg"),
|
||||
array(0, 4, 0, "hsi1", "image/x-jpeg-proprietary"),
|
||||
array(0, 2, 0, "BM", "image/x-bmp"),
|
||||
array(0, 2, 0, "IC", "image/x-ico"),
|
||||
array(0, 4, 0, "•j¦Y", "x/x-image-sun-raster"),
|
||||
array(0, 2, 0, "Ú\x01", "x/x-image-sgi"),
|
||||
array(0, 4, 0, "�j�Y", "x/x-image-sun-raster"),
|
||||
array(0, 2, 0, "�\x01", "x/x-image-sgi"),
|
||||
array(2048, 7, 0, "PCD_IPI", "x/x-photo-cd-pack-file"),
|
||||
array(0, 7, 0, "PCD_OPA", "x/x-photo-cd-overfiew-file"),
|
||||
array(0, 2, 0, "\x01H", "application/x-executable-file"),
|
||||
@@ -478,7 +478,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 2, 0, "\367\312", "font/x-tex"),
|
||||
array(2, 2, 0, "\000\021", "font/x-tex-tfm"),
|
||||
array(2, 2, 0, "\000\022", "font/x-tex-tfm"),
|
||||
array('>2', 2, 0, "º¾", "application/java"),
|
||||
array('>2', 2, 0, "��", "application/java"),
|
||||
array(8, 4, 0, "AIFF", "audio/x-aiff"),
|
||||
array(8, 4, 0, "AIFC", "audio/x-aiff"),
|
||||
array(8, 4, 0, "8SVX", "audio/x-aiff"),
|
||||
@@ -492,7 +492,7 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 12, 0, "#! /bin/tcsh", "application/x-shellscript"),
|
||||
array(0, 18, 0, "#! /usr/local/tcsh", "application/x-shellscript"),
|
||||
array('>8', 6, 0, "debian", "application/x-debian-package"),
|
||||
array('>2', 2, 0, "Ûî", "application/x-rpm"),
|
||||
array('>2', 2, 0, "��", "application/x-rpm"),
|
||||
array(2, 5, 0, "-lh -", "application/x-lha"),
|
||||
array(2, 5, 0, "-lh6-", "application/x-lha"),
|
||||
array(2, 5, 0, "-lh7-", "application/x-lha"),
|
||||
@@ -510,9 +510,9 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 4, 0, "\376\067\0\043", "application/msword"),
|
||||
array(0, 6, 0, "\320\317\021\340\241\261", "application/msword"),
|
||||
array(0, 6, 0, "\333\245-\0\0\0", "application/msword"),
|
||||
array(0, 2, 0, "\x02÷", "application/x-dvi"),
|
||||
array(0, 2, 0, "¯\x11", "video/fli"),
|
||||
array(0, 2, 0, "¯\x12", "video/flc"),
|
||||
array(0, 2, 0, "\x02�", "application/x-dvi"),
|
||||
array(0, 2, 0, "�\x11", "video/fli"),
|
||||
array(0, 2, 0, "�\x12", "video/flc"),
|
||||
array('>8', 4, 0, "AVI ", "video/avi"),
|
||||
array(0, 1, 0, "\x01", "video/unknown"),
|
||||
array(0, 1, 0, "\x02", "video/unknown"),
|
||||
@@ -520,33 +520,33 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
array(0, 18, 0, "\# KDE Config File", "application/x-kdelnk"),
|
||||
array(0, 7, 0, "\# xmcd", "text/xmcd"),
|
||||
array(0, 4, 0, "\x8aMNG", "video/x-mng"),
|
||||
array(0, 4, 0, "ó\x03\x00\x00", "application/x-executable-file"),
|
||||
array(0, 4, 0, "ç\x03\x00\x00", "application/x-library-file"),
|
||||
array(0, 4, 0, "³\x01\x00\x00", "video/mpeg"),
|
||||
array(0, 4, 0, "º\x01\x00\x00", "video/mpeg"),
|
||||
array(0, 4, 0, "\x00\x00�l", "application/x-apl-workspace"),
|
||||
array(0, 4, 0, "\x00\x00ÿm", "application/x-ar"),
|
||||
array(0, 4, 0, "\x00\x00ÿe", "application/data"),
|
||||
array(0, 4, 0, "�\x03\x00\x00", "application/x-executable-file"),
|
||||
array(0, 4, 0, "�\x03\x00\x00", "application/x-library-file"),
|
||||
array(0, 4, 0, "�\x01\x00\x00", "video/mpeg"),
|
||||
array(0, 4, 0, "�\x01\x00\x00", "video/mpeg"),
|
||||
array(0, 4, 0, "\x00\x00�l", "application/x-apl-workspace"),
|
||||
array(0, 4, 0, "\x00\x00�m", "application/x-ar"),
|
||||
array(0, 4, 0, "\x00\x00�e", "application/data"),
|
||||
array(0, 4, 0, "\x00\x00\x01\x06", "application/x-executable-file"),
|
||||
array(0, 4, 0, "G\x01\x00\x00", "application/x-object-file"),
|
||||
array(0, 4, 0, "K\x01\x00\x00", "application/x-executable-file"),
|
||||
array(0, 4, 0, "M\x01\x00\x00", "application/x-executable-file"),
|
||||
array(0, 4, 0, "O\x01\x00\x00", "application/x-executable-file"),
|
||||
array(24, 4, 0, "kê\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "lê\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "mê\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "nê\x00\x00", "application/data"),
|
||||
array(0, 4, 0, "�\x01\x00\x00", "application/x-object-file"),
|
||||
array(0, 4, 0, "‡\x01\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "\x00\x00êl", "application/x-dump"),
|
||||
array(24, 4, 0, "\x00\x00êk", "application/x-dump"),
|
||||
array(0, 4, 0, "\x00\x00¾1", "text/vnd.ms-word"),
|
||||
array(24, 4, 0, "k�\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "l�\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "m�\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "n�\x00\x00", "application/data"),
|
||||
array(0, 4, 0, "�\x01\x00\x00", "application/x-object-file"),
|
||||
array(0, 4, 0, "�\x01\x00\x00", "application/data"),
|
||||
array(24, 4, 0, "\x00\x00�l", "application/x-dump"),
|
||||
array(24, 4, 0, "\x00\x00�k", "application/x-dump"),
|
||||
array(0, 4, 0, "\x00\x00�1", "text/vnd.ms-word"),
|
||||
array(0, 2, 0, "\x00\x00", "audio/mpeg"),
|
||||
array('>16', 2, 0, "\x00\x01", "application/x-object"),
|
||||
array('>16', 2, 0, "\x00\x02", "application/x-executable"),
|
||||
array('>16', 2, 0, "\x00\x03", "application/x-sharedlib"),
|
||||
array('>16', 2, 0, "\x00\x04", "application/x-coredump"),
|
||||
array(0, 4, 0, "\x00\x00\x00Ì", "application/x-executable-file"),
|
||||
array(0, 4, 0, "\x00\x00\x00�", "application/x-executable-file"),
|
||||
array(0, 4, 0, "\x04\x00\x00\x00", "font/x-snf"),
|
||||
array(0, 4, 0, "\x00\x00\x00\x04", "font/x-snf"),
|
||||
array('>12', 4, 0, "\x01\x00\x00\x00", "audio/basic"),
|
||||
@@ -569,4 +569,3 @@ function ewiki_mime_magic(&$binary_data) {
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -12,7 +12,7 @@
|
||||
a WikiLink to explain a more complex task on another page;
|
||||
your decision
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function ewiki_format_source_footnotes (&$source) {
|
||||
|
||||
#-- strip "{{footnote}}"
|
||||
$source = substr($source, 0, $l - 2)
|
||||
. "<a href=\"#fn$notenum\">·$notenum</a>"
|
||||
. "<a href=\"#fn$notenum\">�$notenum</a>"
|
||||
. substr($source, $r + 2);
|
||||
|
||||
#-- add "footnote" to the end of the wiki page source
|
||||
@@ -52,10 +52,9 @@ function ewiki_format_source_footnotes (&$source) {
|
||||
$source .= "\n----";
|
||||
}
|
||||
$source .= "\n" .
|
||||
"<a name=\"fn$notenum\">·$notenum</a> ". $footnote . "\n<br />";
|
||||
|
||||
"<a name=\"fn$notenum\">�$notenum</a> ". $footnote . "\n<br />";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
# this is the "stupid diff", which shows up changes between two
|
||||
# saved versions of a WikiPage; even if working very unclean it
|
||||
@@ -26,13 +26,13 @@
|
||||
if ($old_ver > 0) {
|
||||
$data0 = ewiki_database("GET", array("id" => $id, "version" => $old_ver));
|
||||
}
|
||||
|
||||
|
||||
$a->new_ver=$new_ver;
|
||||
$a->old_ver=$old_ver;
|
||||
$a->pagename=$id;
|
||||
$o = ewiki_make_title($id, get_string("differences","wiki",$a));
|
||||
|
||||
# Different handling for html: closes Bug #1530 - Wiki diffs useless when using HTML editor
|
||||
# Different handling for html: closes Bug #1530 - Wiki diffs useless when using HTML editor
|
||||
if($wiki->htmlmode==2) {
|
||||
/// first do the formatiing to get normal display format without filters
|
||||
$options = new object();
|
||||
@@ -46,15 +46,15 @@
|
||||
$content0 = preg_replace('/(\S)\s+(\S)/', '$1 $2', $content0); // Remove multiple spaces.
|
||||
$content = preg_replace('/\n|\r/i', ' ', $content);
|
||||
$content = preg_replace('/(\S)\s+(\S)/', '$1 $2', $content);
|
||||
|
||||
|
||||
/// Replace <p> </p>
|
||||
$content0 = preg_replace('#(<p( [^>]*)?>( |\s+)</p>)|(<p( [^>]*)?></p>)#i', "\n", $content0);
|
||||
$content = preg_replace('#(<p( [^>]*)?>( |\s+)</p>)|(<p( [^>]*)?></p>)#i', "\n", $content);
|
||||
|
||||
|
||||
|
||||
/// Place new line characters at logical HTML positions.
|
||||
$htmlendings = array('+(<br.*?>)+iU', '+(<p( [^>]*)?>)+iU', '+(</p>)+i', '+(<hr.*?>)+iU', '+(<ol.*?>)+iU',
|
||||
'+(</ol>)+i', '+(<ul.*?>)+iU', '+(</ul>)+i', '+(<li.*?>)+iU', '+(</li>)+i',
|
||||
'+(</ol>)+i', '+(<ul.*?>)+iU', '+(</ul>)+i', '+(<li.*?>)+iU', '+(</li>)+i',
|
||||
'+(</tr>)+i', '+(<div.*?>)+iU', '+(</div>)+i');
|
||||
$htmlrepl = array("\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n",
|
||||
"\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n",
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
foreach ($txt2 as $i => $line) {
|
||||
$i2 = $i;
|
||||
while ($rm = $diff0[$i2++]) {
|
||||
while ($rm = $diff0[$i2++]) {
|
||||
if($wiki->htmlmode == 2) {
|
||||
if ($rm == '<br />') { //ugly hack to fix line breaks
|
||||
$rm = '';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once("../../config.php");
|
||||
require_once("../../config.php");
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
|
||||
# this is the upload/download plugin, which allows to put arbitrary binary
|
||||
@@ -110,7 +110,7 @@ function ewiki_page_fileupload($id, $data, $action, $def_sec="") {
|
||||
$o .= upload_print_form_fragment(1,array(EWIKI_UP_UPLOAD),array(ewiki_t("file")),false,null,0,0,true);
|
||||
$o .= '<input type="submit" value="' . EWIKI_PAGE_UPLOAD . '" /><br /><br />'
|
||||
.'<b>' . ewiki_t("comment") . '</b><br /><textarea name="comment" cols="35" rows="3"></textarea><br /><br />';
|
||||
|
||||
|
||||
if (empty($ewiki_upload_sections[$def_sec])) {
|
||||
$ewiki_upload_sections[$def_sec] = $def_sec;
|
||||
}
|
||||
@@ -301,8 +301,8 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) {
|
||||
$id = $row["id"];
|
||||
$p_title = basename($meta["Content-Location"]);
|
||||
$p_time = userdate($row["created"]);
|
||||
|
||||
|
||||
|
||||
|
||||
$p_hits = ($row["hits"] ? $row["hits"] : "0");
|
||||
$p_size = $meta["size"];
|
||||
$p_size = isset($p_size) ? (", " . ($p_size>=4096 ? round($p_size/1024)."K" : $p_size." bytes")) : "";
|
||||
@@ -321,12 +321,12 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) {
|
||||
|
||||
$p_icon = "";
|
||||
/*foreach ($ewiki_binary_icons as $str => $i) {
|
||||
if (empty($str) || strstr($row["Content-Location"], $str) || strstr($p_ct, $str) || strstr($p_ct2, $str)) {
|
||||
if (empty($str) || strstr($row["Content-Location"], $str) || strstr($p_ct, $str) || strstr($p_ct2, $str)) {
|
||||
$p_icon = $i;
|
||||
$p_icon_t = $str;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/// Moodle Icon Handling
|
||||
global $CFG;
|
||||
$p_icon = $OUTPUT->old_icon_url(file_extension_icon($id));
|
||||
@@ -370,8 +370,8 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) {
|
||||
// $o = format_text($o, $moodle_format);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ewiki_t("DWNL_ENTRY_FORMAT", $info);
|
||||
|
||||
return($o);
|
||||
@@ -398,4 +398,4 @@ function ewiki_action_attachments($id, $data, $action=EWIKI_ACTION_ATTACHMENTS)
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
/*
|
||||
This filter plugin implements minimal html tag balancing, and can also
|
||||
@@ -7,7 +7,7 @@
|
||||
markup abuse; it however provides no fix for <ul> inside <ul> or even
|
||||
<h2> inside <p> problems (this should rather be fixed in the ewiki_format
|
||||
function). So following code is not meant to fix any possible html file,
|
||||
and it certainly won't make valid html files out of random binary data.
|
||||
and it certainly won't make valid html files out of random binary data.
|
||||
So for full html spec conformance you should rather utilize w3c tidy (by
|
||||
using your Webservers "Filter" directive).
|
||||
*/
|
||||
@@ -174,4 +174,4 @@ function ewiki_html_tag_balancer(&$html) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
/*
|
||||
This plugin intercepts some of the binary handling functions to
|
||||
@@ -42,16 +42,16 @@ function moodle_binary_get_path($id, $meta, $course, $wiki, $userid, $groupid) {
|
||||
global $CFG;
|
||||
$entry=wiki_get_entry($wiki, $course, $userid, $groupid);
|
||||
if(!$entry) {
|
||||
print_error('cannotgetentry', 'wiki');
|
||||
print_error('cannotgetentry', 'wiki');
|
||||
}
|
||||
|
||||
|
||||
$dir=make_upload_directory("$course->id/$CFG->moddata/wiki/$wiki->id/$entry->id/".$meta["section"]);
|
||||
if(substr($id, 0, strlen(EWIKI_IDF_INTERNAL))!=EWIKI_IDF_INTERNAL) {
|
||||
print_error('cannotstartwith', 'wiki', '', EWIKI_IDF_INTERNAL.substr($id, 0, strlen(EWIKI_IDF_INTERNAL)));
|
||||
}
|
||||
$id = substr($id,strlen(EWIKI_IDF_INTERNAL));
|
||||
$id = clean_filename($id);
|
||||
|
||||
|
||||
return "$dir/$id";
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ function moodle_binary_store_file(&$filename, &$id, &$meta, $ext=".bin") {
|
||||
print_error('cannotacceptbin', 'wiki');
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$entry=wiki_get_entry($wiki, $course, $userid, $groupid);
|
||||
if(!$entry->id) {
|
||||
print_error('cannotgetentry', 'wiki');
|
||||
}
|
||||
|
||||
|
||||
require_once($CFG->dirroot.'/lib/uploadlib.php');
|
||||
$um = new upload_manager('upload',false,false,$course,false,0,true,true);
|
||||
if ($um->process_file_uploads("$course->id/$CFG->moddata/wiki/$wiki->id/$entry->id/$ewiki_title")) {
|
||||
@@ -83,7 +83,7 @@ function moodle_binary_store_file(&$filename, &$id, &$meta, $ext=".bin") {
|
||||
}
|
||||
print_error('uploaderror', 'wiki', '', $um->print_upload_log(true));
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ function moodle_binary_store_get_file($id, &$meta) {
|
||||
print_error('cannotacceptbin', 'wiki');
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$filepath=moodle_binary_get_path($id, $meta, $course, $wiki, $userid, $groupid);
|
||||
if (file_exists($filepath)) {
|
||||
readfile($filepath);
|
||||
@@ -116,4 +116,4 @@ function moodle_binary_store_get_file($id, &$meta) {
|
||||
//}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
/*
|
||||
CSS-highlights the terms used as search patterns. This is done
|
||||
@@ -10,7 +10,7 @@
|
||||
em.highlight {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
em.marker {
|
||||
background: yellow;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ function ewiki_moodle_highlight(&$o, &$id, &$data, &$action) {
|
||||
#-- get words out of it
|
||||
$q = preg_replace('/[^-_\d'.EWIKI_CHARS_L.EWIKI_CHARS_U.']+/', " ", $q);
|
||||
$q = array_unique(explode(" ", $q));
|
||||
#-- walk through words
|
||||
#-- walk through words
|
||||
foreach ($q as $word) {
|
||||
|
||||
if (empty($word)) {
|
||||
@@ -76,4 +76,4 @@ function ewiki_moodle_highlight(&$o, &$id, &$data, &$action) {
|
||||
} // func
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
/*
|
||||
Can be used to allow preserving of certain "safe" HTML <tags>
|
||||
@@ -23,11 +23,11 @@ function ewiki_moodle_rescue_html(&$wiki_source) {
|
||||
|
||||
$rescue_html = array(
|
||||
"br", "tt", "b", "i", "strong", "em", "s", "kbd", "var", "xmp", "sup", "sub",
|
||||
"pre", "q", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "u",
|
||||
"pre", "q", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "u",
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-- unescape allowed html
|
||||
if ($safe_html) {
|
||||
/*
|
||||
@@ -43,4 +43,4 @@ function ewiki_moodle_rescue_html(&$wiki_source) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
# ToDo: Binary Content
|
||||
# Binary Linking
|
||||
/*
|
||||
@@ -28,8 +28,8 @@ $ewiki_t["c"]["EWIKIDUMPCSS"] = '
|
||||
body {
|
||||
background-color:#eeeeff;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
H2 {
|
||||
background:#000000;
|
||||
color:#ffffff;
|
||||
@@ -37,8 +37,8 @@ $ewiki_t["c"]["EWIKIDUMPCSS"] = '
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
';
|
||||
|
||||
';
|
||||
|
||||
|
||||
function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
|
||||
global $userid, $groupid, $cm, $wikipage, $wiki, $course, $CFG, $OUTPUT;
|
||||
@@ -57,15 +57,15 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
|
||||
if($wiki->htmlmode==2) {
|
||||
$exportformatval=1;
|
||||
}
|
||||
$cont=ewiki_page_wiki_dump_send($binaries,
|
||||
$exportformatval,
|
||||
$withvirtualpages,
|
||||
$cont=ewiki_page_wiki_dump_send($binaries,
|
||||
$exportformatval,
|
||||
$withvirtualpages,
|
||||
optional_param("exportdestinations", null,PARAM_CLEAN));
|
||||
}
|
||||
}
|
||||
if($cont===false) {
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
$url = ewiki_script("", "WikiExport");
|
||||
$ret = ewiki_make_title($id, ewiki_t($id), 2);
|
||||
$ret .= ($cont&&$cont!==true)?$cont."<br /><br />\n":"";
|
||||
@@ -80,8 +80,8 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
|
||||
'<INPUT type="hidden" name="groupid" value="'.$groupid.'" />'."\n".
|
||||
'<INPUT type="hidden" name="id" value="'.$cm->id.'" />'."\n".
|
||||
'<INPUT type="hidden" name="wikipage" value="'.$wikipage.'" />'."\n";
|
||||
|
||||
|
||||
|
||||
|
||||
// Export binaries too ?
|
||||
if(!$wiki->ewikiacceptbinary) {
|
||||
$ret.='<INPUT type="hidden" name="exportbinaries" value="0" />'.$exportdestinations[0]."\n";
|
||||
@@ -123,12 +123,12 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
|
||||
if(wiki_is_teacher($wiki)) {
|
||||
// Get Directory List
|
||||
$rawdirs = get_directory_list("$CFG->dataroot/$course->id", 'moddata', true, true, false);
|
||||
|
||||
|
||||
foreach ($rawdirs as $rawdir) {
|
||||
$exportdestinations[$rawdir] = get_string("moduledirectory","wiki").": ".$rawdir;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ret.=" <TR valign=\"top\">\n".
|
||||
' <TD align="right">'.get_string("exportto","wiki").":</TD>\n".
|
||||
" <TD>\n";
|
||||
@@ -140,7 +140,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
|
||||
$ret.= $OUTPUT->select($select)."\n";
|
||||
}
|
||||
$ret.=" </TD>\n".
|
||||
" </TR>\n".
|
||||
" </TR>\n".
|
||||
"</TABLE>\n".
|
||||
' <input type="submit" name="wikiexport" value= "'.get_string("export","wiki").'" />'."\n".
|
||||
"</div>\n";
|
||||
@@ -150,7 +150,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
|
||||
|
||||
function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvirtualpages=0, $exportdestinations=0) {
|
||||
global $ewiki_config, $wiki, $ewiki_plugins, $wiki_entry, $course, $CFG, $ewiki_t, $userid, $groupid, $OUTPUT;
|
||||
|
||||
|
||||
$filestozip=array();
|
||||
#-- disable protected email
|
||||
if (is_array($ewiki_plugins["link_url"])) {
|
||||
@@ -160,7 +160,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// HTML-Export
|
||||
if($exportformats==1) {
|
||||
#-- if exportformats is html
|
||||
@@ -175,20 +175,20 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
|
||||
#-- reconfigure ewiki_format() to generate offline pages and files
|
||||
$html_ext = ".html";
|
||||
$ewiki_config["script"] = "%s$html_ext";
|
||||
$ewiki_config["script_binary"] = "%s";
|
||||
}
|
||||
|
||||
|
||||
// Export Virtual pages special
|
||||
$a_virtual = array_keys($ewiki_plugins["page"]);
|
||||
|
||||
#-- get all pages / binary files
|
||||
$a_validpages = ewiki_valid_pages(1, $withvirtualpages);
|
||||
$a_pagelist = ewiki_sitemap_create($wiki_entry->pagename, $a_validpages, 100, 1);
|
||||
|
||||
|
||||
# Add linked binary files to pagelist
|
||||
foreach($a_pagelist as $key => $value) {
|
||||
if(is_array($a_validpages[$value]["refs"])){
|
||||
@@ -206,7 +206,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
$a_images[]=urlencode($value);
|
||||
$a_rimages[]=urlencode(preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", $value));
|
||||
unset($a_validpages[$value]);
|
||||
}
|
||||
}
|
||||
if($a_validpages[$value]["type"]=="file") {
|
||||
$a_images[]=urlencode($value);
|
||||
$a_rimages[]=clean_filename(substr($value,strlen(EWIKI_IDF_INTERNAL)));
|
||||
@@ -216,14 +216,14 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
}
|
||||
}
|
||||
|
||||
# Remove binaries from a_validpages and add to a_pagelist
|
||||
# Remove binaries from a_validpages and add to a_pagelist
|
||||
foreach($a_validpages as $key => $value){
|
||||
if($a_validpages[$key]["type"]=="image" || $a_validpages[$key]["type"]=="file"){
|
||||
$a_pagelist[]=$key;
|
||||
unset($a_validpages[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#print "<pre>"; print_r($a_validpages); print "</pre>";
|
||||
#print "<hr /><pre>"; print_r($a_pagelist); print "</pre>";
|
||||
|
||||
@@ -239,7 +239,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
#} else {
|
||||
# die();
|
||||
#}
|
||||
|
||||
|
||||
/// Create/Set Directory
|
||||
$wname=clean_filename(strip_tags(format_string($wiki->name,true)));
|
||||
if($exportdestinations) {
|
||||
@@ -260,12 +260,12 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
print_error("cannotcreatetempdir");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$a_pagelist = array_unique($a_pagelist);
|
||||
|
||||
|
||||
|
||||
|
||||
#-- convert all pages
|
||||
foreach($a_pagelist as $pagename){
|
||||
foreach($a_pagelist as $pagename){
|
||||
if ((!in_array($pagename, $a_virtual))) {
|
||||
$id = $pagename;
|
||||
#-- not a virtual page
|
||||
@@ -285,59 +285,59 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (empty($content)){
|
||||
switch ($row["flags"] & EWIKI_DB_F_TYPE) {
|
||||
// Text Page
|
||||
case (EWIKI_DB_F_TEXT):
|
||||
#print "<pre>"; print_r($row[content]); print "\n-------------</pre>";
|
||||
|
||||
|
||||
if($exportformats==1) {/// HTML-Export
|
||||
$content = ewiki_format($row["content"]);
|
||||
} else {
|
||||
$content = $row["content"];
|
||||
}
|
||||
|
||||
|
||||
# Binary files link adjustment when html
|
||||
if($exportformats==1) {
|
||||
$content = str_replace($a_images, $a_rimages, $content);
|
||||
}
|
||||
|
||||
|
||||
$fn = preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", urlencode($id));
|
||||
$fn = $fn.$html_ext;
|
||||
if($exportformats==1) {/// HTML-Export
|
||||
$content = str_replace('$content', $content, str_replace('$title', $id, $HTML_TEMPLATE));
|
||||
}
|
||||
break;
|
||||
case (EWIKI_DB_F_BINARY):
|
||||
case (EWIKI_DB_F_BINARY):
|
||||
#print "Binary: $row[id]<br />";
|
||||
if (($row["meta"]["class"]=="image" || $row["meta"]["class"]=="file") && ($exportbinaries)) {
|
||||
# Copy files to the appropriate directory
|
||||
# Copy files to the appropriate directory
|
||||
$fn= moodle_binary_get_path($id, $row["meta"], $course, $wiki, $userid, $groupid);
|
||||
$destfn=clean_filename(substr($id,strlen(EWIKI_IDF_INTERNAL)));
|
||||
$dest="$exportdir/".$destfn;
|
||||
if(!copy($fn,$dest)) {
|
||||
echo $OUTPUT->notification("Cannot copy $fn to $dest.");
|
||||
}
|
||||
|
||||
|
||||
#$fn = urlencode(preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", $id));
|
||||
#$content = &$row["content"];
|
||||
$filestozip[]=$exportdir."/".$destfn;
|
||||
continue (2);
|
||||
}
|
||||
else {
|
||||
#-- php considers switch statements as loops so continue 2 is needed to
|
||||
#-- hit the end of the for loop
|
||||
#-- php considers switch statements as loops so continue 2 is needed to
|
||||
#-- hit the end of the for loop
|
||||
continue(2);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
# don't want it
|
||||
continue(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Do not translate links when wiki already in pure html - mode
|
||||
if($wiki->htmlmode!=2) {
|
||||
$content=preg_replace_callback(
|
||||
@@ -356,7 +356,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
if (!$handle = fopen($exportdir."/".$fn, 'w')) {
|
||||
print_error('cannotopenfile', '', '', $exportdir/$fn);
|
||||
}
|
||||
|
||||
|
||||
// Write $content to our opened file.
|
||||
if (fwrite($handle, $content) === FALSE) {
|
||||
print_error('cannotwritefile', '', '', $exportdir/$fn);
|
||||
@@ -370,7 +370,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
# "mode" => 0664 | (($row["flags"]&EWIKI_DB_F_WRITEABLE)?0002:0000),
|
||||
# ), $complevel);
|
||||
}
|
||||
|
||||
|
||||
#-- create index page
|
||||
/// HTML-Export
|
||||
if($exportformats==1) {
|
||||
@@ -397,23 +397,23 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
if (!$handle = fopen($exportdir."/".$indexname, 'w')) {
|
||||
print_error('cannnotopenfile', '', '', $exportdir/$indexname);
|
||||
}
|
||||
|
||||
|
||||
// Write $somecontent to our opened file.
|
||||
if (fwrite($handle, $str_formatted) === FALSE) {
|
||||
print_error('cannnotwritefile', '', '', $exportdir/$indexname);
|
||||
}
|
||||
|
||||
|
||||
fclose($handle);
|
||||
$filestozip[]=$exportdir."/".$indexname;
|
||||
|
||||
|
||||
#-- add index page
|
||||
# $archive->add($str_formatted, "Index_$rootid".$html_ext, array(
|
||||
# "mtime" => $row["lastmodified"],
|
||||
# "uname" => "ewiki",
|
||||
# "mode" => 0664 | (($row["flags"]&EWIKI_DB_F_WRITEABLE)?0002:0000),
|
||||
# ), $complevel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!$exportdestinations) {
|
||||
$archivename=$wname.".zip";
|
||||
zip_files($filestozip, "$exportbasedir/$archivename");
|
||||
@@ -422,9 +422,9 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
Header("Content-type: application/zip");
|
||||
Header("Content-disposition: attachment; filename=\"$archivename\"");
|
||||
Header("Cache-control: private");
|
||||
Header("Original-Filename: $archivename");
|
||||
Header("Original-Filename: $archivename");
|
||||
Header("X-Content-Type: application/zip");
|
||||
Header("Content-Location: $archivename");
|
||||
Header("Content-Location: $archivename");
|
||||
if(!@readfile("$exportbasedir/$archivename")) {
|
||||
print_error("cannotreadfile", '', '', $exportbasedir/$archivename);
|
||||
}
|
||||
@@ -434,7 +434,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
|
||||
#exit();
|
||||
return false;
|
||||
} else {
|
||||
return get_string("exportsuccessful","wiki")."<br />";
|
||||
return get_string("exportsuccessful","wiki")."<br />";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -445,16 +445,16 @@ function deldir($dir)
|
||||
while (false!==($FolderOrFile = readdir($handle)))
|
||||
{
|
||||
if($FolderOrFile != "." && $FolderOrFile != "..")
|
||||
{
|
||||
{
|
||||
if(is_dir("$dir/$FolderOrFile"))
|
||||
{ deldir("$dir/$FolderOrFile"); } // recursive
|
||||
else
|
||||
{ unlink("$dir/$FolderOrFile"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
if(rmdir($dir))
|
||||
{ $success = true; }
|
||||
return $success;
|
||||
return $success;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
/*
|
||||
This plugin will create a sitemap rooted at the given location
|
||||
@@ -17,7 +17,7 @@ if(!isset($ewiki_config["SiteMap"]["RootList"])){
|
||||
$ewiki_config["SiteMap"]["RootList"]=array(EWIKI_PAGE_INDEX);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
populates an array with all sites the current user is allowed to access
|
||||
calls the sitemap creation function.
|
||||
returns the sitemap to be displayed.
|
||||
@@ -30,13 +30,13 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){
|
||||
$str_null=NULL;
|
||||
|
||||
$a_validpages=ewiki_valid_pages(0,1);
|
||||
|
||||
|
||||
//**end of hijacked code**
|
||||
//$time_end=getmicrotime();
|
||||
|
||||
//creates the title bar on top of page
|
||||
//creates the title bar on top of page
|
||||
if($id == EWIKI_PAGE_SITEMAP){
|
||||
$o = ewiki_make_title($id, ewiki_t($id), 2);
|
||||
$o = ewiki_make_title($id, ewiki_t($id), 2);
|
||||
|
||||
foreach($ewiki_config["SiteMap"]["RootList"] as $root){
|
||||
if(isset($a_validpages[$root])){
|
||||
@@ -45,13 +45,13 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
$o = ewiki_make_title($id, ewiki_t("SMFOR")." ".$id, 2);
|
||||
$o = ewiki_make_title($id, ewiki_t("SMFOR")." ".$id, 2);
|
||||
if(isset($a_validpages[$id])){
|
||||
$valid_root=TRUE;
|
||||
$str_rootid=$id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$o .= "<p>".ewiki_t("VIEWSMFOR")." ";
|
||||
@@ -61,7 +61,7 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){
|
||||
$o.='<a href="'.ewiki_script('sitemap/',$root).'">'.$root.'</a> ';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$o.="</p>";
|
||||
|
||||
//checks to see if the user is allowed to view the root page
|
||||
@@ -69,7 +69,7 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){
|
||||
$o .= ewiki_t("INVALIDROOT");
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
//$timesitemap=getmicrotime();
|
||||
$a_sitemap=ewiki_sitemap_create($str_rootid, $a_validpages, EWIKI_SITEMAP_DEPTH);
|
||||
|
||||
@@ -80,16 +80,16 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){
|
||||
$fin_level=format_sitemap($a_sitemap, $str_rootid, $str_formatted, $level, $timer, $fordump);
|
||||
$str_formatted.="</ul>".str_pad("", $fin_level*6, "</ul>\n");
|
||||
$o.=$str_formatted;
|
||||
|
||||
|
||||
//$timesitemap_end=getmicrotime();
|
||||
|
||||
|
||||
//$o.="GetAll: ".($time_end-$time)."\n";
|
||||
//$o.="SiteMap: ".($timesitemap_end-$timesitemap)."\n";
|
||||
//$o.="Total: ".($timesitemap_end-$time);
|
||||
|
||||
|
||||
|
||||
|
||||
return($o);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function ewiki_valid_pages($bool_allowimages=0, $virtual_pages=0){
|
||||
@@ -99,10 +99,10 @@ function ewiki_valid_pages($bool_allowimages=0, $virtual_pages=0){
|
||||
while ($row = $result->get()) {
|
||||
if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $str_null, "view")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$isbinary= ($row["meta"]["class"]=="image"||$row["meta"]["class"]=="file")?true:false;
|
||||
|
||||
|
||||
if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT || ($bool_allowimages ? $isbinary : 0)) {
|
||||
$temp_refs=explode("\n",$row["refs"]);
|
||||
foreach($temp_refs as $key => $value) {
|
||||
@@ -143,7 +143,7 @@ function format_sitemap($a_sitemap, $str_rootpage, &$str_formatted, &$prevlevel,
|
||||
$str_mark="";
|
||||
if($a_sitemap[$str_rootpage]["level"]>$prevlevel){
|
||||
$str_mark="<ul>\n";
|
||||
}
|
||||
}
|
||||
elseif ($a_sitemap[$str_rootpage]["level"]<$prevlevel){
|
||||
//markup length is 6 characters
|
||||
$str_mark=str_pad("", ($prevlevel-$a_sitemap[$str_rootpage]["level"])*6, "</ul>\n");
|
||||
@@ -187,9 +187,9 @@ function ewiki_page_listallchildren($str_root, &$a_children, &$a_sitemap, &$a_va
|
||||
} else {
|
||||
$a_sitemap[$str_root]=array("level" => $i_level);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -211,17 +211,17 @@ function ewiki_sitemap_create($str_rootid, $a_validpages, $i_maxdepth, $i_flatma
|
||||
$a_validpages[$str_rootid]["touched"]=TRUE;
|
||||
//list all of the children of the root
|
||||
ewiki_page_listallchildren($str_rootid, $a_children, $a_sitemap, $a_validpages, $i_depth, $i_maxdepth, $i_flatmap);
|
||||
$i_depth++;
|
||||
|
||||
$i_depth++;
|
||||
|
||||
if($a_children){
|
||||
end($a_children);
|
||||
$str_nextlevel=key($a_children);
|
||||
reset($a_children);
|
||||
|
||||
|
||||
while($str_child = key($a_children)){
|
||||
//list all children of the current child
|
||||
ewiki_page_listallchildren($str_child, $a_children, $a_sitemap, $a_validpages, $i_depth, $i_maxdepth, $i_flatmap);
|
||||
|
||||
|
||||
//if the child is the next level marker...
|
||||
if($str_child==$str_nextlevel){
|
||||
//increment the level counter
|
||||
@@ -231,7 +231,7 @@ function ewiki_sitemap_create($str_rootid, $a_validpages, $i_maxdepth, $i_flatma
|
||||
$str_nextlevel=key($a_children);
|
||||
//reset the array counter to the beginning of the array
|
||||
reset($a_children);
|
||||
//we are done with this child...get rid of it
|
||||
//we are done with this child...get rid of it
|
||||
}
|
||||
array_shift($a_children);
|
||||
}
|
||||
@@ -239,4 +239,4 @@ function ewiki_sitemap_create($str_rootid, $a_validpages, $i_maxdepth, $i_flatma
|
||||
|
||||
return $a_sitemap;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
# lists pages, which were referenced
|
||||
# but not yet written
|
||||
@@ -15,7 +15,7 @@ function ewiki_page_wantedpages($id, $data, $action) {
|
||||
while ($row = $result->get()) {
|
||||
if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$refs .= $row["refs"];
|
||||
}
|
||||
|
||||
@@ -27,17 +27,17 @@ function ewiki_page_wantedpages($id, $data, $action) {
|
||||
foreach ($refs as $id=>$exists) {
|
||||
if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!$exists && !strstr($id, "://") && strlen(trim($id))) {
|
||||
$wanted[] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
// to prevent empty <ul></ul> getting printed out, we have to interate twice.
|
||||
// once to make sure the <ul></ul> is needed at all.
|
||||
// once to make sure the <ul></ul> is needed at all.
|
||||
// MDL-7861, <ul></ul> does not validate.
|
||||
|
||||
$printul = false;
|
||||
|
||||
$printul = false;
|
||||
foreach ($wanted as $page) {
|
||||
$link = ewiki_link_regex_callback(array($page, $page));
|
||||
if (strstr($link, "?</a>")) {
|
||||
@@ -45,9 +45,9 @@ function ewiki_page_wantedpages($id, $data, $action) {
|
||||
}
|
||||
}
|
||||
#-- print out
|
||||
|
||||
|
||||
if ($printul) {
|
||||
$o .= "<ul>";
|
||||
$o .= "<ul>";
|
||||
foreach ($wanted as $page) {
|
||||
|
||||
$link = ewiki_link_regex_callback(array($page, $page));
|
||||
@@ -62,4 +62,4 @@ function ewiki_page_wantedpages($id, $data, $action) {
|
||||
return($o);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ function ewiki_notify_edit_hook($id, $data, &$hidden_postdata) {
|
||||
$mailto = ewiki_notify_links($data["content"], 0);
|
||||
|
||||
if (!count($mailto)) {
|
||||
return(false);
|
||||
return(false);
|
||||
}
|
||||
|
||||
#-- generate diff
|
||||
@@ -230,4 +230,3 @@ function ewiki_format_remove_notify(&$source) {
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -44,11 +44,11 @@ function ewiki_page_orphanedpages($id, $data, $action) {
|
||||
$refs = array_unique($refs);
|
||||
|
||||
#-- check pages to be referenced from somewhere
|
||||
foreach ($pages as $p) {
|
||||
foreach ($pages as $p) {
|
||||
if (!ewiki_in_array($p, $refs)) {
|
||||
if (!EWIKI_PROTECTED_MODE || EWIKI_PROTECTED_MODE_HIDING || ewiki_auth($p, $uu, "view")) {
|
||||
$orphaned[] = $p;
|
||||
}
|
||||
$orphaned[] = $p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,4 +59,4 @@ function ewiki_page_orphanedpages($id, $data, $action) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ function ewiki_page_index($id=0, $data=0, $action=0, $args=array()) {
|
||||
while ($row = $result->get()) {
|
||||
if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT) {
|
||||
if (!stristr($exclude, "\n".$row["id"]."\n")) {
|
||||
$sorted[] = $row["id"];
|
||||
@@ -41,4 +41,4 @@ function ewiki_page_index($id=0, $data=0, $action=0, $args=array()) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function ewiki_edit_patch($id, &$data) {
|
||||
"GET",
|
||||
array("id"=>$id, "version"=>$version)
|
||||
);
|
||||
if (!$base) {
|
||||
if (!$base) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ function ewiki_edit_patch($id, &$data) {
|
||||
fwrite($f, $base["content"]);
|
||||
fclose($f);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ function ewiki_edit_patch($id, &$data) {
|
||||
fwrite($f, $content);
|
||||
fclose($f);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
unlink($fn_base);
|
||||
return(false);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ function ewiki_edit_patch($id, &$data) {
|
||||
fwrite($f, $data["content"]);
|
||||
fclose($f);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
unlink($fn_base);
|
||||
unlink($fn_requ);
|
||||
return(false);
|
||||
@@ -87,4 +87,3 @@ function ewiki_edit_patch($id, &$data) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -124,4 +124,3 @@ function ewiki_dynamic_plugin_loader(&$id, &$data, &$action) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -19,7 +19,7 @@
|
||||
$headers[] or $ewiki_headers[] array.
|
||||
|
||||
If you define("EWIKI_SPAGES_DIR") then this directory will be read
|
||||
initially, but you could also just edit the following list/array of
|
||||
initially, but you could also just edit the following list/array of
|
||||
directories, or call ewiki_init_spages() yourself.
|
||||
*/
|
||||
|
||||
@@ -179,4 +179,4 @@ function ewiki_init_spages($dirs, $idprep="") {
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ function ewiki_database_moodle($action, &$args, $sw1, $sw2) {
|
||||
$versionsql = "AND version = :version";
|
||||
} else {
|
||||
$versionsql = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
# $result = mysql_query("SELECT * FROM " . EWIKI_DB_TABLE_NAME
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
//This function provides automatic linking to
|
||||
//wiki pages when its page title is found inside every Moodle text
|
||||
//It's based in the glosssary filter by Williams Castillo
|
||||
@@ -22,7 +22,7 @@
|
||||
if (!isset($cachedcourseid) || $cachedcourseid !== (int)$courseid) {
|
||||
$wikipagelist = array();
|
||||
$nothingtodo = false;
|
||||
}
|
||||
}
|
||||
$cachedcourseid = (int)$courseid;
|
||||
|
||||
if (!empty($nothingtodo)) { // We've been here in this page already
|
||||
@@ -44,7 +44,7 @@
|
||||
/// Walk through each wiki, and get entries.
|
||||
foreach ($wikis as $wiki) {
|
||||
if ($wiki_entries = wiki_get_entries($wiki)) {
|
||||
|
||||
|
||||
/// Walk through each entry and get the pages.
|
||||
foreach ($wiki_entries as $wiki_entry) {
|
||||
if ($wiki_pages = $DB->get_records('wiki_pages', array('wiki'=>$wiki_entry->id), 'pagename, version DESC')) {
|
||||
@@ -70,4 +70,4 @@
|
||||
return filter_phrases($text, $wikipagelist);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+1
-1
@@ -106,4 +106,4 @@
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+17
-17
@@ -18,7 +18,7 @@
|
||||
/**
|
||||
* Library of functions and constants for module wiki
|
||||
* (replace wiki with the name of your module and delete this line)
|
||||
*
|
||||
*
|
||||
* @package mod-wiki
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
@@ -110,7 +110,7 @@ function wiki_get_students($wiki, $groups='', $sort='u.lastaccess', $fields='u.*
|
||||
*/
|
||||
function wiki_add_instance($wiki) {
|
||||
global $DB;
|
||||
|
||||
|
||||
$wiki->timemodified = time();
|
||||
|
||||
# May have to add extra stuff in here #
|
||||
@@ -267,13 +267,13 @@ function wiki_user_complete($course, $user, $mod, $wiki) {
|
||||
*/
|
||||
function wiki_print_recent_activity($course, $isteacher, $timestart) {
|
||||
global $CFG, $DB, $OUTPUT;
|
||||
|
||||
|
||||
$sql = "SELECT l.*, cm.instance
|
||||
FROM {log} l JOIN {course_modules} cm ON l.cmid = cm.id
|
||||
WHERE l.time > ? AND l.course = ?
|
||||
FROM {log} l JOIN {course_modules} cm ON l.cmid = cm.id
|
||||
WHERE l.time > ? AND l.course = ?
|
||||
AND l.module = 'wiki' AND action LIKE 'edit%'
|
||||
ORDER BY l.time ASC";
|
||||
|
||||
|
||||
if (!$logs = $DB->get_records_sql($sql, array($timestart, $course->id))){
|
||||
return false;
|
||||
}
|
||||
@@ -523,7 +523,7 @@ function wiki_has_entries(&$wiki) {
|
||||
*/
|
||||
function wiki_get_entries(&$wiki, $byindex=NULL) {
|
||||
global $CFG, $DB;
|
||||
|
||||
|
||||
if ($byindex == 'student') {
|
||||
return $DB->get_records('wiki_entries', array('wikiid'=>$wiki->id), '',
|
||||
'userid,id,wikiid,course,groupid,pagename,timemodified');
|
||||
@@ -763,22 +763,22 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) {
|
||||
if (!empty($CFG->enablegroupings) && !empty($cm->groupingid)) {
|
||||
$groupingid = $wiki->groupingid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
switch ($wiki->wtype) {
|
||||
|
||||
case 'student':
|
||||
/// Get all the existing entries for this wiki.
|
||||
$wiki_entries = wiki_get_entries($wiki, 'student');
|
||||
|
||||
|
||||
if (!empty($CFG->enablegroupings) && !empty($wiki->groupingid)) {
|
||||
$sql = "SELECT gm.userid FROM {groups_members} gm " .
|
||||
"INNER JOIN {groupings_groups} gg ON gm.groupid = gg.groupid " .
|
||||
"WHERE gg.groupingid = ? ";
|
||||
|
||||
|
||||
$groupingmembers = $DB->get_records_sql($sql, array($wiki->groupingid));
|
||||
}
|
||||
|
||||
|
||||
if ($isteacher and (SITEID != $course->id)) {
|
||||
|
||||
/// If the user is an editing teacher, or a non-editing teacher not assigned to a group, show all student
|
||||
@@ -913,7 +913,7 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) {
|
||||
if (!empty($CFG->enablegroupings) && !empty($wiki->groupingid) && empty($groupingmembers[$wiki_entry->userid])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (($viewall === true) or groups_is_member($viewall, $wiki_entry->userid)) {
|
||||
$key = 'view.php?id='.$id.'&userid='.$wiki_entry->userid.'&page='.$wiki_entry->pagename;
|
||||
$wikis[$key] = fullname($wiki_entry).':'.$wiki_entry->pagename;
|
||||
@@ -934,7 +934,7 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) {
|
||||
|
||||
/// Get all the existing entries for this wiki.
|
||||
$wiki_entries = wiki_get_entries($wiki, 'group');
|
||||
|
||||
|
||||
if ($groupmode and ($isteacheredit or ($isteacher and !$mygroupid))) {
|
||||
if ($groups = groups_get_all_groups($course->id, null, $groupingid)) {
|
||||
$defpagename = empty($wiki->pagename) ? get_string('wikidefaultpagename', 'wiki') : $wiki->pagename;
|
||||
@@ -1096,7 +1096,7 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return $wikis;
|
||||
}
|
||||
|
||||
@@ -1519,7 +1519,7 @@ function wiki_print_wikilinks_block($cmid, $binary=false, $return=false) {
|
||||
if($binary) {
|
||||
$links["FileDownload"]=get_string("filedownload", "wiki");
|
||||
}
|
||||
|
||||
|
||||
$name = null;
|
||||
if (preg_match('/([a-zA-Z0-9\-_]*)=$/', EWIKI_SCRIPT, $matches)) {
|
||||
$name = $matches[1];
|
||||
@@ -1559,7 +1559,7 @@ function wiki_print_page_actions($cmid, $specialpages, $page, $action, $binary=f
|
||||
if($canedit && $binary && !in_array($page, $specialpages) && $action != "attachments") {
|
||||
$page["attachments/$page"]=get_string("attachments","wiki");
|
||||
}
|
||||
|
||||
|
||||
$name = null;
|
||||
if (preg_match('/([a-zA-Z0-9\-_]*)=$/', EWIKI_SCRIPT, $matches)) {
|
||||
$name = $matches[1];
|
||||
|
||||
@@ -87,4 +87,4 @@ class mod_wiki_mod_form extends moodleform_mod {
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Handles what happens when a user with appropriate permission attempts to
|
||||
* Handles what happens when a user with appropriate permission attempts to
|
||||
* override a wiki page editing lock.
|
||||
*
|
||||
* @copyright © 2006 The Open University
|
||||
@@ -49,4 +49,4 @@ $pagename=$actions[1];
|
||||
$DB->delete_records('wiki_locks', array('pagename'=>$pagename, 'wikiid'=>$wiki->id));
|
||||
|
||||
redirect("view.php?id=$id&page=".urlencode($page));
|
||||
?>
|
||||
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
<?PHP //$Id$
|
||||
<?php
|
||||
//This php script contains all the stuff to backup/restore
|
||||
//wiki mods
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
|
||||
function wiki_restore_files ($oldwikiid, $newwikiid, $oldentryid, $newentryid, $restore) {
|
||||
|
||||
global $CFG;
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
//First, locate course's moddata directory
|
||||
$moddata_path = $CFG->dataroot."/".$restore->course_id."/".$CFG->moddata;
|
||||
|
||||
|
||||
//Check it exists and create it
|
||||
$status = check_dir_exists($moddata_path,true);
|
||||
|
||||
@@ -275,13 +275,13 @@
|
||||
//wiki_decode_content_links_caller() function in each module
|
||||
//in the restore process
|
||||
function wiki_decode_content_links ($content,$restore) {
|
||||
|
||||
|
||||
global $CFG;
|
||||
|
||||
|
||||
$result = $content;
|
||||
|
||||
|
||||
//Link to the list of wikis
|
||||
|
||||
|
||||
$searchstring='/\$@(WIKIINDEX)\*([0-9]+)@\$/';
|
||||
//We look for it
|
||||
preg_match_all($searchstring,$content,$foundset);
|
||||
@@ -298,7 +298,7 @@
|
||||
if($rec->new_id) {
|
||||
//Now replace it
|
||||
$result= preg_replace($searchstring,$CFG->wwwroot.'/mod/wiki/index.php?id='.$rec->new_id,$result);
|
||||
} else {
|
||||
} else {
|
||||
//It's a foreign link so leave it as original
|
||||
$result= preg_replace($searchstring,$restore->original_wwwroot.'/mod/wiki/index.php?id='.$old_id,$result);
|
||||
}
|
||||
@@ -341,7 +341,7 @@
|
||||
function wiki_decode_content_links_caller($restore) {
|
||||
global $CFG, $DB;
|
||||
$status = true;
|
||||
|
||||
|
||||
//Process every wiki PAGE in the course
|
||||
if ($pages = $DB->get_records_sql("SELECT p.id, p.content
|
||||
FROM {wiki_pages} p, {wiki} w
|
||||
@@ -411,4 +411,4 @@
|
||||
|
||||
return $status;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
<?php
|
||||
die;
|
||||
?>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// Code fragment to define the version of Wiki
|
||||
@@ -9,4 +9,4 @@ $module->version = 2009042700; // The current module version (Date: YYYYMMDDXX
|
||||
$module->requires = 2009041700; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->cron = 3600; // Period for cron to check this module (secs)
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+1
-1
@@ -511,4 +511,4 @@ $strnojslockwarning
|
||||
';
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user