changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / edit / minor.php
1 <?php
2 /*
3    This provides a [x]-minor-edit checkbox, as seen in many other WikiWare,
4    which allows authors to prevent the current edit to show up on
5    RecentChanges. Such a "minor edit" (denoted by the _DB_F_MINOR flag)
6    will occoupy a full version entry in the database nevertheless (fully
7    revertable in all cases). The flag currently only affects UpdatedPages
8    and RecentChanges style plugins.
9 */
10
11 $ewiki_plugins["edit_form_append"][] = "ewiki_edit_minor";
12 $ewiki_plugins["edit_save"][] = "ewiki_edit_minor_save";
13
14 $ewiki_t["de"]["minor edit"] = "unbedeutende Ă„nderung";
15
16 function ewiki_edit_minor_save(&$save, &$old) {
17    $save["flags"] = $save["flags"] & (0xFFFF ^ EWIKI_DB_F_MINOR)
18                   | ($_REQUEST["page_minor_edit"] ? EWIKI_DB_F_MINOR : 0);
19 }
20
21 function ewiki_edit_minor($id, &$data, $action) {
22    return '<input type="checkbox" name="page_minor_edit" value="1" '
23       . ' id="page_minor_edit"><label for="page_minor_edit"> '
24       . ewiki_t('minor edit') . '</label><br />' . "\n";
25 }
26
27 ?>