本文整理汇总了PHP中DBUtil::dropTable方法的典型用法代码示例。如果您正苦于以下问题:PHP DBUtil::dropTable方法的具体用法?PHP DBUtil::dropTable怎么用?PHP DBUtil::dropTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBUtil
的用法示例。
在下文中一共展示了DBUtil::dropTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Uninstall
/**
* Delete the IWnoteboard module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function Uninstall() {
// Delete module table
DBUtil::dropTable('IWnoteboard');
DBUtil::dropTable('IWnoteboard_topics');
//Delete module vars
$this->delVar('grups')
->delVar('permisos')
->delVar('marcat')
->delVar('verifica')
->delVar('caducitat')
->delVar('repperdefecte')
->delVar('colorrow1')
->delVar('colorrow2')
->delVar('colornewrow1')
->delVar('colornewrow2')
->delVar('attached')
->delVar('notRegisteredSeeRedactors')
->delVar('multiLanguage')
->delVar('topicsSystem')
->delVar('shipHeadersLines')
->delVar('notifyNewEntriesByMail')
->delVar('editPrintAfter')
->delVar('notifyNewCommentsByMail')
->delVar('commentCheckedByDefault')
->delVar('smallAvatar');
HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
//Deletion successfull
return true;
}
示例2: uninstall
/**
* Delete the IWmain module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWmain');
//Delete module vars
$this->delVars;
//Deletion successfull
return true;
}
示例3: Admin_Messages_delete
/**
* delete the Admin module
* This function is only ever called once during the lifetime of a particular
* module instance
* @author Mark West
* @return bool true if deletetion succcesful, false otherwise
*/
function Admin_Messages_delete()
{
if (!DBUtil::dropTable('message')) {
return false;
}
ModUtil::delVar('Admin_Messages');
// Deletion successful
return true;
}
示例4: Uninstall
/**
* Delete the IWmenu module
* @author Albert Pï¿œrez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function Uninstall() {
// Delete module table
DBUtil::dropTable('IWmenu');
//Delete module vars
ModUtil::delVar('IWmenu', 'height');
ModUtil::delVar('IWmenu', 'width');
ModUtil::delVar('IWmenu', 'imagedir');
//Deletion successfull
return true;
}
示例5: uninstall
/**
* uninstall the IWdocmanager module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWdocmanager');
DBUtil::dropTable('IWdocmanager_categories');
//Delete module vars
$this->delVar('documentsFolder')
->delVar('notifyMail')
->delVar('editTime')
->delVar('deleteTime');
//Deletion successfull
return true;
}
示例6: uninstall
/**
* Delete the IWwebbox module
* @author Albert Pérez Monfort
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWwebbox');
//Delete module vars
$this->delVar('url')
->delVar('width')
->delVar('height')
->delVar('scrolls')
->delVar('widthunit');
//Deletion successfull
return true;
}
示例7: uninstall
/**
* Delete the IWqv module
* @author Sara Arjona Téllez (sarjona@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWqv');
DBUtil::dropTable('IWqv_assignments');
DBUtil::dropTable('IWqv_sections');
DBUtil::dropTable('IWqv_messages');
DBUtil::dropTable('IWqv_messages_read');
//Delete module vars
//ModUtil::delVar('IWqv', 'varname');
//Deletion successfull
return true;
}
示例8: uninstall
/**
* Delete the IWforums module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWforums_definition');
DBUtil::dropTable('IWforums_temes');
DBUtil::dropTable('IWforums_msg');
//Delete module vars
$this->delVar('urladjunts')
->delVar('avatarsVisible')
->delVar('restyledTheme')
->delVar('smiliesActive');
;
// unregister hook handlers
HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
//success
return true;
}
示例9: uninstall
/**
* Delete the IWmessages module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @author Jaume Fernàndez Valiente (jfern343@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWmessages');
//Delete module vars
$this->delVar('IWmessages', 'groupsCanUpdate')
->delVar('uploadFolder')
->delVar('multiMail')
->delVar('limitInBox')
->delVar('limitOutBox')
->delVar('dissableSuggest')
->delVar('smiliesActive');
//Deletion successfull
HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
return true;
}
示例10: Uninstall
/**
* Delete the IWusers module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function Uninstall() {
// Delete module table
DBUtil::dropTable('IWusers');
DBUtil::dropTable('IWusers_friends');
//Delete module vars
$this->delVar('friendsSystemAvailable')
->delVar('invisibleGroupsInList')
->delVar('usersCanManageName')
->delVar('allowUserChangeAvatar')
->delVar('allowUserSetTheirSex')
->delVar('allowUserDescribeTheirSelves')
->delVar('avatarChangeValidationNeeded')
->delVar('usersPictureFolder');
//Deletion successfull
return true;
}
示例11: Uninstall
/**
* Delete the IWbookings module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
function Uninstall() {
// Delete module table
DBUtil::dropTable('IWbookings');
DBUtil::dropTable('IWbookings_spaces');
//Delete module vars
ModUtil::delVar('IWbookings', 'groups');
ModUtil::delVar('IWbookings', 'weeks');
ModUtil::delVar('IWbookings', 'month_panel');
ModUtil::delVar('IWbookings', 'weekends');
ModUtil::delVar('IWbookings', 'eraseold');
ModUtil::delVar('IWbookings', 'showcolors');
ModUtil::delVar('IWbookings', 'NTPtime');
//Deletion successfull
return true;
}
示例12: uninstall
/**
* uninstall the Files module
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall()
{
// Delete module table
DBUtil::dropTable('Files');
//Delete module vars
$this->delVar('folderPath');
$this->delVar('usersFolder');
$this->delVar('showHideFiles');
$this->delVar('allowedExtensions');
$this->delVar('defaultQuota');
$this->delVar('groupsQuota');
$this->delVar('filesMaxSize');
$this->delVar('maxWidth');
$this->delVar('maxHeight');
$this->delVar('editableExtensions');
//Deletion successfull
return true;
}
示例13: uninstall
/**
* Desinstal·lació del mòdul Llicencies
*
* @return bool true si ha anat tot bé, false en qualsevol altre cas.
*/
public function uninstall()
{
if (!SecurityUtil::checkPermission('Llicencies::', '::', ACCESS_ADMIN)) {
return LogUtil::registerPermissionError();
}
// Esborrar taules del mòdul
if (!DBUtil::dropTable('llicencies')||
!DBUtil::dropTable('llicencies_curs')||
!DBUtil::dropTable('llicencies_tema')||
!DBUtil::dropTable('llicencies_subtema')||
!DBUtil::dropTable('llicencies_tipus')||
!DBUtil::dropTable('llicencies_modalitat')||
!DBUtil::dropTable('llicencies_estats')
)
return false;
//Esborrar variables del mòdul
$this->delVars();
return true;
}
示例14: uninstall
/**
* Delete the IWTimeFrames module & update existing bookings references
* @author Albert Pérez Monfort (aperezm@xtec.cat)
* @author Josep Ferràndiz Farré (jferran6@xtec.cat)
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete module table
DBUtil::dropTable('IWtimeframes');
DBUtil::dropTable('IWtimeframes_definition');
// Totes les referències als marcs s'han d'esborrar a IWbookings_spaces
// 1r. mirar si existeix el mòdul i després actualitzar els registres
$modid = ModUtil::getIdFromName('IWbookings');
$modinfo = ModUtil::getInfo($modid);
if ($modinfo['state'] > 1) {
$obj = array('mdid' => 0);
DBUtil::updateObject($obj, 'IWbookings_spaces', 'mdid != 0');
}
//Delete module vars
$this->delVar('frames');
//Deletion successfull
return true;
}
示例15: upgrade113XTablesTo220Tables
//.........这里部分代码省略.........
$obaColumn = $dbinfoSystem['objectdata_attributes_column'];
$limitNumRows = 100;
$limitOffset = 0;
$updated = true;
$userCount = DBUtil::selectObjectCount('users_temp');
// Pass through the users_temp table in chunks of 100
// * ensure unames and email addresses are lower case,
while ($limitOffset < $userCount) {
$userTempArray = DBUtil::selectObjectArray('users_temp', '', '', $limitOffset, $limitNumRows, '', null, null,
array('tid', 'type', 'uname', 'email', 'pass', 'hash_method', 'dynamics', 'comment'));
$userArray = array();
if (!empty($userTempArray) && is_array($userTempArray)) {
foreach ($userTempArray as $key => $userTempOpj) {
// type == 1: User registration pending approval (moderation)
if ($userTempArray[$key]['type'] == 1) {
$userObj = array();
// Ensure uname and email are lower case
$userObj['uname'] = mb_strtolower($userTempArray[$key]['uname']);
$userObj['email'] = mb_strtolower($userTempArray[$key]['email']);
// Convert pass to salted pass with embedded hash method, leave salt blank
$userObj['pass'] = $userTempArray[$key]['hash_method'] . '$$' . $userTempArray[$key]['pass'];
$userObj['approved_by'] = 0;
$userObj['activated'] = Users_Constant::ACTIVATED_PENDING_REG;
if (!empty($userTempArray[$key]['dynamics'])) {
$userObj['__ATTRIBUTES__'] = unserialize($userTempArray[$key]['dynamics']);
} else {
$userObj['__ATTRIBUTES__'] = array();
}
if (isset($userObj['dynamics']) && !empty($userObj['dynamics'])) {
if (DataUtil::is_serialized($userObj['dynamics'])) {
$dynamics = @unserialize($userObj['dynamics']);
if (!empty($dynamics) && is_array($dynamics)) {
foreach ($dynamics as $key => $value) {
$userObj['__ATTRIBUTES__'][$key] = $value;
}
}
}
}
$userObj['__ATTRIBUTES__']['_Users_isVerified'] = 0;
if ($legalModuleActive) {
$userRegDateTime = new DateTime($userArray[$key]['user_regdate'], new DateTimeZone('UTC'));
$policyDateTimeStr = $userRegDateTime->format(DATE_ISO8601);
if ($termsOfUseActive) {
$userObj['__ATTRIBUTES__']['_Legal_termsOfUseAccepted'] = $policyDateTimeStr;
}
if ($privacyPolicyActive) {
$userObj['__ATTRIBUTES__']['_Legal_privacyPolicyAccepted'] = $policyDateTimeStr;
}
if ($agePolicyActive) {
$userObj['__ATTRIBUTES__']['_Legal_agePolicyConfirmed'] = $policyDateTimeStr;
}
}
$userArray[] = $userObj;
} else {
throw new Zikula_Exception_Fatal($this->__f('Unknown users_temp record type: %1$s', array($userTempArray[$key]['type'])));
}
}
}
if (!DBUtil::insertObjectArray($userArray, 'users', 'uid', false)) {
$updated = false;
break;
}
$limitOffset += $limitNumRows;
}
if (!$updated) {
return false;
}
// Done upgrading. Let's lose some old fields and tables we no longer need.
DBUtil::dropColumn('users', $usersOldFieldsDB);
DBUtil::dropTable('users_temp');
// Reset the system tables to the new table definitons, so the rest of the
// system upgrade goes smoothly.
$dbinfoSystem = $serviceManager['dbtables'];
foreach ($dbinfo113X as $key => $value) {
unset($dbinfoSystem[$key]);
}
foreach ($dbinfo220 as $key => $value) {
$dbinfoSystem[$key] = $value;
}
$serviceManager['dbtables'] = $dbinfoSystem;
// Update users table for data type change of activated field.
if (!DBUtil::changeTable('users')) {
return false;
}
return true;
}