1262feb53c0f3e819bd992f9d0f7bd08753eac2c
[atutor.git] / mods / wiki / plugins / edit / requirespassword.php
1 <?php
2 /*
3    This is a very light alternative to powering up the _PROTECTED_MODE.
4    It simply shows up a password dialog when you click on EditThisPage.
5    Either define("EWIKI_ADMIN_PW", "..."), edit "fragments/funcs/auth.php",
6    or add a "$passwords[...]=..." line here.
7 */
8
9 #-- you could comment out the first line here, then the password box would
10 #   popup first when saving an edited page
11 $ewiki_plugins["edit_hook"] =
12 $ewiki_plugins["edit_save"] = "ewiki_edit_requires_password";
13
14
15 function ewiki_edit_requires_password(&$uu1, &$uu2, &$uu3) {
16
17    #-- just set your password here
18    // with
19    // define("EWIKI_ADMIN_PW", "password");
20    // or
21    // $passwords["username"] = "password";
22
23    require(EWIKI_BASE_DIR."/fragments/funcs/auth.php");
24 }
25
26 ?>