当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPWS_DB::dropTableColumn方法代码示例

本文整理汇总了PHP中PHPWS_DB::dropTableColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_DB::dropTableColumn方法的具体用法?PHP PHPWS_DB::dropTableColumn怎么用?PHP PHPWS_DB::dropTableColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPWS_DB的用法示例。


在下文中一共展示了PHPWS_DB::dropTableColumn方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: rss_update

/**
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 */
function rss_update(&$content, $version)
{
    switch ($version) {
        case version_compare($version, '0.1.0', '<'):
            $content[] = '- Changed to binary safe file pull.';
            $content[] = '- Added system error checks and warnings.';
        case version_compare($version, '0.1.1', '<'):
            $content[] = '- Channel title now linked to feed.';
            $content[] = '- mod_rewrite works with feed.';
        case version_compare($version, '0.1.2', '<'):
            $content[] = '<pre>
0.1.2 changes
-------------
+ Added some error checks to feed translation.
</pre>';
        case version_compare($version, '0.1.3', '<'):
            $content[] = '<pre>
0.1.3 changes
-------------
+ Added translate functions
</pre>';
        case version_compare($version, '0.1.4', '<'):
            PHPWS_Boost::updateFiles(array('img/rss.png'), 'rss');
            $content[] = '<pre>
0.1.4 changes
-------------
+ Add German translation files.
+ Updated language functions.
+ Changed control panel icon
</pre>';
        case version_compare($version, '0.2.0', '<'):
            $db = new PHPWS_DB('rss_channel');
            PHPWS_Error::logIfError($db->dropTableColumn('last_build_date'));
            $content[] = '<pre>';
            $files = array('templates/rss20.tpl', 'templates/settings.tpl');
            if (PHPWS_Boost::updateFiles($files, 'rss')) {
                $content[] = '--- Successfully updated the following files:';
            } else {
                $content[] = '--- Could NOT update the following files successfully:';
            }
            $content[] = '    ' . implode("\n    ", $files);
            $content[] = '
0.2.0 changes
---------------
+ RSS 2.0 is now useable.
+ Added settings page for some of the RSS 2.0 options
+ Removed a header line that caused some verification errors in the 2.0 template.
+ Changed template process. Some fields were missing from the feeds.
';
        case version_compare($version, '0.2.1', '<'):
            $content[] = '<pre>
0.2.1 changes
-------------
+ Changed rss popup window dimensions and form text length
</pre>';
        case version_compare($version, '0.2.2', '<'):
            $content[] = '<pre>
0.2.2 changes
-------------
+ Added line of code to Feed to prevent error on bad data.
+ Added Vietnamese translation.
</pre>';
        case version_compare($version, '0.2.3', '<'):
            PHPWS_Boost::updateFiles(array('templates/admin_feeds.tpl'), 'rss');
            $content[] = '<pre>
0.2.3 changes
-------------
+ Added error check on feed listing.
+ Shortened urls
+ Added sort button to feed listing.
</pre>';
        case version_compare($version, '0.2.4', '<'):
            $content[] = '<pre>
0.2.4 changes
-------------
+ Fixed the timeout setting for the rss caching.
</pre>';
        case version_compare($version, '0.2.5', '<'):
            $content[] = '<pre>
0.2.5 changes
-------------
+ Mod rewrite link added to rss feed.
+ High ascii characters have their ampersand parsed.
</pre>';
        case version_compare($version, '0.2.6', '<'):
            $content[] = '<pre>
0.2.6 changes
-------------
+ RSS will not pull expired or unpublished keys any longer.
</pre>';
        case version_compare($version, '0.3.0', '<'):
            $content[] = '<pre>
0.3.0 changes
-------------
+ Fixed feed date formats.
+ Sub ampersand code for straight &
//.........这里部分代码省略.........
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:101,代码来源:update.php

示例2: layout_update

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
function layout_update(&$content, $currentVersion)
{
    switch ($currentVersion) {
        case version_compare($currentVersion, '2.2.0', '<'):
            $content[] = 'This package will not update versions under 2.2.0.';
            return false;
        case version_compare($currentVersion, '2.2.1', '<'):
            $content[] = '+ Fixed improper sql call in update_220.sql file.';
        case version_compare($currentVersion, '2.3.0', '<'):
            $content[] = '<pre>';
            if (PHPWS_Boost::updateFiles(array('conf/config.php', 'conf/error.php'), 'layout')) {
                $content[] = 'Updated conf/config.php and conf/error.php file.';
            } else {
                $content[] = 'Unable to update conf/config.php and conf/error.php file.';
            }
            $content[] = '
2.3.0 changes
-------------
+ Removed references from object constructors.
+ Added the plug function to allow users to inject content directly
  into a theme.
+ Added translate functions.
+ Layout now looks for and includes a theme\'s theme.php file.
+ Fixed unauthorized access.
+ Added XML mode to config.php file. Puts Layout in XHTML+XML content mode.
+ Added missing media parameters to XML mode.
</pre>';
        case version_compare($currentVersion, '2.4.0', '<'):
            $files = array('img/layout.png', 'templates/no_cookie.tpl');
            $content[] = '<pre>';
            if (PHPWS_Boost::updateFiles($files, 'layout')) {
                $content[] = '--- Successfully updated the following files:';
            } else {
                $content[] = '--- Was unable to copy the following files:';
            }
            $content[] = '     ' . implode("\n     ", $files);
            $content[] = '
2.4.0 changes
-------------
+ Layout now checks and forces a user to enable cookies on their
  browser.
+ Rewrote Javascript detection. Was buggy before as session
  destruction could disrupt it.
+ Added German translations
+ Updated language functions
+ Fixed: bug in Layout confused a user\'s style sheet settings after
  the theme was changed.
+ Rewrote theme change code.
+ Added ability to force theme on layout settings construction.
+ Changed Control Panel icon
</pre>';
        case version_compare($currentVersion, '2.4.1', '<'):
            $files = array('conf/config.php');
            $content[] = '<pre>';
            if (PHPWS_Boost::updateFiles($files, 'layout')) {
                $content[] = '--- Successfully updated the following files:';
            } else {
                $content[] = '--- Was unable to copy the following files:';
            }
            $content[] = '     ' . implode("\n     ", $files);
            $content[] = '
2.4.1 changes
-------------
+ Bug #1741111 - Fixed moving a top box up and a bottom box down.
+ The cookie check is not determined by a define in the config file.
+ The cookie check was interfering with the rss feed. Cut off the page
  too quickly. Moved cookie check to the close.php file.
</pre>';
        case version_compare($currentVersion, '2.4.2', '<'):
            $content[] = '<pre>';
            $files = array('templates/arrange.tpl', 'conf/error.php', 'templates/move_box_select.tpl');
            layoutUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/layout/boost/changes/2_4_2.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '2.4.3', '<'):
            $content[] = '<pre>2.4.3 changes
-----------------
+ nakedDisplay now allows a choice whether to use the blank template
  or not when it wraps. Default is to not.
+ Fixed noCache.
</pre>';
        case version_compare($currentVersion, '2.4.4', '<'):
            $content[] = '<pre>';
            $db = new PHPWS_DB('layout_config');
            if (PHPWS_Error::logIfError($db->dropTableColumn('userAllow'))) {
                $content[] = '--- An error occurred when trying to drop the userAllow column from the layout_config table.';
            } else {
                $content[] = '--- Dropped the userAllow column from the layout_config table.';
            }
            layoutUpdateFiles(array('templates/user_form.tpl'), $content);
            $content[] = '2.4.4 changes
-------------------
+ Dropped unused column from config table.
+ Added collapse function. Adds id="layout-collapse" to theme template
//.........这里部分代码省略.........
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:101,代码来源:update.php

示例3: pagesmith_update


//.........这里部分代码省略.........
                $content[] = sprintf('--- Could not copy directory "%s" to "%s"</pre>', $source_img, $local_img);
                return false;
            }
            if (!pagesmithSearchIndex()) {
                $content[] = '--- Unable to index pages in search. Check your error log.</pre>';
                return false;
            } else {
                $content[] = '--- Pages added to search';
            }
            $files = array('templates/pick_folder.tpl', 'templates/pick_template.tpl', 'templates/style.css', 'conf/folder_icons.php');
            pagesmithUpdateFiles($files, $content);
            $content[] = '1.2.1 changes
----------------
+ PageSmith now allows the sorting of templates
+ Page titles now added to search.
+ Wrong page ids don\'t 404. Send to message page.
+ Search indexing added to update and version raised.
+ Added search to pagesmith.
+ Changed to new url rewriting method.</pre>';
        case version_compare($currentVersion, '1.2.2', '<'):
            $content[] = '<pre>';
            $files = array('templates/page_list.tpl');
            pagesmithUpdateFiles($files, $content);
            $content[] = '
1.2.2 changes
---------------
+ Updated pagers to addSortHeaders.
+ Fixed direct access to page allowing view.
+ Front page does not alter page title.
+ Fixed some notices and a caching bug.
+ Changed wording on edit text windows.</pre>';
        case version_compare($currentVersion, '1.3.0', '<'):
            $db = new PHPWS_DB('ps_block');
            $db->dropTableColumn('btype');
            $db = new PHPWS_DB('ps_page');
            if (PHPWS_Error::logIfError($db->addTableColumn('parent_page', 'int NOT NULL default 0'))) {
                $content[] = 'Could not create ps_page.parent_page column.';
                return false;
            }
            if (PHPWS_Error::logIfError($db->addTableColumn('page_order', 'smallint NOT NULL default 0'))) {
                $content[] = 'Could not create ps_page.page_order column.';
                return false;
            }
            $db = new PHPWS_DB('ps_text');
            if (PHPWS_DB::getDBType() == 'mysql' || PHPWS_DB::getDBType() == 'mysqli') {
                if (PHPWS_Error::logIfError($db->alterColumnType('content', 'longtext NOT NULL'))) {
                    $content[] = 'Could not alter ps_text.content column.';
                }
            }
            $content[] = '<pre>';
            $files = array('javascript/passinfo/head.js', 'templates/page_form.tpl', 'javascript/delete_orphan/', 'javascript/confirm_delete/', 'javascript/update/head.js', 'templates/page_templates/threesec-tbl/', 'templates/orphans.tpl', 'templates/page_form.tpl', 'templates/page_frame.tpl', 'templates/page_list.tpl', 'templates/style.css', 'templates/sublist.tpl', 'templates/upload_template.tpl', 'img/add.png', 'img/delete.png', 'img/back.png', 'img/front.png');
            pagesmithUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/pagesmith/boost/changes/1_3_0.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.3.1', '<'):
            $content[] = '<pre>';
            $files = array('templates/page_templates/threesec/page.tpl', 'templates/page_templates/threesec-tbl/page.tpl', 'templates/settings.tpl');
            pagesmithUpdateFiles($files, $content);
            $content[] = '1.3.1 changes
---------------
+ Page cache refreshed on page save.
+ Updated threesec templates to conform with norm box-title,
  box-content layout
+ Added ability to lengthen or shorten pagesmith links.
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:67,代码来源:update.php

示例4: fc_update_parent_links

function fc_update_parent_links()
{
    // Nulling the url column for images with 'parent' set as url
    $db = new PHPWS_DB('images');
    $db->addWhere('url', 'parent');
    $db->addValue('url', NULL);
    PHPWS_Error::logIfError($db->update());
    // remove superfluous column
    PHPWS_Error::logIfError($db->dropTableColumn('parent_id'));
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:10,代码来源:update.php

示例5: analytics_update

/**
 * Description
 * @author Jeff Tickle <jtickle at tux dot appstate dot edu>
 */
function analytics_update(&$content, $currentVersion)
{
    switch ($currentVersion) {
        case version_compare($currentVersion, '1.0.1', '<'):
            $db = new PHPWS_DB('analytics_tracker');
            $result = $db->addTableColumn('disable_if_logged', 'int NOT NULL default 0');
            if (PHPWS_Error::logIfError($result)) {
                $content[] = 'Unable to add disable_if_logged column to analytics_tracker table.';
                return false;
            }
            $files = array('templates/edit.tpl');
            if (PHPWS_Boost::updateFiles($files, 'analytics')) {
                $content[] = '--- Updated templates/edit.tpl';
            }
        case version_compare($currentVersion, '1.1.0', '<'):
            // install.sql has been wrong for awhile, this should fix any discrepancies
            $db = new PHPWS_DB('analytics_tracker');
            if (!$db->isTableColumn('disable_if_logged')) {
                $result = $db->addTableColumn('disable_if_logged', 'int NOT NULL default 0');
                if (PHPWS_Error::logIfError($result)) {
                    $content[] = 'Unable to add disable_if_logged column to analytics_tracker table.';
                    return false;
                }
                $content[] = '--- Added disable_if_logged option to database';
            }
            // Load new schema
            $db = new PHPWS_DB();
            $result = $db->importFile(PHPWS_SOURCE_DIR . 'mod/analytics/boost/update/1.1.0.sql');
            if (PHPWS_Error::logIfError($result)) {
                $content[] = 'Unable to import updated schema for version 1.1.0.';
                return false;
            }
            $content[] = '--- Updated Analytics schema to 1.1.0';
            // Move Google Analytics data to its own table
            $db = new PHPWS_DB('analytics_tracker');
            $db->addColumn('id');
            $db->addColumn('account');
            $db->addWhere('type', 'GoogleAnalyticsTracker');
            $result = $db->select();
            if (PHPWS_Error::logIfError($result)) {
                $content[] = 'Unable to select Google Analytics tracker from analytics_tracker table.';
                return false;
            }
            foreach ($result as $row) {
                $db = new PHPWS_DB('analytics_tracker_google');
                $db->addValue('id', $row['id']);
                // Adding UA- into the account identifier to reduce confusion
                $db->addValue('account', 'UA-' . $row['account']);
                $db->insert(false);
                $content[] = "--- Migrated Google Analytics configuration for account UA-{$row['account']}";
            }
            $db = new PHPWS_DB('analytics_tracker');
            $result = $db->dropTableColumn('account');
            if (PHPWS_Error::logIfError($result)) {
                $content[] = 'Unable to remove account column from analytics_tracker table.';
                return false;
            }
            $content[] = '--- Completed migration to Analytics 1.1.0 schema';
        case version_compare($currentVersion, '1.1.1', '<'):
            $content[] = <<<EOF
<pre>Version 1.1.1
-------------------
+ Piwik fix.
+ Fixed uninstall script
</pre>
EOF;
    }
    return true;
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:73,代码来源:update.php


注:本文中的PHPWS_DB::dropTableColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。