mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge branch '3.4' into 3
This commit is contained in:
commit
6022012481
@ -89,11 +89,12 @@ class Debug {
|
|||||||
*/
|
*/
|
||||||
public static function caller() {
|
public static function caller() {
|
||||||
$bt = debug_backtrace();
|
$bt = debug_backtrace();
|
||||||
$caller = $bt[2];
|
$caller = isset($bt[2]) ? $bt[2] : array();
|
||||||
$caller['line'] = $bt[1]['line'];
|
$caller['line'] = $bt[1]['line'];
|
||||||
$caller['file'] = $bt[1]['file'];
|
$caller['file'] = $bt[1]['file'];
|
||||||
if(!isset($caller['class'])) $caller['class'] = '';
|
if(!isset($caller['class'])) $caller['class'] = '';
|
||||||
if(!isset($caller['type'])) $caller['type'] = '';
|
if(!isset($caller['type'])) $caller['type'] = '';
|
||||||
|
if(!isset($caller['function'])) $caller['function'] = '';
|
||||||
return $caller;
|
return $caller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,10 +268,11 @@ However you might have several entries with the same `FirstName` and would like
|
|||||||
'LastName'=>'ASC'
|
'LastName'=>'ASC'
|
||||||
));
|
));
|
||||||
|
|
||||||
You can also sort randomly.
|
You can also sort randomly. Using the `DB` class, you can get the random sort method per database type.
|
||||||
|
|
||||||
:::php
|
:::php
|
||||||
$players = Player::get()->sort('RAND()')
|
$random = DB::get_conn()->random();
|
||||||
|
$players = Player::get()->sort($random)
|
||||||
|
|
||||||
|
|
||||||
## Filtering Results
|
## Filtering Results
|
||||||
|
@ -263,8 +263,8 @@
|
|||||||
},
|
},
|
||||||
openSelectDialog: function(uploadedFile) {
|
openSelectDialog: function(uploadedFile) {
|
||||||
// Create dialog and load iframe
|
// Create dialog and load iframe
|
||||||
var self = this, config = this.getConfig(), dialogId = 'ss-uploadfield-dialog-' + this.attr('id'), dialog = jQuery('#' + dialogId);
|
var self = this, config = this.getConfig(), dialogId = 'ss-uploadfield-dialog-' + this.attr('id'), dialog = $('#' + dialogId);
|
||||||
if(!dialog.length) dialog = jQuery('<div class="ss-uploadfield-dialog" id="' + dialogId + '" />');
|
if(!dialog.length) dialog = $('<div class="ss-uploadfield-dialog" id="' + dialogId + '" />');
|
||||||
|
|
||||||
// If user selected 'Choose another file', we need the ID of the file to replace
|
// If user selected 'Choose another file', we need the ID of the file to replace
|
||||||
var iframeUrl = config['urlSelectDialog'];
|
var iframeUrl = config['urlSelectDialog'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user