From e763c273eba13a745fa48cb0ec9add9145776602 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 17 Mar 2012 19:27:13 +0100 Subject: [PATCH] MDL-29515 drop 1.9 xmldb classes and methods (deprecated since 2.0) --- lib/xmldb/xmldb_field.php | 22 ------------------- lib/xmldb/xmldb_index.php | 21 ------------------ lib/xmldb/xmldb_key.php | 22 ------------------- lib/xmldb/xmldb_table.php | 45 --------------------------------------- 4 files changed, 110 deletions(-) diff --git a/lib/xmldb/xmldb_field.php b/lib/xmldb/xmldb_field.php index cec73df60b4fe..a47f87e651478 100644 --- a/lib/xmldb/xmldb_field.php +++ b/lib/xmldb/xmldb_field.php @@ -60,17 +60,6 @@ function __construct($name, $type=null, $precision=null, $unsigned=null, $notnul $this->set_attributes($type, $precision, $unsigned, $notnull, $sequence, $default, $previous); } -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here - - function setAttributes($type, $precision=null, $unsigned=null, $notnull=null, $sequence=null, $enum=null, $enumvalues=null, $default=null, $previous=null) { - - debugging('XMLDBField->setAttributes() has been deprecated in Moodle 2.0. Will be out in Moodle 2.1. Please use xmldb_field->set_attributes() instead.', DEBUG_DEVELOPER); - - return $this->set_attributes($type, $precision, $unsigned, $notnull, $sequence, $default, $previous); - } -/// Deprecated API ends here - /** * Set all the attributes of one xmldb_field * @@ -748,14 +737,3 @@ function validateDefinition(xmldb_table $xmldb_table=null) { return null; } } - -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here -class XMLDBField extends xmldb_field { - - function __construct($name) { - parent::__construct($name); - } - -} -/// Deprecated API ends here diff --git a/lib/xmldb/xmldb_index.php b/lib/xmldb/xmldb_index.php index 5763a43440df0..8e02412d43c0f 100644 --- a/lib/xmldb/xmldb_index.php +++ b/lib/xmldb/xmldb_index.php @@ -57,16 +57,6 @@ function __construct($name, $type=null, $fields=array()) { return $this->set_attributes($type, $fields); } -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here - function setAttributes($type, $fields) { - - debugging('XMLDBIndex->setAttributes() has been deprecated in Moodle 2.0. Will be out in Moodle 2.1. Please use xmldb_index->set_attributes() instead.', DEBUG_DEVELOPER); - - return $this->set_attributes($type, $fields); - } -/// Deprecated API ends here - /** * Set all the attributes of one xmldb_index * @@ -356,14 +346,3 @@ function validateDefinition(xmldb_table $xmldb_table=null) { } } - -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here -class XMLDBIndex extends xmldb_index { - - function __construct($name) { - parent::__construct($name); - } - -} -/// Deprecated API ends here diff --git a/lib/xmldb/xmldb_key.php b/lib/xmldb/xmldb_key.php index 96c6091232fbc..de02a3f72d995 100644 --- a/lib/xmldb/xmldb_key.php +++ b/lib/xmldb/xmldb_key.php @@ -45,17 +45,6 @@ function __construct($name, $type=null, $fields=array(), $reftable=null, $reffie $this->set_attributes($type, $fields, $reftable, $reffields); } -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here - - function setAttributes($type, $fields, $reftable=null, $reffields=null) { - - debugging('XMLDBKey->setAttributes() has been deprecated in Moodle 2.0. Will be out in Moodle 2.1. Please use xmldb_key->set_attributes() instead.', DEBUG_DEVELOPER); - - return $this->set_attributes($type, $fields, $reftable, $reffields); - } -/// Deprecated API ends here - /** * Set all the attributes of one xmldb_key * @@ -469,14 +458,3 @@ function readableInfo() { return $o; } } - -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here -class XMLDBKey extends xmldb_key { - - function __construct($name) { - parent::__construct($name); - } - -} -/// Deprecated API ends here diff --git a/lib/xmldb/xmldb_table.php b/lib/xmldb/xmldb_table.php index 2267a7558c279..66148dfd752e6 100644 --- a/lib/xmldb/xmldb_table.php +++ b/lib/xmldb/xmldb_table.php @@ -704,17 +704,6 @@ function xmlOutput() { return $o; } -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here - function addFieldInfo($name, $type, $precision=null, $unsigned=null, $notnull=null, $sequence=null, $enum=null, $enumvalues=null, $default=null, $previous=null) { - - debugging('XMLDBTable->addFieldInfo() has been deprecated in Moodle 2.0. Will be out in Moodle 2.1. Please use xmldb_table->add_field() instead', DEBUG_DEVELOPER); - - return $this->add_field($name, $type, $precision, $unsigned, $notnull, $sequence, $default, $previous); - - } -/// Deprecated API ends here - /** * This function will add one new field to the table with all * its attributes defined @@ -735,18 +724,6 @@ function add_field($name, $type, $precision=null, $unsigned=null, $notnull=null, return $field; } -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here - - function addKeyInfo($name, $type, $fields, $reftable=null, $reffields=null) { - - debugging('XMLDBTable->addKeyInfo() has been deprecated in Moodle 2.0. Will be out in Moodle 2.1. Please use xmldb_table->add_key() instead', DEBUG_DEVELOPER); - - return $this->add_key($name, $type, $fields, $reftable, $reffields); - - } -/// Deprecated API ends here - /** * This function will add one new key to the table with all * its attributes defined @@ -762,17 +739,6 @@ function add_key($name, $type, $fields, $reftable=null, $reffields=null) { $this->addKey($key); } -/// TODO: Delete for 2.1 (deprecated in 2.0). -/// Deprecated API starts here - function addIndexInfo($name, $type, $fields) { - - debugging('XMLDBTable->addIndexInfo() has been deprecated in Moodle 2.0. Will be out in Moodle 2.1. Please use xmldb_table->add_index() instead', DEBUG_DEVELOPER); - - return $this->add_index($name, $type, $fields); - - } -/// Deprecated API ends here - /** * This function will add one new index to the table with all * its attributes defined @@ -830,14 +796,3 @@ function getAllErrors() { } } } - -/// TODO: Delete for 2.1 (deeprecated in 2.0). -/// Deprecated API starts here -class XMLDBTable extends xmldb_table { - - function __construct($name) { - parent::__construct($name); - } - -} -/// Deprecated API ends here