Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_db_pgsql.php @ 18:b631c1c7a3ce
More cleaning up more php8 Warnings/deprecations,
including _many_ ediff-based fixes on rcmail_output_html.php
| author | Charlie Root |
|---|---|
| date | Tue, 07 Oct 2025 11:20:40 -0400 |
| parents | 4681f974d28b |
| children | b6a96bdd6b29 |
comparison
equal
deleted
inserted
replaced
| 17:dd5ed6ef69c9 | 18:b631c1c7a3ce |
|---|---|
| 118 * | 118 * |
| 119 * @return string SQL function to use in query | 119 * @return string SQL function to use in query |
| 120 */ | 120 */ |
| 121 public function now($interval = 0) | 121 public function now($interval = 0) |
| 122 { | 122 { |
| 123 if ($interval) { | 123 $result = 'now()'; |
| 124 $add = ' ' . ($interval > 0 ? '+' : '-') . " interval '"; | 124 |
| 125 $add .= $interval > 0 ? intval($interval) : intval($interval) * -1; | 125 if ($interval) { |
| 126 $add .= " seconds'"; | 126 $result .= ' ' . ($interval > 0 ? '+' : '-') . " interval '"; |
| 127 } | 127 $result .= $interval > 0 ? intval($interval) : intval($interval) * -1; |
| 128 | 128 $result .= " seconds'"; |
| 129 return "now()" . $add; | 129 } |
| 130 | |
| 131 return $result; | |
| 130 } | 132 } |
| 131 | 133 |
| 132 /** | 134 /** |
| 133 * Return SQL statement for case insensitive LIKE | 135 * Return SQL statement for case insensitive LIKE |
| 134 * | 136 * |
