variable_del

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/bootstrap.inc, строка 483

Версии
5 – 6
variable_del($name)

Удаляет хранимую переменную.

Параметры

$name Имя удаляемой переменной.

▾ 35 функции вызывают variable_del()

aggregator_uninstall in modules/aggregator/aggregator.install
Реализация hook_uninstall().
color_scheme_form_submit in modules/color/color.module
Submit handler for color change form.
contact_uninstall in modules/contact/contact.install
Реализация hook_uninstall().
drupal_cron_cleanup in includes/common.inc
Shutdown function for cron cleanup.
drupal_cron_run in includes/common.inc
При вызове выполняет задачи cron
drupal_uninstall in modules/drupal/drupal.install
Реализация hook_uninstall().
example_profile_tasks in ./example.profile
Perform any final installation tasks for this profile.
forum_taxonomy in modules/forum/forum.module
Implementation of hook_taxonomy().
forum_uninstall in modules/forum/forum.install
Реализация hook_uninstall().
hook_node_type in developer/hooks/node.php
Позволяет модулям осуществлять действия при изменении типа нод.
hook_search in developer/hooks/core.php
Определяет пользовательскую функцию поиска.
hook_uninstall in developer/hooks/install.php
Служит для удаления таблиц и переменных модуля.
multipage_form_example_delete in developer/examples/multipage_form_example.module
Реализация hook_delete().
node_search in modules/node/node.module
Implementation of hook_search().
node_type_form_submit in modules/node/content_types.inc
Implementation of hook_form_submit().
profile_uninstall in modules/profile/profile.install
Реализация hook_uninstall().
search_uninstall in modules/search/search.install
Реализация hook_uninstall().
statistics_uninstall in modules/statistics/statistics.install
Реализация hook_uninstall().
system_settings_form_submit in modules/system/system.module
Execute the system_settings_form.
system_themes_submit in modules/system/system.module
system_theme_settings_submit in modules/system/system.module
system_update_1005 in modules/system/system.install
system_update_1014 in modules/system/system.install
system_update_1020 in modules/system/system.install
Change break tag back (was removed from head).
system_update_119 in modules/system/system.install
system_update_126 in modules/system/system.install
system_update_132 in modules/system/system.install
system_update_135 in modules/system/system.install
system_update_137 in modules/system/system.install
system_update_141 in modules/system/system.install
system_update_151 in modules/system/system.install
system_update_161 in modules/system/system.install
system_update_165 in modules/system/system.install
system_update_177 in modules/system/system.install
update_fix_schema_version in ./update.php
If the schema version for Drupal core is stored in the variables table (4.6.x and earlier) move it to the schema_version column of the system table.

Код

<?php
function variable_del($name) {
  global $conf;

  db_query("DELETE FROM {variable} WHERE name = '%s'", $name);
  cache_clear_all('variables', 'cache');

  unset($conf[$name]);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему