Matching of type in SQL-Like improved
This commit is contained in:
parent
204695172f
commit
6cff7d762d
28 changed files with 1 additions and 1 deletions
0
LICENSE.md
Normal file → Executable file
0
LICENSE.md
Normal file → Executable file
0
README.md
Normal file → Executable file
0
README.md
Normal file → Executable file
0
amd/build/search.min.js
vendored
Normal file → Executable file
0
amd/build/search.min.js
vendored
Normal file → Executable file
0
amd/src/search.js
Normal file → Executable file
0
amd/src/search.js
Normal file → Executable file
0
classes/output/renderer.php
Normal file → Executable file
0
classes/output/renderer.php
Normal file → Executable file
0
classes/output/searchform.php
Normal file → Executable file
0
classes/output/searchform.php
Normal file → Executable file
0
classes/output/timetable.php
Normal file → Executable file
0
classes/output/timetable.php
Normal file → Executable file
|
@ -126,7 +126,7 @@ class timetable {
|
||||||
$day = new \DateTime($this->monday->format('Y-m-d\TH:i:sP'));
|
$day = new \DateTime($this->monday->format('Y-m-d\TH:i:sP'));
|
||||||
|
|
||||||
for ($i=0; $i<$this->numdayweek; $i++) {
|
for ($i=0; $i<$this->numdayweek; $i++) {
|
||||||
$sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')";
|
$sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a RLIKE '(^|~){$this->name}($|~)' OR {$this->type}b RLIKE '(^|~){$this->name}($|~)')";
|
||||||
if ($result = $DB->get_records_select('timetable_substitution',$sql)) {
|
if ($result = $DB->get_records_select('timetable_substitution',$sql)) {
|
||||||
foreach ($result as $substitution) {
|
foreach ($result as $substitution) {
|
||||||
$this->data[$i+1][$substitution->period]['substitution'][] = $substitution;
|
$this->data[$i+1][$substitution->period]['substitution'][] = $substitution;
|
||||||
|
|
0
db/access.php
Normal file → Executable file
0
db/access.php
Normal file → Executable file
0
db/install.php
Normal file → Executable file
0
db/install.php
Normal file → Executable file
0
db/install.xml
Normal file → Executable file
0
db/install.xml
Normal file → Executable file
0
db/services.php
Normal file → Executable file
0
db/services.php
Normal file → Executable file
0
db/uninstall.php
Normal file → Executable file
0
db/uninstall.php
Normal file → Executable file
0
db/upgrade.php
Normal file → Executable file
0
db/upgrade.php
Normal file → Executable file
0
externallib.php
Normal file → Executable file
0
externallib.php
Normal file → Executable file
0
index.php
Normal file → Executable file
0
index.php
Normal file → Executable file
0
lang/en/timetable.php
Normal file → Executable file
0
lang/en/timetable.php
Normal file → Executable file
0
lib.php
Normal file → Executable file
0
lib.php
Normal file → Executable file
0
mod_form.php
Normal file → Executable file
0
mod_form.php
Normal file → Executable file
0
pix/icon.png
Normal file → Executable file
0
pix/icon.png
Normal file → Executable file
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 745 B |
0
pix/icon.svg
Normal file → Executable file
0
pix/icon.svg
Normal file → Executable file
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
0
settings.php
Normal file → Executable file
0
settings.php
Normal file → Executable file
0
styles.css
Normal file → Executable file
0
styles.css
Normal file → Executable file
0
templates/searchform.mustache
Normal file → Executable file
0
templates/searchform.mustache
Normal file → Executable file
0
templates/searchresult.mustache
Normal file → Executable file
0
templates/searchresult.mustache
Normal file → Executable file
0
templates/timetable.mustache
Normal file → Executable file
0
templates/timetable.mustache
Normal file → Executable file
0
version.php
Normal file → Executable file
0
version.php
Normal file → Executable file
0
view.php
Normal file → Executable file
0
view.php
Normal file → Executable file
Loading…
Add table
Reference in a new issue