Ejemplo n.º 1
0
function fn_twigmo_set_admin_notification()
{
    if (!TwigmoConnector::anyFrontendIsConnected()) {
        $message = __('twgadmin_connect_notification', array('[addon_link]' => fn_url('addons.update&addon=twigmo')));
        fn_set_notification('N', __('notice'), $message, 'S');
    }
    if (fn_twg_is_on_saas()) {
        if (!isset($_SESSION['stats'])) {
            $_SESSION['stats'] = array();
        }
        $_SESSION['stats'][] = fn_twg_get_ajax_reconnect_code('check_twigmo_for_upgrade');
    }
}
Ejemplo n.º 2
0
            fn_delete_notification('twigmo_upgrade');
        }
        if (!fn_twg_is_updated()) {
            fn_set_notification('W', __('notice'), __('twgadmin_reinstall'));
        }
        $company_id = fn_twg_get_current_company_id();
        $view = Registry::get('view');
        $view->assign('default_logo', TwigmoImage::getDefaultLogoUrl($company_id));
        $urls = TwigmoConnector::getMobileScriptsUrls();
        $view->assign('favicon', $urls['favicon']);
        $view->assign('logo_object_id', $company_id * 10 + 1);
        $view->assign('favicon_object_id', $company_id * 10 + 2);
        $tw_register['version'] = TWIGMO_VERSION;
        $view->assign('tw_register', $tw_register);
        $view->assign('next_version_info', TwigmoUpgrade::getNextVersionInfo());
        $view->assign('twg_is_connected', TwigmoConnector::anyFrontendIsConnected());
        $stores = fn_twg_get_stores();
        $platinum_stores = fn_twg_init_push_comment(fn_twg_filter_connected_platinum_stores($stores));
        $view->assign('stores', $stores);
        $view->assign('platinum_stores', $platinum_stores);
        $view->assign('max_push_length', TwigmoConnector::MAX_PUSH_LENGTH);
        $view->assign('twg_all_stores_connected', TwigmoConnector::allStoresAreConnected($stores));
        $view->assign('reset_pass_link', TwigmoConnector::getResetPassLink());
        $admin_access_id = TwigmoConnector::getAccessID('A');
        $view->assign('admin_access_id', $admin_access_id);
        $view->assign('is_disconnect_mode', isset($_REQUEST['disconnect']) && $admin_access_id);
        $view->assign('tw_settings', TwigmoSettings::get());
        $view->assign('is_on_saas', fn_twg_is_on_saas());
        $view->assign('connected_access_id', fn_twg_get_connected_access_id());
    }
}