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