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


PHP ModuleInstaller::rebuild_all方法代码示例

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


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

示例1: UWrebuild

function UWrebuild()
{
    global $log;
    global $db;
    $log->info('Deleting Relationship Cache. Relationships will automatically refresh.');
    echo "\n\t<div id='rrresult'></div>\n\t<script>\n\t\tvar xmlhttp=false;\n\t\t/*@cc_on @*/\n\t\t/*@if (@_jscript_version >= 5)\n\t\t// JScript gives us Conditional compilation, we can cope with old IE versions.\n\t\t// and security blocked creation of the objects.\n\t\t try {\n\t\t  xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t } catch (e) {\n\t\t  try {\n\t\t   xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t  } catch (E) {\n\t\t   xmlhttp = false;\n\t\t  }\n\t\t }\n\t\t@end @*/\n\t\tif (!xmlhttp && typeof XMLHttpRequest!='undefined') {\n\t\t\ttry {\n\t\t\t\txmlhttp = new XMLHttpRequest();\n\t\t\t} catch (e) {\n\t\t\t\txmlhttp = false;\n\t\t\t}\n\t\t}\n\t\tif (!xmlhttp && window.createRequest) {\n\t\t\ttry {\n\t\t\t\txmlhttp = window.createRequest();\n\t\t\t} catch (e) {\n\t\t\t\txmlhttp = false;\n\t\t\t}\n\t\t}\n\t\txmlhttp.onreadystatechange = function() {\n\t\t            if(xmlhttp.readyState == 4) {\n\t\t              document.getElementById('rrresult').innerHTML = xmlhttp.responseText;\n\t\t            }\n\t\t          }\n\t\txmlhttp.open('GET', 'index.php?module=Administration&action=RebuildRelationship&to_pdf=true', true);\n\t\txmlhttp.send(null);\n\t\t</script>";
    $log->info('Rebuilding everything.');
    require_once 'ModuleInstall/ModuleInstaller.php';
    $mi = new ModuleInstaller();
    $mi->rebuild_all();
}
开发者ID:samus-aran,项目名称:SuiteCRM,代码行数:11,代码来源:UpgradeWizard_commit.php

示例2: UWrebuild

function UWrebuild()
{
    global $db;
    Log::info('Deleting Relationship Cache. Relationships will automatically refresh.');
    echo "\n\t<div id='rrresult'></div>\n\t<script>\n\t\tvar xmlhttp=false;\n\t\t/*@cc_on @*/\n\t\t/*@if (@_jscript_version >= 5)\n\t\t// JScript gives us Conditional compilation, we can cope with old IE versions.\n\t\t// and security blocked creation of the objects.\n\t\t try {\n\t\t  xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t } catch (e) {\n\t\t  try {\n\t\t   xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t  } catch (E) {\n\t\t   xmlhttp = false;\n\t\t  }\n\t\t }\n\t\t@end @*/\n\t\tif (!xmlhttp && typeof XMLHttpRequest!='undefined') {\n\t\t\ttry {\n\t\t\t\txmlhttp = new XMLHttpRequest();\n\t\t\t} catch (e) {\n\t\t\t\txmlhttp = false;\n\t\t\t}\n\t\t}\n\t\tif (!xmlhttp && window.createRequest) {\n\t\t\ttry {\n\t\t\t\txmlhttp = window.createRequest();\n\t\t\t} catch (e) {\n\t\t\t\txmlhttp = false;\n\t\t\t}\n\t\t}\n\t\txmlhttp.onreadystatechange = function() {\n\t\t            if(xmlhttp.readyState == 4) {\n\t\t              document.getElementById('rrresult').innerHTML = xmlhttp.responseText;\n\t\t            }\n\t\t          }\n\t\txmlhttp.open('GET', 'index.php?module=Administration&action=RebuildRelationship&to_pdf=true', true);\n\t\txmlhttp.send(null);\n\t\t</script>";
    Log::info('Rebuilding everything.');
    require_once 'ModuleInstall/ModuleInstaller.php';
    $mi = new ModuleInstaller();
    $mi->rebuild_all();
    $query = "DELETE FROM versions WHERE name='Rebuild Extensions'";
    Log::info($query);
    $db->query($query);
    // insert a new database row to show the rebuild extensions is done
    $id = create_guid();
    $gmdate = TimeDate::getInstance()->nowDb();
    $date_entered = db_convert("'{$gmdate}'", 'datetime');
    $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('{$id}', '0', {$date_entered}, {$date_entered}, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')";
    Log::info($query);
    $db->query($query);
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:20,代码来源:UpgradeWizard_commit.php

示例3: UWrebuild

/**
 * runs rebuild scripts
 */
function UWrebuild()
{
    global $db;
    global $path;
    logThis('Rebuilding everything...', $path);
    require_once 'ModuleInstall/ModuleInstaller.php';
    $mi = new ModuleInstaller();
    $mi->rebuild_all(true);
    $query = "DELETE FROM versions WHERE name='Rebuild Extensions'";
    $db->query($query);
    logThis('Registering rebuild record: ' . $query, $path);
    logThis('Rebuild done.', $path);
    // insert a new database row to show the rebuild extensions is done
    $id = create_guid();
    $gmdate = gmdate($GLOBALS['timedate']->get_db_date_time_format());
    $date_entered = db_convert("'{$gmdate}'", 'datetime');
    $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('{$id}', '0', {$date_entered}, {$date_entered}, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')";
    $db->query($query);
    logThis('Registering rebuild record in versions table: ' . $query, $path);
}
开发者ID:Terradex,项目名称:sugar,代码行数:23,代码来源:uw_utils.php

示例4: rebuildExtensions

 public function rebuildExtensions()
 {
     global $mod_strings;
     if ($this->show_output) {
         echo $mod_strings['LBL_QR_REBUILDEXT'];
     }
     global $current_user;
     require_once 'ModuleInstall/ModuleInstaller.php';
     $mi = new ModuleInstaller();
     $mi->rebuild_all(!$this->show_output);
     // Remove the "Rebuild Extensions" red text message on admin logins
     if ($this->show_output) {
         echo $mod_strings['LBL_REBUILD_REL_UPD_WARNING'];
     }
     // clear the database row if it exists (just to be sure)
     $query = "DELETE FROM versions WHERE name='Rebuild Extensions'";
     $GLOBALS['log']->info($query);
     $GLOBALS['db']->query($query);
     // insert a new database row to show the rebuild extensions is done
     $id = create_guid();
     $gmdate = gmdate('Y-m-d H:i:s');
     $date_entered = db_convert("'{$gmdate}'", 'datetime');
     $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('{$id}', '0', {$date_entered}, {$date_entered}, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')";
     $GLOBALS['log']->info($query);
     $GLOBALS['db']->query($query);
     // unset the session variable so it is not picked up in DisplayWarnings.php
     if (isset($_SESSION['rebuild_extensions'])) {
         unset($_SESSION['rebuild_extensions']);
     }
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:30,代码来源:QuickRepairAndRebuild.php

示例5: rebuildExtensions

 function rebuildExtensions()
 {
     global $mod_strings;
     if ($this->show_output) {
         echo $mod_strings['LBL_QR_REBUILDEXT'];
     }
     global $current_user;
     require_once 'ModuleInstall/ModuleInstaller.php';
     $mi = new ModuleInstaller();
     $mi->rebuild_all(!$this->show_output);
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:11,代码来源:QuickRepairAndRebuild.php

示例6: rebuildExtensions

 public function rebuildExtensions($objects = array())
 {
     $modules = array();
     global $beanList;
     $modBeans = array_flip($beanList);
     foreach ($objects as $obj) {
         //We expect $objects to be a list of bean classes that we need to map back to modules
         //But also check if the list is actually modules
         if (isset($modBeans[$obj])) {
             $modules[] = $modBeans[$obj];
         } else {
             if (isset($beanList[$obj])) {
                 $modules[] = $obj;
             }
         }
     }
     // Rebuild extensions may have already been called. Don't do it again.
     if (isset($this->called['rebuildExtensions'])) {
         return;
     }
     global $mod_strings;
     if ($this->show_output) {
         echo $mod_strings['LBL_QR_REBUILDEXT'];
     }
     $mi = new ModuleInstaller();
     $mi->rebuild_all(!$this->show_output, $modules);
     // Remove the "Rebuild Extensions" red text message on admin logins
     if ($this->show_output) {
         echo $mod_strings['LBL_REBUILD_REL_UPD_WARNING'];
     }
     // clear the database row if it exists (just to be sure)
     $query = "DELETE FROM versions WHERE name='Rebuild Extensions'";
     $GLOBALS['log']->info($query);
     $GLOBALS['db']->query($query);
     // insert a new database row to show the rebuild extensions is done
     $id = create_guid();
     $gmdate = gmdate('Y-m-d H:i:s');
     $date_entered = db_convert("'{$gmdate}'", 'datetime');
     $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('{$id}', '0', {$date_entered}, {$date_entered}, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')";
     $GLOBALS['log']->info($query);
     $GLOBALS['db']->query($query);
     // unset the session variable so it is not picked up in DisplayWarnings.php
     if (isset($_SESSION['rebuild_extensions'])) {
         unset($_SESSION['rebuild_extensions']);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:46,代码来源:QuickRepairAndRebuild.php

示例7: unset

                        $sync_info['last_sync' . $sync_module] = $sync_end_time;
                        $sync_info['local_last_sync' . $sync_module] = $local_time;
                        unset($_SESSION['sync_start_time']);
                        require_once 'include/utils/file_utils.php';
                        add_to_msg('Storing Sync Info', false);
                        write_array_to_file('sync_info', $sync_info, 'modules/Sync/config.php');
                        add_to_msg('<b>Sync Complete</b>', false);
                        $_REQUEST['do_action'] = 'execute';
                        $_REQUEST['repair_silent'] = true;
                        global $current_user;
                        $current_user->is_admin = '1';
                        require_once 'ModuleInstall/ModuleInstaller.php';
                        global $mod_strings, $current_language;
                        $mod_strings = return_module_language($current_language, 'Administration');
                        $mi = new ModuleInstaller();
                        $mi->rebuild_all();
                        $current_user->is_admin = '0';
                        echo '<script>document.getElementById("stop_sync_btn").value="Done"</script>';
                        echo '<script>opener.location.href = "index.php?module=Home&action=index";</script>';
                        update_progress_bar('Total', sizeof($sync_modules), sizeof($sync_modules));
                        //$current_user->setPreference('last_sync'.  $sync_module, $start_time);
                        clear_sync_session();
                        unset($_SESSION['ACL']);
                    }
                }
            }
        } else {
        }
    }
} else {
    include_once 'syncconnect.php';
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:Popup.php

示例8: ActiveXObject

 if (isset($_REQUEST['new_sync'])) {
     // run the file sync
     require_once "include/utils/disc_client_utils.php";
     $from_sync_client = true;
     //before we do a file sync we need to install any necessary upgrades
     $upgrade_applied = get_required_upgrades($soapclient, $session);
     $results = disc_client_get_zip($soapclient, $session, true, 0, $upgrade_applied);
     $_REQUEST['do_action'] = 'execute';
     $_REQUEST['repair_silent'] = true;
     $current_user->is_admin = 1;
     echo "<div id='rrresult'></div>\n                                <script>\n                                var xmlhttp=false;\n                                /*@cc_on @*/\n                                /*@if (@_jscript_version >= 5)\n                                // JScript gives us Conditional compilation, we can cope with old IE versions.\n                                // and security blocked creation of the objects.\n                                 try {\n                                  xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n                                 } catch (e) {\n                                  try {\n                                   xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n                                  } catch (E) {\n                                   xmlhttp = false;\n                                  }\n                                 }\n                                @end @*/\n                                if (!xmlhttp && typeof XMLHttpRequest!='undefined') {\n                                    try {\n                                        xmlhttp = new XMLHttpRequest();\n                                    } catch (e) {\n                                        xmlhttp = false;\n                                    }\n                                }\n                                if (!xmlhttp && window.createRequest) {\n                                    try {\n                                        xmlhttp = window.createRequest();\n                                    } catch (e) {\n                                        xmlhttp = false;\n                                    }\n                                }\n                                xmlhttp.onreadystatechange = function() {\n                                            if(xmlhttp.readyState == 4) {\n                                              document.getElementById('rrresult').innerHTML = xmlhttp.responseText;\n                                            }\n                                          }\n                                xmlhttp.open('GET', 'index.php?module=Sync&action=OfflineClientRepair', true);\n                                xmlhttp.send(null);\n                                </script>";
     //rebuild
     echo "<div id='rrresult'></div>\n                                <script>\n                                var xmlhttp=false;\n                                /*@cc_on @*/\n                                /*@if (@_jscript_version >= 5)\n                                // JScript gives us Conditional compilation, we can cope with old IE versions.\n                                // and security blocked creation of the objects.\n                                 try {\n                                  xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n                                 } catch (e) {\n                                  try {\n                                   xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n                                  } catch (E) {\n                                   xmlhttp = false;\n                                  }\n                                 }\n                                @end @*/\n                                if (!xmlhttp && typeof XMLHttpRequest!='undefined') {\n                                    try {\n                                        xmlhttp = new XMLHttpRequest();\n                                    } catch (e) {\n                                        xmlhttp = false;\n                                    }\n                                }\n                                if (!xmlhttp && window.createRequest) {\n                                    try {\n                                        xmlhttp = window.createRequest();\n                                    } catch (e) {\n                                        xmlhttp = false;\n                                    }\n                                }\n                                xmlhttp.onreadystatechange = function() {\n                                            if(xmlhttp.readyState == 4) {\n                                              document.getElementById('rrresult').innerHTML = xmlhttp.responseText;\n                                            }\n                                          }\n                                xmlhttp.open('GET', 'index.php?module=Administration&action=RebuildRelationship&to_pdf=true', true);\n                                xmlhttp.send(null);\n                                </script>";
     require_once 'ModuleInstall/ModuleInstaller.php';
     $mi = new ModuleInstaller();
     $mi->rebuild_all(true);
     $current_user->is_admin = 0;
     $db =& DBManagerFactory::getInstance();
     $query = "DELETE FROM versions WHERE name='Rebuild Extensions'";
     $db->query($query);
     // insert a new database row to show the rebuild extensions is done
     $id = create_guid();
     $gmdate = TimeDate::getInstance()->nowDb();
     $date_entered = db_convert("'{$gmdate}'", 'datetime');
     $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('{$id}', '0', {$date_entered}, {$date_entered}, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')";
     $db->query($query);
     $current_step++;
     update_progress_bar('sync_setup', $current_step, $module_steps);
     add_to_msg('Done updating files<br>');
     add_to_msg('Updating User Information<br>');
     $current_step++;
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:syncconnect.php

示例9: rebuildApplication

 /**
  * Specific for a fast rebuild of Extentions files for application
  */
 public function rebuildApplication()
 {
     require_once 'ModuleInstall/ModuleInstaller.php';
     $moduleInstaller = new \ModuleInstaller();
     $moduleInstaller->silent = true;
     $moduleInstaller->rebuild_all(true, array('application'));
 }
开发者ID:inetprocess,项目名称:libsugarcrm,代码行数:10,代码来源:System.php

示例10: rebuildExtensions

 public function rebuildExtensions()
 {
     global $mod_strings;
     if ($this->show_output) {
         echo $mod_strings['LBL_QR_REBUILDEXT'];
     }
     global $current_user;
     require_once 'ModuleInstall/ModuleInstaller.php';
     $mi = new ModuleInstaller();
     $mi->rebuild_all(!$this->show_output);
     // Remove the "Rebuild Extensions" red text message on admin logins
     if ($this->show_output) {
         echo $mod_strings['LBL_REBUILD_REL_UPD_WARNING'];
     }
     // unset the session variable so it is not picked up in DisplayWarnings.php
     if (isset($_SESSION['rebuild_extensions'])) {
         unset($_SESSION['rebuild_extensions']);
     }
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:19,代码来源:QuickRepairAndRebuild.php


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