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


PHP PHPWS_DB::getDBType方法代码示例

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


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

示例1: homogenize

 public static function homogenize(&$query)
 {
     $query_list = explode(',', $query);
     $from[] = '/int\\(\\d+\\)/iU';
     $to[] = 'int';
     if (PHPWS_DB::getDBType() != 'mysql' && PHPWS_DB::getDBType() != 'mysqli') {
         $from[] = '/mediumtext|longtext/i';
         $to[] = 'text';
     }
     foreach ($query_list as $command) {
         // Remove mysql specific call
         $command = str_ireplace('unsigned', '', $command);
         $command = preg_replace('/ default (\'\'|""|``)/i', '', $command);
         if (preg_match('/\\s(smallint|int)\\s/i', $command)) {
             if (!preg_match('/\\snull/i', $command)) {
                 $command = str_ireplace(' int ', ' INT NOT NULL ', $command);
                 $command = str_ireplace(' smallint ', ' SMALLINT NOT NULL ', $command);
             }
             if (!preg_match('/\\sdefault/i', $command)) {
                 $command = str_ireplace(' int ', ' INT DEFAULT 0 ', $command);
                 $command = str_ireplace(' smallint ', ' SMALLINT DEFAULT 0 ', $command);
             }
             $command = preg_replace('/ default \'(\\d+)\'/Ui', ' DEFAULT \\1', $command);
         }
         $command = preg_replace($from, $to, $command);
         $newlist[] = $command;
     }
     $query = implode(',', $newlist);
     $GLOBALS['PHPWS_DB']['lib']->readyImport($query);
 }
开发者ID:jeffrafter,项目名称:InternshipInventory,代码行数:30,代码来源:SubselectDatabase.php

示例2: pagesmith_update


//.........这里部分代码省略.........
            $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.
+ Added fix so edit mode does not parse smarttags.</pre>';
        case version_compare($currentVersion, '1.3.2', '<'):
            $content[] = '<pre>';
            Users_Permission::registerPermissions('pagesmith', $content);
            pagesmithUpdateFiles(array('templates/page_templates/'), $content);
            $content[] = '1.3.2 changes
----------------
+ Update was missing a permission update
+ Wrong permission getting called on settings
+ All page templates now have a class called pagesmith-page
+ Removed padding from page templates</pre>';
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:67,代码来源:update.php


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