mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-14974 improved columns caching implementation
This commit is contained in:
parent
aa07a81368
commit
a7544e377a
11 changed files with 36 additions and 44 deletions
|
@ -84,8 +84,6 @@ class database_manager {
|
|||
notify('<strong>' . get_string('error') . '</strong>');
|
||||
}
|
||||
|
||||
$this->mdb->reset_columns(); // Clear out the cache, just in case changes were made to table structures
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -150,8 +148,7 @@ class database_manager {
|
|||
}
|
||||
|
||||
/// Get list of fields in table
|
||||
$this->mdb->reset_columns($tablename); // better reset before testing
|
||||
$columns = $this->mdb->get_columns($tablename);
|
||||
$columns = $this->mdb->get_columns($tablename, false);
|
||||
|
||||
$exists = array_key_exists($fieldname, $columns);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue