public function testdestroy_flow_bar() { //execute the method and test if it doesn't throw an exception. //this method uses flush so we cannot get and verify content printed try { ob_start(); destroy_flow_bar('test', false); ob_end_clean(); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". ********************************************************************************/ ob_start(); require_once '../include/utils/progress_bar_utils.php'; display_flow_bar('myflow', 1); display_progress_bar('myprogress', 0, 10); for ($i = 0; $i <= 10; $i++) { update_progress_bar('myprogress', $i, 10); sleep(1); } destroy_flow_bar('myflow');
* Copyright (C) SugarCRM Inc. All rights reserved. */ set_time_limit(3600); ini_set('default_socket_timeout', 360); global $theme, $sugar_config; insert_popup_header($theme); require_once 'modules/Sync/SyncHelper.php'; require_once 'soap/SoapHelperFunctions.php'; require_once 'include/utils/progress_bar_utils.php'; global $soapclient, $soap_server, $sync_modules; progress_bar_flush(); if (isset($_GET['check_available'])) { echo get_form_header(translate('LBL_CHECKING_SYNC_AVAILABLE', 'Sync'), '', false); display_flow_bar('check_sync_available', 0.2); $start_time = $soapclient->call('get_gmt_time', array()); destroy_flow_bar('check_sync_available'); if ($start_time) { $_SESSION['soap_server_available'] = true; echo '<b>' . translate('LBL_SERVER_AVAILABLE', 'Sync') . '</b>'; sleep(1); if (isset($_REQUEST['clean_sync'])) { echo '<script>document.location.href="index.php?action=Popup&module=Sync&clean_sync=' . $_REQUEST['clean_sync'] . '"</script>'; } else { echo '<script>document.location.href="index.php?action=Popup&module=Sync";</script>'; } die; } else { $_SESSION['soap_server_available'] = false; echo '<b><font color="red">' . translate('LBL_SERVER_UNAVAILABLE', 'Sync') . '</font></b>'; die; }
// 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++; update_progress_bar('sync_setup', $current_step, $module_steps); sync_users($soapclient, $session, $_REQUEST['clean_sync']); $current_step++; update_progress_bar('sync_setup', $current_step, $module_steps); add_to_msg('Done Updating User Information<br>'); } //end new sync destroy_flow_bar('file_update'); echo '<script>document.location.href = "index.php?&action=Popup&module=Sync&sync_module_index=0&new_sync=true&clean_sync=' . $_REQUEST['clean_sync'] . '&global_accept_server=' . $_REQUEST['global_accept_server'] . '";</script>'; die; } } else { add_to_msg('Server and Client must both be running the same flavor of Sugar.'); } } else { add_to_msg('Your Offline Client instance has been disabled by your administrator'); } } else { add_to_msg('Failed to Login<br>'); }