예제 #1
0
파일: boot.php 프로젝트: redaxo/redaxo
     }
     $article_id = $ep->getParam('article_id');
     $clang_id = $ep->getParam('clang_id');
     $slice_revision = $ep->getParam('slice_revision');
     rex_article_slice_history::makeSnapshot($article_id, $clang_id, $type, $slice_revision);
 });
 rex_view::addCssFile($this->getAssetsUrl('history.css'));
 rex_view::addJsFile($this->getAssetsUrl('history.js'));
 $info = '';
 switch (rex_request('rex_history_function', 'string')) {
     case 'snap':
         $article_id = rex_request('history_article_id', 'int');
         $clang_id = rex_request('history_clang_id', 'int');
         $revision = rex_request('history_revision', 'int', 0);
         $history_date = rex_request('history_date', 'string');
         rex_article_slice_history::restoreSnapshot($history_date, $article_id, $clang_id, $revision);
         $info = $version['history_snapshot_history_reactivate_snapshot'];
     case 'layer':
         // article_id und clang_id und revision noch nötig
         $article_id = rex_request('history_article_id', 'int');
         $clang_id = rex_request('history_clang_id', 'int');
         $revision = rex_request('history_revision', 'int', 0);
         $versions = rex_article_slice_history::getSnapshots($article_id, $clang_id, $revision);
         $select = '<option value="" selected="selected">' . $this->i18n('current_version') . '</option>';
         foreach ($versions as $version) {
             $select .= '<option value="' . $version['history_date'] . '">' . $version['history_date'] . '</option>';
         }
         $content1select = '<select id="content-history-select-date-1" class="content-history-select" data-iframe="content-history-iframe-1" style="">' . $select . '</select>';
         $content1iframe = '<iframe id="content-history-iframe-1" class="history-iframe"></iframe>';
         $content2select = '<select id="content-history-select-date-2" class="content-history-select" data-iframe="content-history-iframe-2">' . $select . '</select>';
         $content2iframe = '<iframe id="content-history-iframe-2" class="history-iframe"></iframe>';