BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
SaferEdit Class Reference
Inheritance diagram for SaferEdit:
Collaboration diagram for SaferEdit:

Public Member Functions

 onBeforePageDisplay (&$oOutputPage, &$oSkin)
 
 clearSaferEdit ($article, $user, $content, $summary, $minoredit, $watchthis, $sectionanchor, $flags, $revision)
 
 onStatebarAddSortTopVars (&$aSortTopVars)
 
 onStateBarBeforeTopViewAdd ($oStateBar, &$aTopViews, $oUser, $oTitle)
 
 getIntermediateEditsForCurrentTitle ($oTitle)
 
 setEditSection ($editPage)
 
 makeStateBarTopSomeoneEditing ($sUserName)
 
 onBsAdapterAjaxPingResult ($sRef, $aData, $iArticleId, $sTitle, $iNamespace, $iRevision, &$aSingleResult)
 
- Public Member Functions inherited from BsExtensionMW
 setCore ($oCore)
 
 getInfo ()
 
 setup ($sExtName="", $aConfig=array())
 
 setHook ($hook, $method=false, $bExecuteFirst=false)
 
 setContext (\IContextSource $context)
 
 setConfig (\Config $config)
 
 getResourcePath ()
 
 getName ()
 
 getExtensionKey ()
 
 getExtensionPath ()
 
 getImagePath ($bResources=false)
 
 getCacheKey ($sSubKey= 'default')
 
 makeTagExtensionDefinitions ()
 
- Public Member Functions inherited from BlueSpice\Extension
 jsonSerialize ()
 
 __construct (array $definition,\IContextSource $context,\Config $config)
 
 getInfo ()
 
 getResourcePath ()
 
 getExtensionPath ()
 
 getName ()
 
 getAuthors ()
 
 getStatus ()
 
 getPackage ()
 
 getUrl ()
 
 getVersion ()
 
 getExtensionKey ()
 
- Public Member Functions inherited from BlueSpice\Context
 __construct (\IContextSource $context,\Config $config)
 
 canUseWikiPage ()
 
 exportSession ()
 
 getConfig ()
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 
 getWikiPage ()
 
 msg ($key)
 

Static Public Member Functions

static getSchemaUpdates ($updater)
 
static saveUserEditing ($sUsername, $oTitle, $iSection=-1)
 

Protected Member Functions

 initExt ()
 
 doClearSaferEdit ($sUserName, $sPageTitle, $iPageNamespace)
 
- Protected Member Functions inherited from BsExtensionMW
 initExt ()
 

Additional Inherited Members

- Protected Attributes inherited from BsExtensionMW
 $mExtensionKey = null
 
 $mExtensionFile = null
 
 $mExtensionType = null
 
 $mInfo = null
 
 $mResourcePath = null
 
 $sName = ''
 
 $sStatus = ''
 
 $sPackage = ''
 
 $mCore = null
 
 $aStandardContext = array( '*', '*', '*' )
 
- Protected Attributes inherited from BlueSpice\Extension
 $extPath = ''
 
 $name = ''
 
 $authors = []
 
 $version = ''
 
 $url = ''
 
 $status = ''
 
 $package = ''
 
- Protected Attributes inherited from BlueSpice\Context
 $context = null
 
 $config = null
 

Member Function Documentation

SaferEdit::clearSaferEdit (   $article,
  $user,
  $content,
  $summary,
  $minoredit,
  $watchthis,
  $sectionanchor,
  $flags,
  $revision 
)

Clear all previously saved intermediate edits when article is saved Called by PageContentSaveComplete hook

Parameters
Article$articleThe article that is created.
User$userUser that saved the article.
Content$content
string$summaryEdit summary.
bool$minoreditMarked as minor.
bool$watchthisPut on watchlist.
int$sectionanchorNot in use any more.
int$flagsBitfield.
Revision$revisionNew revision object.
Returns
bool true do let other hooked methods be executed
SaferEdit::doClearSaferEdit (   $sUserName,
  $sPageTitle,
  $iPageNamespace 
)
protected

Actually delete all stored intermediate texts for a given user and page

Parameters
string$sUserNameusername of the user that edited a page
string$sPageTitletitle of the page
int$iPageNamespacenumber of the namespace
Returns
bool true do let other hooked methods be executed
SaferEdit::getIntermediateEditsForCurrentTitle (   $oTitle)

Loads intermediate edits

Parameters
Title$oTitle
Returns
array
static SaferEdit::getSchemaUpdates (   $updater)
static

Sets up required database tables

Parameters
DatabaseUpdater$updaterProvided by MediaWikis update.php
Returns
boolean Always true to keep the hook running
SaferEdit::initExt ( )
protected

Initialization of SaferEdit extension

SaferEdit::makeStateBarTopSomeoneEditing (   $sUserName)

Renders a note that someone is editing a page to the statebar

Parameters
string$sUserNamename of the user that is editing the page
Returns
ViewStateBarTopElement View that is to be displayed in StateBar Top
SaferEdit::onBeforePageDisplay ( $oOutputPage,
$oSkin 
)

Hook-Handler for MediaWiki 'BeforePageDisplay' hook. Sets context if needed.

Parameters
OutputPage$oOutputPage
Skin$oSkin
Returns
bool
SaferEdit::onBsAdapterAjaxPingResult (   $sRef,
  $aData,
  $iArticleId,
  $sTitle,
  $iNamespace,
  $iRevision,
$aSingleResult 
)

Hook-Handler for BS hook BsAdapterAjaxPingResult User $wgUser

Parameters
string$sRef
array$aData
integer$iArticleId
array$aSingleResult
Returns
boolean
SaferEdit::onStatebarAddSortTopVars ( $aSortTopVars)

Hook-Handler for Hook 'BSStatebarAddSortTopVars'

Parameters
array$aSortTopVars
Returns
boolean Always true to keep hook running
SaferEdit::onStateBarBeforeTopViewAdd (   $oStateBar,
$aTopViews,
  $oUser,
  $oTitle 
)

Hook-Handler for Hook 'BSStateBarBeforeTopViewAdd'

Parameters
StateBar$oStateBar
array$aTopViews
Returns
boolean Always true to keep hook running
static SaferEdit::saveUserEditing (   $sUsername,
  $oTitle,
  $iSection = -1 
)
static
Parameters
string$sText
string$sUsername
Title$oTitle
integer$iSection
Returns
boolean
SaferEdit::setEditSection (   $editPage)

Checks whether the current context is a section edit. Callback function for EditPage::showEditForm:initial hook.

Parameters
EditPage$editPage
Returns
bool true do let other hooked methods be executed

The documentation for this class was generated from the following file: