mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Use FormatJson instead of json_* functions
Change-Id: Ic4eccb13429d4081153b5deb550ac33bf2bd687d
This commit is contained in:
parent
277bab8353
commit
4deb2cc1be
|
@ -507,7 +507,7 @@ class AbuseFilterViewEdit extends AbuseFilterView {
|
|||
}
|
||||
|
||||
// Add export
|
||||
$exportText = json_encode( array( 'row' => $row, 'actions' => $actions ) );
|
||||
$exportText = FormatJson::encode( array( 'row' => $row, 'actions' => $actions ) );
|
||||
$tools .= Xml::tags( 'a', array( 'href' => '#', 'id' => 'mw-abusefilter-export-link' ),
|
||||
$this->msg( 'abusefilter-edit-export' )->parse() );
|
||||
$tools .= Xml::element( 'textarea',
|
||||
|
@ -899,7 +899,7 @@ class AbuseFilterViewEdit extends AbuseFilterView {
|
|||
// Check for importing
|
||||
$import = $request->getVal( 'wpImportText' );
|
||||
if ( $import ) {
|
||||
$data = json_decode( $import );
|
||||
$data = FormatJson::decode( $import );
|
||||
|
||||
$importRow = $data->row;
|
||||
$actions = wfObjectToArray( $data->actions );
|
||||
|
|
Loading…
Reference in a new issue