Location: Directly following
$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load || $preview) ? true : false;
, around line 41 in posting.phpParameters: $refresh
Explanation: The
$refresh
boolean variable determines whether to retain content on the posting form across submissions. For instance, if I hit Preview, the value of the message box is retained. If I added a new submit button for any other purpose and did not add it to the refresh condition, when I click it, I will lose whatever is contained in the message box (and other form elements).As a practical example, my topic prefixes extension needs to add a way to add prefixes on the posting screen, and I plan to do so by adding some more buttons, but I don't wish to lose the content of the post every time I wish to change the applied prefixes.
So basically, the extension would do something like:
$refresh = $refresh || isset($_POST['my_new_button']) || isset($_POST['my_other_new_button']);