adsense_injector.install in Content Injector (formerly AdSense Injector) 6.3
Same filename and directory in other branches
The install and update code for the adsense injector module.
File
adsense_injector.installView source
<?php
// $Id: adsense_injector.install,v 1.1.4.3 2009/01/02 03:20:38 hswong3i Exp $
/**
* @file
* The install and update code for the adsense injector module.
*
* @ingroup adsense_injector
*/
function adsense_injector_install() {
db_query("UPDATE {system} SET weight = 10 WHERE name = 'adsense_injector'");
// Check for existence of old
$var = variable_get('adsense_injector_body_view', null);
if ($var && is_string($var)) {
adsense_injector_uninstall();
// Since it does nothing other than delete variables from table and flush cache.
drupal_set_message('Previous AdSense Injector version detected. Please verify all AdSense (Content) Injector module settings.');
}
}
function adsense_injector_uninstall() {
db_query("DELETE FROM {variable} WHERE name like '%s%%'", 'adsense_injector');
// Flush the variables cache since we didn't use variable_del.
db_query("DELETE FROM {cache} WHERE cid='variables'");
}
function adsense_injector_update_5000() {
$ret = array();
$ret[] = update_sql("UPDATE {system} SET weight = 10 WHERE name = 'adsense_injector'");
return $ret;
}
function adsense_injector_update_6000() {
// This is just a fork of 5000.
$ret = array();
$ret[] = update_sql("UPDATE {system} SET weight = 10 WHERE name = 'adsense_injector'");
return $ret;
}
Functions
Name![]() |
Description |
---|---|
adsense_injector_install | @file The install and update code for the adsense injector module. |
adsense_injector_uninstall | |
adsense_injector_update_5000 | |
adsense_injector_update_6000 |