[geeklog-hg] geeklog: Added OpenSSL Library check (used by Oauth)

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Jul 21 10:37:50 EDT 2013


changeset 9219:de4cbb6815f0
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/de4cbb6815f0
user: Tom <websitemaster at cogeco.net>
date: Sun Jul 21 10:36:12 2013 -0400
description:
Added OpenSSL Library check (used by Oauth)

diffstat:

 language/english.php           |   6 +++++-
 language/english_utf-8.php     |   6 +++++-
 public_html/admin/envcheck.php |  23 ++++++++++++++++++-----
 3 files changed, 28 insertions(+), 7 deletions(-)

diffs (114 lines):

diff -r 7d74d79b126e -r de4cbb6815f0 language/english.php
--- a/language/english.php	Sat Jul 20 14:34:13 2013 -0400
+++ b/language/english.php	Sun Jul 21 10:36:12 2013 -0400
@@ -701,7 +701,8 @@
     'gd_not_found'              => 'Unable to locate the GD library functions.  Please ensure that the GD libraries were compiled into PHP or select an alternate graphics library.',
     'gd_ok'                     => 'GD Libraries v2 are installed.',
     'gd_v1'                     => 'GD Libraries v1 is installed - This version does not fully support JPG image processing so there may be some quality issues.',
-    'graphics'                  => 'Graphics Library',
+    'graphics'                  => 'Graphic Library',
+    'libraries'                 => 'Libraries',
     'hosting_env'               => 'Hosting Environment Check',
     'imagemagick'               => 'ImageMagick Programs',
     'im_not_found'              => 'Unable to locate the <strong>convert</strong> executable for ImageMagick.',
@@ -713,6 +714,9 @@
     'netpbm'                    => 'NetPBM Library',
     'np_ok'                     => 'The NetPBM library is installed',
     'np_not_found'              => 'The NetPBM executables were not found.',
+    'opensll_library'           => 'OpenSSL Library',
+    'openssl_ok'                => 'The OpenSSL library is loaded. This library is required if you wish to use the OAuth user login method with Geeklog.',
+    'openssl_not_found'         => 'The OpenSSL library is not loaded. This is required <strong>only</strong> if you wish to use the OAuth user login method with Geeklog.',
     'off'                       => 'Off',
     'ok'                        => 'OK',
     'on'                        => 'On',
diff -r 7d74d79b126e -r de4cbb6815f0 language/english_utf-8.php
--- a/language/english_utf-8.php	Sat Jul 20 14:34:13 2013 -0400
+++ b/language/english_utf-8.php	Sun Jul 21 10:36:12 2013 -0400
@@ -701,7 +701,8 @@
     'gd_not_found'              => 'Unable to locate the GD library functions.  Please ensure that the GD libraries were compiled into PHP or select an alternate graphics library.',
     'gd_ok'                     => 'GD Libraries v2 are installed.',
     'gd_v1'                     => 'GD Libraries v1 is installed - This version does not fully support JPG image processing so there may be some quality issues.',
-    'graphics'                  => 'Graphics Library',
+    'graphics'                  => 'Graphic Library',
+    'libraries'                 => 'Libraries',
     'hosting_env'               => 'Hosting Environment Check',
     'imagemagick'               => 'ImageMagick Programs',
     'im_not_found'              => 'Unable to locate the <strong>convert</strong> executable for ImageMagick.',
@@ -713,6 +714,9 @@
     'netpbm'                    => 'NetPBM Library',
     'np_ok'                     => 'The NetPBM library is installed',
     'np_not_found'              => 'The NetPBM executables were not found.',
+    'opensll_library'           => 'OpenSSL Library',
+    'openssl_ok'                => 'The OpenSSL library is loaded. This library is required if you wish to use the OAuth user login method with Geeklog.',
+    'openssl_not_found'         => 'The OpenSSL library is not loaded. This is required <strong>only</strong> if you wish to use the OAuth user login method with Geeklog.',
     'off'                       => 'Off',
     'ok'                        => 'OK',
     'on'                        => 'On',
