@@ -72,13 +72,13 @@ public function newAction()
72
72
{
73
73
$ model = $ this ->_initClientModel ();
74
74
$ formData = $ this ->_getFormData ();
75
-
75
+
76
76
if ($ formData ) {
77
77
$ model ->addData ($ formData );
78
78
} else {
79
79
$ model ->setSecret (Mage::helper ('oauth2 ' )->generateClientSecret ());
80
80
}
81
-
81
+
82
82
$ this ->_setFormData ($ formData ?: $ model ->getData ());
83
83
Mage::register ('current_oauth2_client ' , $ model );
84
84
@@ -198,11 +198,11 @@ protected function _filter(array $data)
198
198
foreach ($ fieldsToRemove as $ field ) {
199
199
unset($ data [$ field ]);
200
200
}
201
-
201
+
202
202
if (isset ($ data ['grant_types ' ])) {
203
203
$ data ['grant_types ' ] = implode (', ' , $ data ['grant_types ' ]);
204
204
}
205
-
205
+
206
206
return $ data ;
207
207
}
208
208
@@ -230,7 +230,7 @@ private function _loadModelById($model, $id)
230
230
$ this ->_redirect ('*/*/index ' );
231
231
return false ;
232
232
}
233
-
233
+
234
234
$ model ->load ($ id );
235
235
236
236
if (!$ model ->getId ()) {
@@ -257,7 +257,7 @@ private function _handleSaveException($e, $data = null)
257
257
$ message = $ e instanceof Mage_Core_Exception ? Mage::helper ('core ' )->escapeHtml ($ e ->getMessage ()) : $ this ->__ ('An error occurred on saving client data. ' );
258
258
$ this ->_getSession ()->addError ($ message );
259
259
$ this ->getRequest ()->setParam ('back ' , 'edit ' );
260
-
260
+
261
261
if ($ e instanceof Exception && !($ e instanceof Mage_Core_Exception)) {
262
262
Mage::logException ($ e );
263
263
}
@@ -276,4 +276,4 @@ private function _redirectAfterSave($model)
276
276
$ this ->_redirect ('*/*/index ' );
277
277
}
278
278
}
279
- }
279
+ }
0 commit comments