install/includes/stages/sysreqs.php
changeset 1144 fcb2be1428e7
parent 1081 745200a9cc2a
child 1227 bdac73ed481e
equal deleted inserted replaced
1143:e271ae801c62 1144:fcb2be1428e7
    13  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    13  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    14  */
    14  */
    15 
    15 
    16 if ( !defined('IN_ENANO_INSTALL') )
    16 if ( !defined('IN_ENANO_INSTALL') )
    17   die();
    17   die();
       
    18 
       
    19 require_once(ENANO_ROOT . '/install/includes/libenanoinstall.php');
    18 
    20 
    19 global $failed, $warned;
    21 global $failed, $warned;
    20 
    22 
    21 $failed = false;
    23 $failed = false;
    22 $warned = false;
    24 $warned = false;
   125 // FS test: ImageMagick
   127 // FS test: ImageMagick
   126 $req_imagick = which('convert');
   128 $req_imagick = which('convert');
   127 if ( !$req_imagick )
   129 if ( !$req_imagick )
   128   $warnings[] = $lang->get('sysreqs_req_help_imagemagick');
   130   $warnings[] = $lang->get('sysreqs_req_help_imagemagick');
   129 
   131 
   130 // Extension test: GMP
   132 $crypto_backend = install_get_crypto_backend();
   131 $req_gmp = function_exists('gmp_init');
   133 
   132 if ( !$req_gmp )
   134 if ( $crypto_backend == 'none' )
   133   $warnings[] = $lang->get('sysreqs_req_help_gmp');
   135   $warnings[] = $lang->get('sysreqs_req_help_crypto_none');
   134 
   136 else if ( $crypto_backend == 'bcmath' )
   135 // Extension test: Big_Int
   137   $warnings[] = $lang->get('sysreqs_req_help_crypto_bcmath');
   136 $req_bigint = function_exists('bi_from_str');
       
   137 if ( !$req_bigint && !$req_gmp )
       
   138   $warnings[] = $lang->get('sysreqs_req_help_bigint');
       
   139 
       
   140 // Extension test: BCMath
       
   141 $req_bcmath = function_exists('bcadd');
       
   142 if ( !$req_bcmath && !$req_bigint && !$req_gmp )
       
   143   $warnings[] = $lang->get('sysreqs_req_help_bcmath');
       
   144 
   138 
   145 ?>
   139 ?>
   146 
   140 
   147 <div style="float: right; padding-top: 10px;">
   141 <div style="float: right; padding-top: 10px;">
   148   <form action="install.php?stage=sysreqs" method="post">
   142   <form action="install.php?stage=sysreqs" method="post">
   263   endif;
   257   endif;
   264   ?>
   258   ?>
   265 </tr>
   259 </tr>
   266 
   260 
   267 <tr>
   261 <tr>
       
   262   <td>
       
   263     <?php echo $lang->get('sysreqs_req_crypto'); ?>
       
   264   </td>
       
   265   <?php
       
   266   if ( in_array($crypto_backend, array('bcmath', 'bigint', 'gmp')) )
       
   267   {
       
   268     echo '<td class="good">' . $lang->get("sysreqs_req_{$crypto_backend}") . '</td>';
       
   269   }
       
   270   else
       
   271   {
       
   272     echo '<td class="bad">' . $lang->get("sysreqs_req_notfound") . '</td>';
       
   273   }
       
   274   ?>
       
   275 </tr>
       
   276 
       
   277 <!-- Database -->
       
   278 
       
   279 <tr>
   268   <th colspan="2"><?php echo $lang->get('sysreqs_heading_dbms'); ?></th>
   280   <th colspan="2"><?php echo $lang->get('sysreqs_heading_dbms'); ?></th>
   269 </tr>
   281 </tr>
   270 
   282 
   271 <tr>
   283 <tr>
   272   <td><?php echo $lang->get('sysreqs_req_mysql'); ?></td>
   284   <td><?php echo $lang->get('sysreqs_req_mysql'); ?></td>
   371     <small><?php echo $lang->get('sysreqs_req_hint_imagemagick'); ?></small>
   383     <small><?php echo $lang->get('sysreqs_req_hint_imagemagick'); ?></small>
   372   </td>
   384   </td>
   373   <?php
   385   <?php
   374   if ( $req_imagick ):
   386   if ( $req_imagick ):
   375     echo '<td class="good">' . $lang->get('sysreqs_req_found') . ' <small>(' . htmlspecialchars($req_imagick) . ')</small></td>';
   387     echo '<td class="good">' . $lang->get('sysreqs_req_found') . ' <small>(' . htmlspecialchars($req_imagick) . ')</small></td>';
   376   else:
       
   377     echo '<td class="bad">' . $lang->get('sysreqs_req_notfound') . '</td>';
       
   378   endif;
       
   379   ?>
       
   380 </tr>
       
   381 
       
   382 <tr>
       
   383   <th colspan="2"><?php echo $lang->get('sysreqs_heading_crypto'); ?></th>
       
   384 </tr>
       
   385 
       
   386 <tr>
       
   387   <td>
       
   388     <?php echo $lang->get('sysreqs_req_gmp'); ?><br />
       
   389     <small><?php echo $lang->get('sysreqs_req_hint_gmp'); ?></small>
       
   390   </td>
       
   391   <?php
       
   392   if ( $req_gmp ):
       
   393     echo '<td class="good">' . $lang->get('sysreqs_req_supported') . '</td>';
       
   394   else:
       
   395     echo '<td class="bad">' . $lang->get('sysreqs_req_notfound') . '</td>';
       
   396   endif;
       
   397   ?>
       
   398 </tr>
       
   399 
       
   400 <tr>
       
   401   <td>
       
   402     <?php echo $lang->get('sysreqs_req_bigint'); ?><br />
       
   403     <small><?php echo $lang->get('sysreqs_req_hint_bigint'); ?></small>
       
   404   </td>
       
   405   <?php
       
   406   if ( $req_bigint ):
       
   407     echo '<td class="good">' . $lang->get('sysreqs_req_supported') . '</td>';
       
   408   else:
       
   409     echo '<td class="bad">' . $lang->get('sysreqs_req_notfound') . '</td>';
       
   410   endif;
       
   411   ?>
       
   412 </tr>
       
   413 
       
   414 <tr>
       
   415   <td>
       
   416     <?php echo $lang->get('sysreqs_req_bcmath'); ?><br />
       
   417     <small><?php echo $lang->get('sysreqs_req_hint_bcmath'); ?></small>
       
   418   </td>
       
   419   <?php
       
   420   if ( $req_bcmath ):
       
   421     echo '<td class="good">' . $lang->get('sysreqs_req_supported') . '</td>';
       
   422   else:
   388   else:
   423     echo '<td class="bad">' . $lang->get('sysreqs_req_notfound') . '</td>';
   389     echo '<td class="bad">' . $lang->get('sysreqs_req_notfound') . '</td>';
   424   endif;
   390   endif;
   425   ?>
   391   ?>
   426 </tr>
   392 </tr>