Beispiel #1
0
<?php

if ($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["step_code"] == "migration_descr" && check_bitrix_sessid('send_sessid')) {
    require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_js.php";
    $version = isset($_POST['version']) ? $_POST['version'] : 0;
    $descr = $manager->getDescription($version);
    $descr = !empty($descr) ? $descr : GetMessage('SPRINT_MIGRATION_EMPTY_DESCR');
    $canEdit = $manager->canEdit($version);
    $webdir = \Sprint\Migration\Utils::getMigrationWebDir();
    ?>
    <div class="c-migration-descr">
        <?php 
    echo $descr;
    ?>

        <?php 
    if ($webdir && $canEdit) {
        ?>
            <br/>
            <?php 
        $href = '/bitrix/admin/fileman_file_view.php?' . http_build_query(array('lang' => LANGUAGE_ID, 'site' => SITE_ID, 'path' => $webdir . '/' . $version . '.php'));
        ?>
            <a href="<?php 
        echo $href;
        ?>
" target="_blank" title=""><?php 
        echo GetMessage('SPRINT_MIGRATION_VIEW');
        ?>
</a>
        <?php 
    }
Beispiel #2
0
 protected function renderVersionFile($vars = array())
 {
     if (is_array($vars)) {
         extract($vars, EXTR_SKIP);
     }
     ob_start();
     include Utils::getVersionTemplateFile();
     $html = ob_get_clean();
     return $html;
 }