Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bacula Community Edition
Bacula Community
Commits
5fd1ef97
Commit
5fd1ef97
authored
Dec 09, 2022
by
Marcin Haba
Browse files
baculum: Add patch for offset parameter support in SQL queries
parent
ead6c5b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
gui/baculum/debian/patches/fix-offset-parameter-in-php-framework.patch
0 → 100644
View file @
5fd1ef97
From ed58d6bc276f5a3e1302d53f5fbc830b9816f8c1 Mon Sep 17 00:00:00 2001
From: Marcin Haba <marcin.haba@bacula.pl>
Date: Fri, 9 Dec 2022 13:30:34 +0100
Subject: [PATCH] baculum: Fix OFFSET parameter in PHP framework
Ticket in the PRADO framework GitHub project:
Support for OFFSET parameter without LIMIT clause in SQL query for TActiveRecord
https://github.com/pradosoft/prado/issues/819
---
.../pradosoft/prado/framework/Data/DataGateway/TSqlCriteria.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gui/baculum/protected/vendor/pradosoft/prado/framework/Data/DataGateway/TSqlCriteria.php b/gui/baculum/protected/vendor/pradosoft/prado/framework/Data/DataGateway/TSqlCriteria.php
index 4d0acc220d..07a20508a6 100644
--- a/gui/baculum/protected/vendor/pradosoft/prado/framework/Data/DataGateway/TSqlCriteria.php
+++ b/gui/baculum/protected/vendor/pradosoft/prado/framework/Data/DataGateway/TSqlCriteria.php
@@ -144,7 +144,7 @@
class TSqlCriteria extends \Prado\TComponent
// [LIMIT {[offset,] row_count | row_count OFFSET offset}]
// See: http://dev.mysql.com/doc/refman/5.0/en/select.html
- if (preg_match('/ORDER\s+BY\s+(.*?)(?=LIMIT)|ORDER\s+BY\s+(.*?)$/i', $value, $matches) > 0) {
+ if (preg_match('/ORDER\s+BY\s+(.*?)(?=\s+(?:LIMIT|OFFSET))|ORDER\s+BY\s+(.*?)$/i', $value, $matches) > 0) {
// condition contains ORDER BY
$value = str_replace($matches[0], '', $value);
if (strlen($matches[1]) > 0) {
--
2.35.3
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment