This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This class example is by no means complete. It simply functions as a data object | |
* but it lacks input sanitization, filtering, only have some kind of validation. | |
* If needed I would gladly work on a more complete example | |
* | |
* @throws EternalWow\Model\Exception | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.history.loadUrl = function(fragmentOverride) { | |
var fragment = this.fragment = this.getFragment(fragmentOverride).replace(/^.+\.php\/?/, ''); | |
var matched = _.any(this.handlers, function(handler) { | |
if (handler.route.test(fragment)) { | |
handler.callback(fragment); | |
return true; | |
} | |
}); | |
return matched; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
window.app = { | |
init: function() { | |
app.router = new app.Router(); | |
Backbone.history.loadUrl = function(fragmentOverride) { | |
var fragment = this.fragment = this.getFragment(fragmentOverride).replace(/^.+\.php\/?/, ''); | |
console.log('Navigated URL: '+fragment); | |
var matched = _.any(this.handlers, function(handler) { | |
if (handler.route.test(fragment)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function doModifyLimitQuery($query, $limit, $offset = null) | |
{ | |
if ($limit > 0) { | |
if ($offset == 0) { | |
$query = preg_replace('/^(SELECT\s(DISTINCT\s)?)/i', '\1TOP ' . $limit . ' ', $query); | |
$query = preg_replace('/FROM \(SELECT/i', 'FROM (SELECT TOP 2000000000', $query); | |
} else { | |
$orderby = stristr($query, 'ORDER BY'); |