Skip to content

Commit

Permalink
Added deprecation details to functions now in $DB
Browse files Browse the repository at this point in the history
  • Loading branch information
micaherne committed May 17, 2011
1 parent 39d106e commit 9affcd2
Showing 1 changed file with 60 additions and 30 deletions.
90 changes: 60 additions & 30 deletions lib/deprecatedlib.php
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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() {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9affcd2

Please sign in to comment.