Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for Metafox/admin/inc-db/config.inc.php between version 1.24 and 1.25

version 1.24, 2013/10/17 16:57:24 version 1.25, 2014/10/14 13:29:20
Line 336  function ezin_admin_config_main($restric
Line 336  function ezin_admin_config_main($restric
                                 echo '<hr class="pme-hr">',"\n";                                  echo '<hr class="pme-hr">',"\n";
                                 $message = '';                                  $message = '';
                         }                          }
                           ezin_admin_config_check_rewritebase();
                         echo '<table class="pme-main" summary="ezin_config">',"\n";                          echo '<table class="pme-main" summary="ezin_config">',"\n";
                         echo '<tr class="pme-header">',"\n";                          echo '<tr class="pme-header">',"\n";
                         echo '<th class="pme-header">Option</th>',"\n";                          echo '<th class="pme-header">Option</th>',"\n";
Line 550  function ezin_admin_config_delete_button
Line 551  function ezin_admin_config_delete_button
         echo '</td></tr></table>',"\n";          echo '</td></tr></table>',"\n";
 } /* }}} */  } /* }}} */
   
   function ezin_admin_config_check_rewritebase() /* {{{ */
   {
           global $ezin_cfg;
           $htaccess_filename = dirname(__FILE__).'/../../.htaccess';
           if (!file_exists($htaccess_filename)) {
                   echo '<div class="pme-message">File "'.$htaccess_filename.'" not exist</div>';
                   return false;
           }
           $lines = file($htaccess_filename);
           $rewritebase_command = 'rewritebase';
           $rewritebase_enabled = true;
           $rewritebase_path = null;
           foreach ($lines as $line) {
                   $line = trim($line);
                   $line_formed = strtolower($line);
                   if (strstr($line_formed, $rewritebase_command) !== false) {
                           $rewritebase_path = trim(substr($line, strpos($line_formed, $rewritebase_command) + strlen($rewritebase_command)));
                           if (strstr($rewritebase_path, '#') !== false) { // remove comment
                                   $rewritebase_path = trim(substr($rewritebase_path, strpos($line_formed, '#')));
                           }
                           if (strstr($line_formed, '#') !== false
                                   && strpos($line_formed, '#') < strpos($line_formed, $rewritebase_command))
                           {
                                   $rewritebase_enabled = false;
                                   continue;
                           }
                           $rewritebase_enabled = true;
                   }
           }
           if (is_null($rewritebase_path)) {
                   echo '<div class="pme-message">Not defined RewriteBase in .htaccess</div>';
                   return false;
           }
           if (!is_null($rewritebase_path)
                   && $rewritebase_enabled == false)
           {
                   echo '<div class="pme-message">Defined RewriteBase in .htaccess ('.$rewritebase_path.') is disabled</div>';
                   return false;
           }
           if ($ezin_cfg['url'] != $rewritebase_path) {
                   echo '<div class="pme-message">Defined RewriteBase in .htaccess ('.$rewritebase_path.')
                           is not equal with URL in config ('.$ezin_cfg['url'].')</div>';
                   return false;
           }
           return true;
   } /* }}} */
   
 function ezin_admin_config_get_themes() /* {{{ */  function ezin_admin_config_get_themes() /* {{{ */
 {  {
         global $ezin_sys;          global $ezin_sys;

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top