* Fix regression in authentication hook auto-creation on login
* (bug 8110) Allow spaces in ISBNs
* (bug 8024) Introduce "send me copies of emails I send to others" preference
+* Added 'EditPage::attemptSave' hook before an article is saved.
== Languages updated ==
$oldRev: Revision object of the "old" revision (may be null/invalid)
$newRev: Revision object of the "new" revision
+'EditPage::attemptSave': called before an article is
+saved, that is before insertNewArticle() is called
+&$editpage_Obj: the current EditPage object
+
'EditFormPreloadText': Allows population of the edit form when creating new pages
&$text: Text to preload with
&$title: Title object representing the page being created
wfProfileIn( $fname );
wfProfileIn( "$fname-checks" );
+ if( !wfRunHooks( 'EditPage::attemptSave', array( &$this ) ) )
+ {
+ wfDebug( "Hook 'EditPage::attemptSave' aborted article saving" );
+ return false;
+ }
+
# Reintegrate metadata
if ( $this->mMetaData != '' ) $this->textbox1 .= "\n" . $this->mMetaData ;
$this->mMetaData = '' ;
# If article is new, insert it.
$aid = $this->mTitle->getArticleID( GAID_FOR_UPDATE );
if ( 0 == $aid ) {
+
// Late check for create permission, just in case *PARANOIA*
if ( !$this->mTitle->userCanCreate() ) {
wfDebug( "$fname: no create permission\n" );