install/includes/stages/license.php
changeset 396 3289e4dcb4b8
parent 348 87e08a6e4fec
child 536 218a627eb53e
equal deleted inserted replaced
395:fa4c5ecb7c9a 396:3289e4dcb4b8
    18   die();
    18   die();
    19 
    19 
    20 function show_license($fb = false)
    20 function show_license($fb = false)
    21 {
    21 {
    22   global $lang;
    22   global $lang;
       
    23   global $installer_version;
    23   ?>
    24   ?>
    24   <div class="scroller">
    25   <div class="scroller">
    25   <?php
    26   <?php
    26     if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') )
    27     if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') )
    27     {
    28     {
    28       echo 'Cannot find the license files.';
    29       echo 'Cannot find the license files.';
    29     }
    30     }
    30     echo file_get_contents('./language/english/install/license-deed.html');
    31     echo file_get_contents('./language/english/install/license-deed.html');
    31     if ( defined('ENANO_BETA_VERSION') || $branch == 'unstable' )
    32     if ( $installer_version['type'] != 'stable' )
    32     {
    33     {
    33       ?>
    34       ?>
    34       <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3>
    35       <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3>
    35       <p><?php echo $lang->get('license_info_unstable_body'); ?></p>
    36       <p><?php echo $lang->get('license_info_unstable_body'); ?></p>
    36       <?php
    37       <?php
    56 
    57 
    57 function wikiFormat($message, $filter_links = true)
    58 function wikiFormat($message, $filter_links = true)
    58 {
    59 {
    59   $wiki = & Text_Wiki::singleton('Mediawiki');
    60   $wiki = & Text_Wiki::singleton('Mediawiki');
    60   $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
    61   $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
    61   $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', contentPath);
    62   $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', scriptPath . '/index.php?title=');
    62   $result = $wiki->transform($message, 'Xhtml');
    63   $result = $wiki->transform($message, 'Xhtml');
    63   
    64   
    64   // HTML fixes
    65   // HTML fixes
    65   $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
    66   $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
    66   $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
    67   $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);