Permalink
Browse files

MDL-27538 Added deprecation details to functions now in $DB

  • Loading branch information...
1 parent 2e3a96e commit 936f6706c27262776cd427c8f4a3bdc923543ba4 @micaherne micaherne committed with Sam Hemelryk May 17, 2011
Showing with 60 additions and 30 deletions.
  1. +60 −30 lib/deprecatedlib.php
View
90 lib/deprecatedlib.php
@@ -1251,7 +1251,8 @@ function execute_sql($command, $feedback=true) {
error('execute_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->record_exists_select() instead
+ * @see moodle_database::record_exists_select()
* @param mixed $table
* @param mixed $select
* @return void Throws an error and does nothing
@@ -1260,15 +1261,17 @@ function record_exists_select($table, $select='') {
error('record_exists_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->record_exists_sql() instead
+ * @see moodle_database::record_exists_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
function record_exists_sql($sql) {
error('record_exists_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->count_records_select() instead
+ * @see moodle_database::count_records_select()
* @param mixed $table
* @param mixed $select
* @param mixed $countitem
@@ -1278,15 +1281,17 @@ function count_records_select($table, $select='', $countitem='COUNT(*)') {
error('count_records_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->count_records_sql() instead
+ * @see moodle_database::count_records_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
function count_records_sql($sql) {
error('count_records_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_record_sql() instead
+ * @see moodle_database::get_record_sql()
* @param mixed $sql
* @param bool $expectmultiple
* @param bool $nolimit
@@ -1296,7 +1301,8 @@ function get_record_sql($sql, $expectmultiple=false, $nolimit=false) {
error('get_record_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_record_select() instead
+ * @see moodle_database::get_record_select()
* @param mixed $table
* @param mixed $select
* @param mixed $fields
@@ -1306,7 +1312,8 @@ function get_record_select($table, $select='', $fields='*') {
error('get_record_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_recordset() instead
+ * @see moodle_database::get_recordset()
* @param mixed $table
* @param mixed $field
* @param mixed $value
@@ -1320,7 +1327,8 @@ function get_recordset($table, $field='', $value='', $sort='', $fields='*', $lim
error('get_recordset() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_recordset_sql() instead
+ * @see moodle_database::get_recordset_sql()
* @param mixed $sql
* @param mixed $limitfrom
* @param mixed $limitnum
@@ -1370,7 +1378,8 @@ function rs_close(&$rs) {
error('rs_close() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_select() instead
+ * @see moodle_database::get_records_select()
* @param mixed $table
* @param mixed $select
* @param mixed $sort
@@ -1383,7 +1392,8 @@ function get_records_select($table, $select='', $sort='', $fields='*', $limitfro
error('get_records_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_field_select() instead
+ * @see moodle_database::get_field_select()
* @param mixed $table
* @param mixed $return
* @param mixed $select
@@ -1393,15 +1403,17 @@ function get_field_select($table, $return, $select) {
error('get_field_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_field_sql() instead
+ * @see moodle_database::get_field_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
function get_field_sql($sql) {
error('get_field_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->delete_records_select() instead
+ * @see moodle_database::delete_records_select()
* @param mixed $sql
* @param mixed $select
* @return void Throws an error and does nothing
@@ -1487,7 +1499,8 @@ function execute_sql_arr($sqlarr, $continue=true, $feedback=true) {
error('execute_sql_arr() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_list() instead
+ * @see moodle_database::get_records_list()
* @param mixed $table
* @param mixed $field
* @param mixed $values
@@ -1501,7 +1514,8 @@ function get_records_list($table, $field='', $values='', $sort='', $fields='*',
error('get_records_list() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_recordset_list() instead
+ * @see moodle_database::get_recordset_list()
* @param mixed $table
* @param mixed $field
* @param mixed $values
@@ -1515,7 +1529,8 @@ function get_recordset_list($table, $field='', $values='', $sort='', $fields='*'
error('get_recordset_list() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_menu() instead
+ * @see moodle_database::get_records_menu()
* @param mixed $table
* @param mixed $field
* @param mixed $value
@@ -1529,7 +1544,8 @@ function get_records_menu($table, $field='', $value='', $sort='', $fields='*', $
error('get_records_menu() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_select_menu() instead
+ * @see moodle_database::get_records_select_menu()
* @param mixed $table
* @param mixed $select
* @param mixed $sort
@@ -1542,7 +1558,8 @@ function get_records_select_menu($table, $select='', $sort='', $fields='*', $lim
error('get_records_select_menu() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_sql_menu() instead
+ * @see moodle_database::get_records_sql_menu()
* @param mixed $sql
* @param mixed $limitfrom
* @param mixed $limitnum
@@ -1579,7 +1596,8 @@ function records_to_menu($records, $field1, $field2) {
error('records_to_menu() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->set_field_select() instead
+ * @see moodle_database::set_field_select()
* @param mixed $table
* @param mixed $newfield
* @param mixed $newvalue
@@ -1591,7 +1609,8 @@ function set_field_select($table, $newfield, $newvalue, $select, $localcall = fa
error('set_field_select() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_fieldset_select() instead
+ * @see moodle_database::get_fieldset_select()
* @param mixed $table
* @param mixed $return
* @param mixed $select
@@ -1601,15 +1620,17 @@ function get_fieldset_select($table, $return, $select) {
error('get_fieldset_select() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_fieldset_sql() instead
+ * @see moodle_database::get_fieldset_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
function get_fieldset_sql($sql) {
error('get_fieldset_sql() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->sql_like() instead
+ * @see moodle_database::sql_like()
* @return void Throws an error and does nothing
*/
function sql_ilike() {
@@ -1768,7 +1789,8 @@ function rollback_sql() {
error('rollback_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->insert_record() instead
+ * @see moodle_database::insert_record()
* @param mixed $table
* @param mixed $dataobject
* @param mixed $returnid
@@ -1779,7 +1801,8 @@ function insert_record($table, $dataobject, $returnid=true, $primarykey='id') {
error('insert_record() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->update_record() instead
+ * @see moodle_database::update_record()
* @param mixed $table
* @param mixed $dataobject
* @return void Throws an error and does nothing
@@ -1788,7 +1811,8 @@ function update_record($table, $dataobject) {
error('update_record() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records() instead
+ * @see moodle_database::get_records()
* @param mixed $table
* @param mixed $field
* @param mixed $value
@@ -1803,7 +1827,8 @@ function get_records($table, $field='', $value='', $sort='', $fields='*', $limit
error('get_records() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_record() instead
+ * @see moodle_database::get_record()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
@@ -1818,7 +1843,8 @@ function get_record($table, $field1, $value1, $field2='', $value2='', $field3=''
error('get_record() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->set_field() instead
+ * @see moodle_database::set_field()
* @param mixed $table
* @param mixed $newfield
* @param mixed $newvalue
@@ -1834,7 +1860,8 @@ function set_field($table, $newfield, $newvalue, $field1, $value1, $field2='', $
error('set_field() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->count_records() instead
+ * @see moodle_database::count_records()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
@@ -1848,7 +1875,8 @@ function count_records($table, $field1='', $value1='', $field2='', $value2='', $
error('count_records() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->record_exists() instead
+ * @see moodle_database::record_exists()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
@@ -1862,7 +1890,8 @@ function record_exists($table, $field1='', $value1='', $field2='', $value2='', $
error('record_exists() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->delete_records() instead
+ * @see moodle_database::delete_records()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
@@ -1876,7 +1905,8 @@ function delete_records($table, $field1='', $value1='', $field2='', $value2='',
error('delete_records() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_field() instead
+ * @see moodle_database::get_field()
* @param mixed $table
* @param mixed $return
* @param mixed $field1

0 comments on commit 936f670

Please sign in to comment.