diff -r 7d74d79b126e -r de4cbb6815f0 public_html/admin/envcheck.php
--- a/public_html/admin/envcheck.php	Sat Jul 20 14:34:13 2013 -0400
+++ b/public_html/admin/envcheck.php	Sun Jul 21 10:36:12 2013 -0400
@@ -107,6 +107,7 @@
     $rg = ini_get('register_globals');
     $sm = ini_get('safe_mode');
     $ob = ini_get('open_basedir');
+    
     $current = $rg == 1 ? '<span class="notok">'.$LANG_ENVCHECK['on'].'</span>' : '<span class="yes">'.$LANG_ENVCHECK['off'].'</span>';
     $data_arr[] = array('settings' => 'register_globals',
                           'current' => $current,
@@ -130,7 +131,7 @@
     $data_arr[] = array('settings' => 'open_basedir',
                           'current' => $current,
                           'recommended' => $LANG_ENVCHECK['off'],
-                          'notes' => $LANG_ENVCHECK['open_basedir']);    
+                          'notes' => $LANG_ENVCHECK['open_basedir']);  
 
     $memory_limit = _return_bytes(ini_get('memory_limit'));
     $memory_limit_print = ($memory_limit / 1024) / 1024;
@@ -138,7 +139,7 @@
     $data_arr[] = array('settings' => 'memory_limit',
                           'current' => $current,
                           'recommended' => '48M',
-                          'notes' => $LANG_ENVCHECK['memory_limit']);    
+                          'notes' => $LANG_ENVCHECK['memory_limit']);
 
     $fu = ini_get('file_uploads');
     $current = $fu == 1 ? '<span class="yes">'.$LANG_ENVCHECK['on'].'</span>' : '<span class="notok">'.$LANG_ENVCHECK['off'].'</span>';
@@ -168,23 +169,35 @@
     $data_arr[] = array('settings' => 'max_execution_time',
                           'current' => $current,
                           'recommended' => '30 secs',
-                          'notes' => $LANG_ENVCHECK['max_execution_time']);    
+                          'notes' => $LANG_ENVCHECK['max_execution_time']); 
     
     $admin_list = ADMIN_simpleList('', $header_arr, $text_arr, $data_arr);
     $T->set_var('php_settings_list', $admin_list);
     
     // ***********************************************
-    // Graphics Library
+    // Libraries
     $header_arr = array(      // display 'text' and use table field 'field'
         array('text' => $LANG_ENVCHECK['item'], 'field' => 'item'),
         array('text' => $LANG_ENVCHECK['status'], 'field' => 'status'),
         array('text' => $LANG_ENVCHECK['notes'], 'field' => 'notes')
     );
     $text_arr = array('has_menu' => false,
-                      'title'    => $LANG_ENVCHECK['graphics'],
+                      'title'    => $LANG_ENVCHECK['libraries'],
                       'form_url' => "{$_CONF['site_admin_url']}/envcheck.php"
     );
     $data_arr = array();
+    
+    if (extension_loaded('openssl')) {
+        $data_arr[] = array(
+            'item' => $LANG_ENVCHECK['opensll_library'],
+            'status' => '<span class="yes">' . $LANG_ENVCHECK['ok'] . '</span>',
+            'notes' => $LANG_ENVCHECK['openssl_ok']);
+    } else {
+        $data_arr[] = array(
+            'item' => $LANG_ENVCHECK['opensll_library'],
+            'status' => '<span class="notok">' .  $LANG_ENVCHECK['not_found'] . '</span>',
+            'notes' => $LANG_ENVCHECK['openssl_not_found']);
+    }
 
     if ( $sm != 1 && $open_basedir_restriction != 1 ) {
         switch ( $_CONF['image_lib'] ) {



More information about the geeklog-cvs mailing list