| 5 bootstrap.inc | variable_set($name, $value) |
| 6 bootstrap.inc | variable_set($name, $value) |
| 7 bootstrap.inc | variable_set($name, $value) |
| 8 bootstrap.inc | variable_set($name, $value) |
Sets a persistent variable.
Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.
Parameters
$name: The name of the variable to set.
$value: The value to set. This can be any PHP data type; these functions take care of serialization as necessary.
See also
▾ 348 functions call variable_set()
- AccessDeniedTestCase::testAccessDenied in modules/
system/ system.test - ActionLoopTestCase::testActionLoop in modules/
simpletest/ tests/ actions.test - Set up a loop with 3 - 12 recursions, and see if it aborts properly.
- AggregatorRenderingTestCase::testFeedPage in modules/
aggregator/ aggregator.test - Create a feed and check that feed's page.
- aggregator_update_7001 in modules/
aggregator/ aggregator.install - Add aggregator teaser length to settings from old global default teaser length
- authorize_filetransfer_form_submit in includes/
authorize.inc - Form submission handler for authorize_filetransfer_form().
- BatchPageTestCase::testBatchProgressPageTheme in modules/
simpletest/ tests/ batch.test - Tests that the batch API progress page uses the correct theme.
- batch_test_stack in modules/
simpletest/ tests/ batch_test.module - Helper function: store or retrieve traced execution data.
- BlockCacheTestCase::setUp in modules/
block/ block.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- BlockCacheTestCase::testCacheGlobal in modules/
block/ block.test - Test DRUPAL_CACHE_GLOBAL.
- BlockCacheTestCase::testCachePerPage in modules/
block/ block.test - Test DRUPAL_CACHE_PER_PAGE.
- BlockCacheTestCase::testCachePerRole in modules/
block/ block.test - Test DRUPAL_CACHE_PER_ROLE.
- BlockCacheTestCase::testCachePerUser in modules/
block/ block.test - Test DRUPAL_CACHE_PER_USER.
- BlockCacheTestCase::testNoCache in modules/
block/ block.test - Test DRUPAL_NO_CACHE.
- BlockHiddenRegionTestCase::testBlockNotInHiddenRegion in modules/
block/ block.test - Tests that hidden regions do not inherit blocks when a theme is enabled.
- BlockHTMLIdTestCase::setUp in modules/
block/ block.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- BlockTestCase::testBlockRehash in modules/
block/ block.test - Test _block_rehash().
- block_update_7004 in modules/
block/ block.install - Add new blocks to new regions, migrate custom variables to blocks.
- blog_block_save in modules/
blog/ blog.module - Implements hook_block_save().
- book_block_save in modules/
book/ book.module - Implements hook_block_save().
- book_node_type_update in modules/
book/ book.module - Implements hook_node_type_update().
- BootstrapIPAddressTestCase::testIPAddressHost in modules/
simpletest/ tests/ bootstrap.test - test IP Address and hostname
- BootstrapPageCacheTestCase::testConditionalRequests in modules/
simpletest/ tests/ bootstrap.test - Test support for requests containing If-Modified-Since and If-None-Match headers.
- BootstrapPageCacheTestCase::testPageCache in modules/
simpletest/ tests/ bootstrap.test - Test cache headers.
- BootstrapPageCacheTestCase::testPageCompression in modules/
simpletest/ tests/ bootstrap.test - Test page compression.
- BootstrapVariableTestCase::testVariable in modules/
simpletest/ tests/ bootstrap.test - testVariable
- CacheClearCase::testClearArray in modules/
simpletest/ tests/ cache.test - Test clearing using an array.
- CacheTestCase::setupLifetime in modules/
simpletest/ tests/ cache.test - Setup the lifetime settings for caching.
- ColorTestCase::testValidColor in modules/
color/ color.test - Tests whether the provided color is valid.
- ColorTestCase::_testColor in modules/
color/ color.test - Tests the Color module functionality using the given theme.
- color_scheme_form_submit in modules/
color/ color.module - Form submission handler for color_scheme_form().
- CommentAnonymous::setUp in modules/
comment/ comment.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CommentHelperCase::setCommentSettings in modules/
comment/ comment.test - Set comment setting for article content type.
- CommentInterfaceTest::setEnvironment in modules/
comment/ comment.test - Re-configures the environment, module settings, and user permissions.
- CommentInterfaceTest::testCommentLinks in modules/
comment/ comment.test - Tests comment links.
- CommentInterfaceTest::testCommentNodeCommentStatistics in modules/
comment/ comment.test - Tests the node comment statistics.
- comment_block_save in modules/
comment/ comment.module - Implements hook_block_save().
- comment_update_7000 in modules/
comment/ comment.install - Rename comment display setting variables.
- comment_update_index in modules/
comment/ comment.module - Implements hook_update_index().
- common_test_cron_helper_cron in modules/
simpletest/ tests/ common_test_cron_helper.module - Implements hook_cron().
- ContactPersonalTestCase::setUp in modules/
contact/ contact.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- ContactPersonalTestCase::testPersonalContactFlood in modules/
contact/ contact.test - Tests the personal contact form flood protection.
- ContactSitewideTestCase::testSiteWideContact in modules/
contact/ contact.test - Tests configuration options and the site-wide contact form.
- contact_update_7000 in modules/
contact/ contact.install - Rename the threshold limit variable.
- CronRunTestCase::testAutomaticCron in modules/
system/ system.test - Ensure that the automatic cron run feature is working.
- DashboardBlocksTestCase::setUp in modules/
dashboard/ dashboard.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- dashboard_disable in modules/
dashboard/ dashboard.install - Implements hook_disable().
- DateTimeFunctionalTest::testTimeZoneHandling in modules/
system/ system.test - Test time zones and DST handling.
- DrupalDatabaseCache::clear in includes/
cache.inc - Implements DrupalCacheInterface::clear().
- DrupalDatabaseCache::garbageCollection in includes/
cache.inc - Garbage collection for get() and getMultiple().
- DrupalErrorHandlerUnitTest::testErrorHandler in modules/
simpletest/ tests/ error.test - Test the error handler.
- DrupalMatchPathTestCase::setUp in modules/
simpletest/ tests/ path.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- DrupalWebTestCase::setUp in modules/
simpletest/ drupal_web_test_case.php - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- drupal_build_css_cache in includes/
common.inc - Aggregates and optimizes CSS files into a cache file in the files directory.
- drupal_build_js_cache in includes/
common.inc - Aggregates JavaScript files into a cache file in the files directory.
- drupal_cron_run in includes/
common.inc - Executes a cron run when called.
- drupal_get_private_key in includes/
common.inc - Ensures the private key variable used to generate tokens is set.
- drupal_http_request in includes/
common.inc - Performs an HTTP request.
- drupal_path_alias_whitelist_rebuild in includes/
path.inc - Rebuild the path alias white list.
- EnableDisableTestCase::testEnableDisable in modules/
system/ system.test - Test that all core modules can be enabled, disabled and uninstalled.
- EnableDisableTestCase::testEntityInfoChanges in modules/
system/ system.test - Ensures entity info cache is updated after changes.
- entity_cache_test_watchdog in modules/
simpletest/ tests/ entity_cache_test.module - Implements hook_watchdog().
- example_form_submit in developer/
example.profile - Form API submit for the example form.
- example_profile_tasks in developer/
example.profile - Perform any final installation tasks for this profile.
- FeedParserTestCase::setUp in modules/
aggregator/ aggregator.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- FieldTestCase::setUp in modules/
field/ tests/ field.test - Set the default field storage backend for fields created during tests.
- FieldTranslationsTestCase::testFieldAvailableLanguages in modules/
field/ tests/ field.test - Ensures that only valid values are returned by field_available_languages().
- FieldTranslationsTestCase::testFieldDisplayLanguage in modules/
field/ tests/ field.test - Tests display language logic for translatable fields.
- field_attach_delete_bundle in modules/
field/ field.attach.inc - Notify field.module the a bundle was deleted.
- field_attach_rename_bundle in modules/
field/ field.attach.inc - Notify field.module that a bundle was renamed.
- field_bundle_settings in modules/
field/ field.module - Gets or sets administratively defined bundle settings.
- field_test_create_bundle in modules/
field/ tests/ field_test.entity.inc - Creates a new bundle for test_entity entities.
- field_test_delete_bundle in modules/
field/ tests/ field_test.entity.inc - Deletes a bundle for test_entity objects.
- field_test_rename_bundle in modules/
field/ tests/ field_test.entity.inc - Renames a bundle for test_entity entities.
- field_ui_field_attach_create_bundle in modules/
field_ui/ field_ui.module - Implements hook_field_attach_create_bundle().
- FileDirectoryTest::testFileDirectoryTemp in modules/
simpletest/ tests/ file.test - Ensure that the file_directory_temp() function always returns a value.
- FileDownloadTest::checkUrl in modules/
simpletest/ tests/ file.test - Download a file from the URL generated by file_create_url().
- FileNameMungingTest::testMungeIgnoreInsecure in modules/
simpletest/ tests/ file.test - If the allow_insecure_uploads variable evaluates to true, the file should come out untouched, no matter how evil the filename.
- FileNameMungingTest::testMunging in modules/
simpletest/ tests/ file.test - Create a file and munge/unmunge the name.
- FilePrivateTestCase::setUp in modules/
file/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- FileSaveUploadTest::testHandleDangerousFile in modules/
simpletest/ tests/ file.test - Test dangerous file handling.
- FileSaveUploadTest::testHandleFileMunge in modules/
simpletest/ tests/ file.test - Test file munge handling.
- FileURLRewritingTest::testPublicCreatedFileURL in modules/
simpletest/ tests/ file.test - Test the generating of rewritten public created file URLs.
- FileURLRewritingTest::testShippedFileURL in modules/
simpletest/ tests/ file.test - Test the generating of rewritten shipped file URLs.
- file_directory_temp in includes/
file.inc - Get the path of system-appropriate temporary directory.
- file_test_reset in modules/
simpletest/ tests/ file_test.module - Reset/initialize the history of calls to the file_* hooks.
- file_test_set_return in modules/
simpletest/ tests/ file_test.module - Assign a return value for a given operation.
- filter_install in modules/
filter/ filter.install - Implements hook_install().
- filter_update_7005 in modules/
filter/ filter.install - Integrate text formats with the user permissions system.
- FormatDateUnitTest::setUp in modules/
simpletest/ tests/ common.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- FormsArbitraryRebuildTestCase::setUp in modules/
simpletest/ tests/ form.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- forum_block_save in modules/
forum/ forum.module - Implements hook_block_save().
- forum_enable in modules/
forum/ forum.install - Implements hook_enable().
- forum_form_submit in modules/
forum/ forum.admin.inc - Process forum form and container form submissions.
- forum_install in modules/
forum/ forum.install - Implements hook_install().
- forum_taxonomy_term_delete in modules/
forum/ forum.module - Implements hook_taxonomy_term_delete().
- FrontPageTestCase::setUp in modules/
system/ system.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- HookBootExitTestCase::testHookBootExit in modules/
simpletest/ tests/ bootstrap.test - Test calling of hook_boot() and hook_exit().
- hook_block_save in modules/
block/ block.api.php - Save the configuration options from hook_block_configure().
- hook_cron in modules/
system/ system.api.php - Perform periodic actions.
- hook_field_attach_create_bundle in modules/
field/ field.api.php - Act on field_attach_create_bundle().
- hook_field_attach_delete_bundle in modules/
field/ field.api.php - Act on field_attach_delete_bundle.
- hook_field_attach_rename_bundle in modules/
field/ field.api.php - Act on field_attach_rename_bundle().
- hook_image_style_delete in modules/
image/ image.api.php - Respond to image style deletion.
- hook_image_style_save in modules/
image/ image.api.php - Respond to image style updating.
- hook_menu_delete in modules/
menu/ menu.api.php - Informs modules that a custom menu was deleted.
- hook_menu_insert in modules/
menu/ menu.api.php - Informs modules that a custom menu was created.
- hook_menu_update in modules/
menu/ menu.api.php - Informs modules that a custom menu was updated.
- hook_modules_installed in modules/
system/ system.api.php - Perform necessary actions after modules are installed.
- hook_node_type_update in modules/
node/ node.api.php - Respond to node type updates.
- hook_taxonomy_vocabulary_insert in modules/
taxonomy/ taxonomy.api.php - Act on taxonomy vocabularies when inserted.
- hook_taxonomy_vocabulary_update in modules/
taxonomy/ taxonomy.api.php - Act on taxonomy vocabularies when updated.
- hook_update_index in modules/
search/ search.api.php - Update the search index for this module.
- ImageStylesPathAndUrlUnitTest::_testImageStyleUrlAndPath in modules/
image/ image.test - Test image_style_url().
- image_system_file_system_settings_submit in modules/
image/ image.module - Submit handler for the file system settings form.
- image_test_reset in modules/
simpletest/ tests/ image_test.module - Reset/initialize the history of calls to the toolkit functions.
- install_configure_form_submit in includes/
install.core.inc - Forms API submit for the site configuration form.
- install_finished in includes/
install.core.inc - Installation task; perform final steps and display a 'finished' page.
- install_import_locales in includes/
install.core.inc - Installation task; import languages via a batch process.
- install_run_task in includes/
install.core.inc - Runs an individual installation task.
- install_run_tasks in includes/
install.core.inc - Runs all tasks for the current installation request.
- install_system_module in includes/
install.core.inc - Installation task; install the Drupal system module.
- JavaScriptTestCase::setUp in modules/
simpletest/ tests/ common.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- JavaScriptTestCase::tearDown in modules/
simpletest/ tests/ common.test - Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.
- language_negotiation_set in includes/
language.inc - Save a list of language providers.
- language_types_disable in includes/
language.inc - Disable the given language types.
- language_types_set in includes/
language.inc - Updates the language type configuration.
- LocaleCommentLanguageFunctionalTest::setUp in modules/
locale/ locale.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- LocaleLanguageNegotiationInfoFunctionalTest::testInfoAlterations in modules/
locale/ locale.test - Tests alterations to language types/negotiation info.
- LocaleUILanguageNegotiationTest::runTest in modules/
locale/ locale.test - LocaleUILanguageNegotiationTest::testUILanguageNegotiation in modules/
locale/ locale.test - Tests for language switching by URL path.
- LocaleUninstallFunctionalTest::testUninstallProcess in modules/
locale/ locale.test - Check if the values of the Locale variables are correct after uninstall.
- LocaleUpgradePathTestCase::testLocaleUpgradeDomain in modules/
simpletest/ tests/ upgrade/ upgrade.locale.test - Test an upgrade with domain-based negotiation.
- LocaleUpgradePathTestCase::testLocaleUpgradePathDefault in modules/
simpletest/ tests/ upgrade/ upgrade.locale.test - Test an upgrade with path-based negotiation.
- LocaleUpgradePathTestCase::testLocaleUpgradePathFallback in modules/
simpletest/ tests/ upgrade/ upgrade.locale.test - Test an upgrade with path-based (with fallback) negotiation.
- LocaleUserCreationTest::setUp in modules/
locale/ locale.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- locale_add_language in includes/
locale.inc - API function to add a language.
- locale_js_alter in modules/
locale/ locale.module - Implements hook_js_alter().
- locale_languages_configure_form_submit in modules/
locale/ locale.admin.inc - Submit handler for language negotiation settings.
- locale_languages_delete_form_submit in modules/
locale/ locale.admin.inc - Process language deletion submissions.
- locale_languages_edit_form_submit in modules/
locale/ locale.admin.inc - Process the language editing form submission.
- locale_languages_overview_form_submit in modules/
locale/ locale.admin.inc - Process language overview form submissions, updating existing languages.
- locale_test_store_language_negotiation in modules/
locale/ tests/ locale_test.module - Store the last negotiated languages.
- locale_update_7001 in modules/
locale/ locale.install - Upgrade language negotiation settings.
- locale_update_7003 in modules/
locale/ locale.install - Update "language_count" variable.
- MailTestCase::setUp in modules/
simpletest/ tests/ mail.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- MenuBreadcrumbTestCase::testBreadCrumbs in modules/
simpletest/ tests/ menu.test - Tests breadcrumbs on node and administrative paths.
- MenuRebuildTestCase::testMenuRebuildByVariable in modules/
simpletest/ tests/ menu.test - Test if the 'menu_rebuild_needed' variable triggers a menu_rebuild() call.
- MenuRouterTestCase::setUp in modules/
simpletest/ tests/ menu.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- MenuRouterTestCase::testHookCustomTheme in modules/
simpletest/ tests/ menu.test - Test that hook_custom_theme() can control the theme of a page.
- MenuRouterTestCase::testMaintenanceModeLoginPaths in modules/
simpletest/ tests/ menu.test - Make sure the maintenance mode can be bypassed using hook_menu_site_status_alter().
- MenuRouterTestCase::testMenuGetItemNoAncestors in modules/
simpletest/ tests/ menu.test - Test menu_get_item() with empty ancestors.
- MenuRouterTestCase::testMenuItemTitlesCases in modules/
simpletest/ tests/ menu.test - Tests the possible ways to set the title for menu items. Also tests that menu item titles work with string overrides.
- MenuRouterTestCase::testThemeCallbackHookCustomTheme in modules/
simpletest/ tests/ menu.test - Test that the theme callback wins out over hook_custom_theme().
- MenuRouterTestCase::testThemeCallbackMaintenanceMode in modules/
simpletest/ tests/ menu.test - Test the theme callback when the site is in maintenance mode.
- MenuTrailTestCase::testMenuTreeSetPath in modules/
simpletest/ tests/ menu.test - Tests active trails are properly affected by menu_tree_set_path().
- menu_delete in modules/
menu/ menu.module - Delete a custom menu and all contained links.
- menu_rebuild in includes/
menu.inc - (Re)populate the database tables used by various menu functions.
- menu_save in modules/
menu/ menu.module - Save a custom menu.
- menu_update_7000 in modules/
menu/ menu.install - Migrate the "Default menu for content" setting to individual node types.
- menu_update_7001 in modules/
menu/ menu.install - Rename "Primary Links" and "Secondary Links" to their Drupal 7 equivalents.
- menu_update_7003 in modules/
menu/ menu.install - Add missing custom menus to active menus list.
- minimal_install in profiles/
minimal/ minimal.install - Implements hook_install().
- ModuleDependencyTestCase::testModuleEnableOrder in modules/
system/ system.test - Tests that module dependencies are enabled in the correct order via the UI. Dependencies should be enabled before their dependents.
- ModuleUnitTest::testDependencyResolution in modules/
simpletest/ tests/ module.test - Test dependency resolution.
- ModuleVersionTestCase::testModuleVersions in modules/
system/ system.test - Test version dependencies.
- module_test_modules_disabled in modules/
simpletest/ tests/ module_test.module - Implements hook_modules_disabled().
- module_test_modules_enabled in modules/
simpletest/ tests/ module_test.module - Implements hook_modules_enabled().
- module_test_modules_uninstalled in modules/
simpletest/ tests/ module_test.module - Implements hook_modules_uninstalled().
- NewDefaultThemeBlocks::testNewDefaultThemeBlocks in modules/
block/ block.test - Check the enabled Bartik blocks are correctly copied over.
- NodeAccessBaseTableTestCase::setUp in modules/
node/ node.test - Enable modules and create user with specific permissions.
- NodeQueryAlter::testNodeQueryAlterOverride in modules/
node/ node.test - Lower-level test of 'node_access' query alter override.
- node_access_needs_rebuild in modules/
node/ node.module - Flag / unflag the node access grants for rebuilding, or read the current value of the flag.
- node_block_save in modules/
node/ node.module - Implements hook_block_save().
- node_type_form_submit in modules/
node/ content_types.inc - Form submission handler for node_type_form().
- node_update_7004 in modules/
node/ node.install - Extend the existing default preview and teaser settings to all node types.
- OpenIDFunctionalTestCase::addIdentity in modules/
openid/ openid.test - Add OpenID identity to user's profile.
- OpenIDFunctionalTestCase::addRedirectedIdentity in modules/
openid/ openid.test - Add OpenID identity, changed by the following redirects, to user's profile.
- OpenIDFunctionalTestCase::testDiscovery in modules/
openid/ openid.test - Test discovery of OpenID Provider Endpoint via Yadis and HTML.
- OpenIDFunctionalTestCase::testLoginMaintenanceMode in modules/
openid/ openid.test - Test login using OpenID during maintenance mode.
- OpenIDFunctionalTestCase::testSignatureValidation in modules/
openid/ openid.test - Tests that openid.signed is verified.
- OpenIDInvalidIdentifierTransitionTestCase::setUp in modules/
openid/ openid.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- OpenIDInvalidIdentifierTransitionTestCase::testStrippedFragmentAccountAutoUpdateSreg in modules/
openid/ openid.test - Test OpenID auto transition with e-mail.
- OpenIDInvalidIdentifierTransitionTestCase::testStrippedFragmentAccountEmailMismatch in modules/
openid/ openid.test - Test OpenID transition with e-mail mismatch.
- OpenIDRegistrationTestCase::setUp in modules/
openid/ openid.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- OpenIDRegistrationTestCase::testRegisterUserWithAXButNoSREG in modules/
openid/ openid.test - Test OpenID auto-registration with a provider that supplies AX information, but no SREG.
- OpenIDRegistrationTestCase::testRegisterUserWithEmailVerification in modules/
openid/ openid.test - Test OpenID auto-registration with e-mail verification enabled.
- OpenIDRegistrationTestCase::testRegisterUserWithInvalidSreg in modules/
openid/ openid.test - Test OpenID auto-registration with a provider that supplies invalid SREG information (a username that is already taken, and no e-mail address).
- OpenIDRegistrationTestCase::testRegisterUserWithoutEmailVerification in modules/
openid/ openid.test - Test OpenID auto-registration with e-mail verification disabled.
- openid_test_install in modules/
openid/ tests/ openid_test.install - Implements hook_install().
- PagePreviewTestCase::testPagePreviewWithRevisions in modules/
node/ node.test - Check the node preview functionality, when using revisions.
- PasswordHashingTest::testPasswordHashing in modules/
simpletest/ tests/ password.test - Test password hashing.
- PathLanguageTestCase::testAliasTranslation in modules/
path/ path.test - Test alias functionality through the admin interfaces.
- PollVoteCheckHostname::setUp in modules/
poll/ poll.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- ProfileTestCase::setUp in modules/
profile/ profile.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- ProfileTestDate::testProfileDateField in modules/
profile/ profile.test - Create a date field, give it a value, update and delete the field.
- profile_block_save in modules/
profile/ profile.module - Implements hook_block_save().
- RemoteFileDirectoryTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileSaveUploadTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileScanDirectoryTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileUnmanagedCopyTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileUnmanagedDeleteRecursiveTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileUnmanagedDeleteTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileUnmanagedMoveTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- RemoteFileUnmanagedSaveDataTest::setUp in modules/
simpletest/ tests/ file.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- SearchCommentTestCase::testSearchResultsComment in modules/
search/ search.test - Verify that comments are rendered using proper format in search results.
- SearchCommentTestCase::testSearchResultsCommentAccess in modules/
search/ search.test - Verify access rules for comment indexing with different permissions.
- SearchEmbedForm::setUp in modules/
search/ search.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- SearchKeywordsConditions::setUp in modules/
search/ search.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- SearchMatchTestCase::_setup in modules/
search/ search.test - Set up a small index of items to test against.
- SearchPageOverride::setUp in modules/
search/ search.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- SearchRankingTestCase::testDoubleRankings in modules/
search/ search.test - Verifies that if we combine two rankings, search still works.
- SearchRankingTestCase::testHTMLRankings in modules/
search/ search.test - Test rankings of HTML tags.
- SearchRankingTestCase::testRankings in modules/
search/ search.test - SearchTokenizerTestCase::testNoTokenizer in modules/
search/ search.test - Verifies that strings of non-CJK characters are not tokenized.
- SearchTokenizerTestCase::testTokenizer in modules/
search/ search.test - Verifies that strings of CJK characters are tokenized.
- search_admin_settings_submit in modules/
search/ search.admin.inc - Form submission handler for search_admin_settings().
- search_embedded_form_form_submit in modules/
search/ tests/ search_embedded_form.module - Submit handler for search_embedded_form_form().
- SessionHttpsTestCase::testHttpsSession in modules/
simpletest/ tests/ session.test - SessionTestCase::testEmptyAnonymousSession in modules/
simpletest/ tests/ session.test - Test that empty anonymous sessions are destroyed.
- SessionTestCase::testSessionWrite in modules/
simpletest/ tests/ session.test - Test that sessions are only saved when necessary.
- ShortcutLinksTestCase::testNoShortcutLink in modules/
shortcut/ shortcut.test - Tests that the add shortcut link is not displayed for 404/403 errors.
- SimpleTestBrowserTestCase::setUp in modules/
simpletest/ simpletest.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- SimpleTestBrowserTestCase::testGetAbsoluteUrl in modules/
simpletest/ simpletest.test - Test DrupalWebTestCase::getAbsoluteUrl().
- SimpleTestFunctionalTest::testInternalBrowser in modules/
simpletest/ simpletest.test - Test the internal browsers functionality.
- standard_install in profiles/
standard/ standard.install - Implements hook_install().
- StatisticsAdminTestCase::testDeleteNode in modules/
statistics/ statistics.test - Tests that when a node is deleted, the node counter is deleted too.
- StatisticsAdminTestCase::testDeleteUser in modules/
statistics/ statistics.test - Tests that accesslog reflects when a user is deleted.
- StatisticsAdminTestCase::testExpiredLogs in modules/
statistics/ statistics.test - Tests that cron clears day counts and expired access logs.
- StatisticsLoggingTestCase::setUp in modules/
statistics/ statistics.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- StatisticsTestCase::setUp in modules/
statistics/ statistics.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- statistics_block_save in modules/
statistics/ statistics.module - Implements hook_block_save().
- statistics_cron in modules/
statistics/ statistics.module - Implements hook_cron().
- statistics_update_index in modules/
statistics/ statistics.module - Implements hook_update_index().
- StreamWrapperTest::testUriFunctions in modules/
simpletest/ tests/ file.test - Test the URI and target functions.
- SystemAuthorizeCase::setUp in modules/
system/ system.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- SystemBlockTestCase::testSystemBlocks in modules/
system/ system.test - Test displaying and hiding the powered-by and help blocks.
- SystemThemeFunctionalTest::testAdministrationTheme in modules/
system/ system.test - Test the administration theme functionality.
- system_add_date_format_type_form_submit in modules/
system/ system.admin.inc - Process system_add_date_format_type form submissions.
- system_check_http_request in modules/
system/ system.module - Checks whether the server is capable of issuing HTTP requests.
- system_image_toolkit_settings in modules/
system/ system.admin.inc - Form builder; Configure site image toolkit usage.
- system_install in modules/
system/ system.install - Implements hook_install().
- system_settings_form_submit in modules/
system/ system.module - Execute the system_settings_form.
- system_test_system_info_alter in modules/
simpletest/ tests/ system_test.module - Implements hook_system_info_alter().
- system_themes_admin_form_submit in modules/
system/ system.admin.inc - Process system_themes_admin_form form submissions.
- system_theme_default in modules/
system/ system.admin.inc - Menu callback; Set the default theme.
- system_theme_settings_submit in modules/
system/ system.admin.inc - Process system_theme_settings form submissions.
- system_update_7001 in modules/
system/ system.install - Generate a cron key and save it in the variables table.
- system_update_7004 in modules/
system/ system.install - Remove hardcoded numeric deltas from all blocks in core.
- system_update_7009 in modules/
system/ system.install - Rename the variable for primary links.
- system_update_7013 in modules/
system/ system.install - Convert default time zone offset to default time zone name.
- system_update_7017 in modules/
system/ system.install - Change the theme setting 'toggle_node_info' into a per content type variable.
- system_update_7033 in modules/
system/ system.install - Move CACHE_AGGRESSIVE to CACHE_NORMAL.
- system_update_7034 in modules/
system/ system.install - Migrate the file path settings and create the new {file_managed} table.
- system_update_7046 in modules/
system/ system.install - Switch from the Minnelli theme if it is the default or admin theme.
- system_update_7047 in modules/
system/ system.install - Normalize the front page path variable.
- system_update_7049 in modules/
system/ system.install - Rename 'Default' profile to 'Standard.'
- system_update_7066 in modules/
system/ system.install - Migrate the 'file_directory_temp' variable.
- TaxonomyThemeTestCase::setUp in modules/
taxonomy/ taxonomy.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- TestingMailSystem::mail in modules/
system/ system.mail.inc - Accept an e-mail message and store it in a variable.
- testing_install in profiles/
testing/ testing.install - Implements hook_install().
- ThemeUnitTest::testCSSOverride in modules/
simpletest/ tests/ theme.test - Ensures a theme's .info file is able to override a module CSS file from being added to the page.
- ThemeUnitTest::testThemeSuggestions in modules/
simpletest/ tests/ theme.test - Test function theme_get_suggestions() for SA-CORE-2009-003.
- TokenReplaceTestCase::testSystemSiteTokenReplacement in modules/
system/ system.test - Tests the generation of all system site information tokens.
- TrackerTest::setUp in modules/
tracker/ tracker.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- TrackerTest::testTrackerCronIndexing in modules/
tracker/ tracker.test - Test that existing nodes are indexed by cron.
- tracker_cron in modules/
tracker/ tracker.module - Implements hook_cron().
- tracker_enable in modules/
tracker/ tracker.install - Implements hook_enable().
- tracker_update_7000 in modules/
tracker/ tracker.install - Create new tracker_node and tracker_user tables.
- TriggerOtherTestCase::testActionsComment in modules/
trigger/ trigger.test - Tests triggering on comment save.
- TriggerOtherTestCase::testActionsTaxonomy in modules/
trigger/ trigger.test - Tests triggering on taxonomy new term.
- TriggerOtherTestCase::testActionsUser in modules/
trigger/ trigger.test - Tests triggering on user create and user login.
- TriggerUserTokenTestCase::testUserTriggerTokenReplacement in modules/
trigger/ trigger.test - Tests a variety of token replacements in actions.
- trigger_test_generic_action in modules/
trigger/ tests/ trigger_test.module - Action fired during the "taxonomy", "comment", and "user" trigger tests.
- trigger_test_generic_any_action in modules/
trigger/ tests/ trigger_test.module - Action fired during the additional trigger tests.
- trigger_test_system_cron_action in modules/
trigger/ tests/ trigger_test.module - Action fired during the "cron run" trigger test.
- trigger_test_system_cron_conf_action in modules/
trigger/ tests/ trigger_test.module - Implement a configurable Drupal action.
- UpdateCoreTestCase::setSystemInfo7_0 in modules/
update/ update.test - UpdateCoreTestCase::testDatestampMismatch in modules/
update/ update.test - Ensure proper results where there are date mismatches among modules.
- UpdateCoreTestCase::testModulePageRegularUpdate in modules/
update/ update.test - Check the messages at admin/modules when missing an update.
- UpdateCoreTestCase::testModulePageRunCron in modules/
update/ update.test - Check that running cron updates the list of available updates.
- UpdateCoreTestCase::testModulePageSecurityUpdate in modules/
update/ update.test - Check the messages at admin/modules when missing a security update.
- UpdateCoreTestCase::testModulePageUpToDate in modules/
update/ update.test - Check the messages at admin/modules when the site is up to date.
- UpdateScriptFunctionalTest::testRequirements in modules/
system/ system.test - Tests that requirements warnings and errors are correctly displayed.
- UpdateTestContribCase::testHookUpdateStatusAlter in modules/
update/ update.test - Check that hook_update_status_alter() works to change a status.
- UpdateTestContribCase::testNoReleasesAvailable in modules/
update/ update.test - Tests when there is no available release data for a contrib module.
- UpdateTestContribCase::testUpdateBaseThemeSecurityUpdate in modules/
update/ update.test - Test that subthemes are notified about security updates for base themes.
- UpdateTestContribCase::testUpdateBrokenFetchURL in modules/
update/ update.test - Make sure that if we fetch from a broken URL, sane things happen.
- UpdateTestContribCase::testUpdateContribBasic in modules/
update/ update.test - Test the basic functionality of a contrib module on the status report.
- UpdateTestContribCase::testUpdateContribOrder in modules/
update/ update.test - Test that contrib projects are ordered by project name.
- UpdateTestContribCase::testUpdateShowDisabledThemes in modules/
update/ update.test - Test that disabled themes are only shown when desired.
- UpdateTestHelper::refreshUpdateStatus in modules/
update/ update.test - Refresh the update status based on the desired available update scenario.
- UpdateTestUploadCase::setUp in modules/
update/ update.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- UpdateTestUploadCase::testUpdateManagerCoreSecurityUpdateMessages in modules/
update/ update.test - Check the messages on Update manager pages when missing a security update.
- update_authorize_install_batch_finished in modules/
update/ update.authorize.inc - Batch callback for when the authorized install batch is finished.
- update_authorize_update_batch_finished in modules/
update/ update.authorize.inc - Batch callback for when the authorized update batch is finished.
- update_batch in includes/
update.inc - Start the database update batch process.
- update_finished in includes/
update.inc - Finish the update process and store results for eventual display.
- update_fix_d7_requirements in includes/
update.inc - Perform Drupal 6.x to 7.x updates that are required for update.php to function properly.
- update_manager_update_ready_form_submit in modules/
update/ update.manager.inc - Submit handler for the form to confirm that an update should continue.
- update_prepare_d7_bootstrap in includes/
update.inc - Performs extra steps required to bootstrap when using a Drupal 6 database.
- update_settings_submit in modules/
update/ update.settings.inc - Submit handler for the settings tab.
- UpgradePathTestCase::setUp in modules/
simpletest/ tests/ upgrade/ upgrade.test - Override of DrupalWebTestCase::setUp() specialized for upgrade testing.
- UploadUpgradePathTestCase::setUp in modules/
simpletest/ tests/ upgrade/ upgrade.upload.test - Override of DrupalWebTestCase::setUp() specialized for upgrade testing.
- UserCancelTestCase::testMassUserCancelByAdmin in modules/
user/ user.test - Create an administrative user and mass-delete other users.
- UserCancelTestCase::testUserAnonymize in modules/
user/ user.test - Delete account and anonymize all content.
- UserCancelTestCase::testUserBlock in modules/
user/ user.test - Disable account and keep all content.
- UserCancelTestCase::testUserBlockUnpublish in modules/
user/ user.test - Disable account and unpublish all content.
- UserCancelTestCase::testUserCancelByAdmin in modules/
user/ user.test - Create an administrative user and delete another user.
- UserCancelTestCase::testUserCancelInvalid in modules/
user/ user.test - Attempt invalid account cancellations.
- UserCancelTestCase::testUserCancelWithoutPermission in modules/
user/ user.test - Attempt to cancel account without permission.
- UserCancelTestCase::testUserDelete in modules/
user/ user.test - Delete account and remove all content.
- UserEditedOwnAccountTestCase::testUserEditedOwnAccount in modules/
user/ user.test - UserEditTestCase::testUserEdit in modules/
user/ user.test - Test user edit page.
- UserLoginTestCase::testGlobalLoginFloodControl in modules/
user/ user.test - Test the global login flood control.
- UserLoginTestCase::testPasswordRehashOnLogin in modules/
user/ user.test - Test that user password is re-hashed upon login after changing $count_log2.
- UserLoginTestCase::testPerUserLoginFloodControl in modules/
user/ user.test - Test the per-user login flood control.
- UserPictureTestCase::setUp in modules/
user/ user.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- UserPictureTestCase::testExternalPicture in modules/
user/ user.test - Test HTTP schema working with user pictures.
- UserPictureTestCase::testPictureIsValid in modules/
user/ user.test - Do the test: Picture is valid (proper size and dimension)
- UserPictureTestCase::testWithGDinvalidDimension in modules/
user/ user.test - Do the test: GD Toolkit is installed Picture has invalid dimension
- UserPictureTestCase::testWithGDinvalidSize in modules/
user/ user.test - Do the test: GD Toolkit is installed Picture has invalid size
- UserPictureTestCase::testWithoutGDinvalidDimension in modules/
user/ user.test - Do the test: GD Toolkit is not installed Picture has invalid size
- UserPictureTestCase::testWithoutGDinvalidSize in modules/
user/ user.test - Do the test: GD Toolkit is not installed Picture has invalid size
- UserRegistrationTestCase::testRegistrationDefaultValues in modules/
user/ user.test - UserRegistrationTestCase::testRegistrationEmailDuplicates in modules/
user/ user.test - UserRegistrationTestCase::testRegistrationWithEmailVerification in modules/
user/ user.test - UserRegistrationTestCase::testRegistrationWithoutEmailVerification in modules/
user/ user.test - UserSignatureTestCase::setUp in modules/
user/ user.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- UserTimeZoneFunctionalTest::testUserTimeZone in modules/
user/ user.test - Tests the display of dates and time when user-configurable time zones are set.
- user_block_save in modules/
user/ user.module - Implements hook_block_save().
- user_image_style_save in modules/
user/ user.module - Implements hook_image_style_save().
- user_update_7002 in modules/
user/ user.install - Convert user time zones from time zone offsets to time zone names.
- user_update_7003 in modules/
user/ user.install - Update user settings for cancelling user accounts.
- user_update_7008 in modules/
user/ user.install - If 'user_register' variable was unset in Drupal 6, set it to be the same as the Drupal 6 default setting.
- user_update_7017 in modules/
user/ user.install - Update email templates to use new tokens.
- XMLRPCMessagesTestCase::testAlterListMethods in modules/
simpletest/ tests/ xmlrpc.test - Ensure that hook_xmlrpc_alter() can hide even builtin methods.
- _book_install_type_create in modules/
book/ book.install - _color_render_images in modules/
color/ color.module - Renders images that match a given palette.
- _drupal_flush_css_js in includes/
common.inc - Changes the dummy query string added to all CSS and JavaScript files.
- _field_test_storage_data in modules/
field/ tests/ field_test.storage.inc - Helper function: stores or retrieves data from the 'storage backend'.
- _file_test_log_call in modules/
simpletest/ tests/ file_test.module - Store the values passed to a hook invocation.
- _image_test_log_call in modules/
simpletest/ tests/ image_test.module - Store the values passed to a toolkit call.
- _locale_invalidate_js in includes/
locale.inc - Force the JavaScript translation file(s) to be refreshed.
- _locale_rebuild_js in includes/
locale.inc - (Re-)Creates the JavaScript translation file for a language.
- _menu_router_save in includes/
menu.inc - Helper function to save data from menu_router_build() to the router table.
- _menu_set_expanded_menus in includes/
menu.inc - Helper function to update a list of menus with expanded items
- _node_index_node in modules/
node/ node.module - Index a single node.
- _update_process_fetch_task in modules/
update/ update.fetch.inc - Process a task to fetch available update data for a single project.
File
- includes/
bootstrap.inc, line 996 - Functions that need to be loaded on every Drupal request.
Code
<?php
function variable_set($name, $value) {
global $conf;
db_merge('variable')->key(array('name' => $name))->fields(array('value' => serialize($value)))->execute();
cache_clear_all('variables', 'cache_bootstrap');
$conf[$name] = $value;
}
?> Login or register to post comments
Comments
Code to set a variable in admin panel using form field
<?php
/*
* Implements hook_menu().
*/
function mymodule_menu() {
$items = array();
$items['admin/mymodule/config-set-time'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array('_mymodule_set_time_form'),
'access arguments' => array('administer node'),
'type' => MENU_CALLBACK,
'file' => 'mymodule.admin.inc',
);
return $items;
}
?>
in
mymodule.admin.inc:<?php
function _mymodule_set_time_form(&$form_state) {
$form = array();
$form['time'] = array(
'#type' => 'textfield',
'#title' => t('Time in second'),
'#default_value' => variable_get('mymodule_seconds_to_wait', 24 * 3600),
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
}
function _mymodule_set_time_form_submit(&$form_state) {
if (intval($form_state['values']['time'])) {
variable_set('mymodule_seconds_to_wait', intval($form_state['values']['time']));
drupal_set_message(t('Your configuration has been saved.'));
}
}
?>
Thanks. Very useful.
Thanks. Very useful.
It would also be good to look at system_settings_form() for these types of forms.