Bugfixes: Login system properly handles blank password situation (returns ""); fading button now works right with relative URLs
authorDan
Sat, 07 Jul 2007 23:06:28 -0400
changeset 54 84b56303cab5
parent 53 3dea509d88ae
child 55 622d04f8719d
Bugfixes: Login system properly handles blank password situation (returns ""); fading button now works right with relative URLs
includes/rijndael.php
includes/template.php
--- a/includes/rijndael.php	Sat Jul 07 22:54:20 2007 -0400
+++ b/includes/rijndael.php	Sat Jul 07 23:06:28 2007 -0400
@@ -744,6 +744,8 @@
    
   function encrypt($text, $key, $return_encoding = ENC_HEX)
   {
+    if ( $text == '' )
+      return '';
     if ( $this->mcrypt && $this->blockSizeInBits == mcrypt_module_get_algo_block_size(eval('return MCRYPT_RIJNDAEL_'.$this->keySizeInBits.';')) )
     {
       $iv_size = mcrypt_get_iv_size($this->mcrypt, MCRYPT_MODE_ECB);
@@ -800,6 +802,8 @@
    
   function decrypt($text, $key, $input_encoding = ENC_HEX)
   {
+    if ( $text == '' )
+      return '';
     switch($input_encoding)
     {
       case ENC_BINARY:
@@ -997,7 +1001,8 @@
   }
    
   function encrypt($str, $key) {
-      if ($str == "") {
+      if ($str == "")
+      {
           return "";
       }
       $v = $this->str2long($str, true);
--- a/includes/template.php	Sat Jul 07 22:54:20 2007 -0400
+++ b/includes/template.php	Sat Jul 07 23:06:28 2007 -0400
@@ -28,12 +28,7 @@
    * @var string
    */
   
-  var $fading_button = '<a href="http://enanocms.org" onclick="window.open(this.href); return false;" style="text-align: center; margin: 0 auto; display: table; background-image: none;">
-                          <img alt="Powered by Enano CMS" style="border-width: 0; position: absolute;" 
-                               src="/images/about-powered-enano.png" id="enanoFader" onmouseover="domOpacity(this, 100, 0, 500);" 
-                               onmouseout="opacity(this.id, 0, 100, 500);" />
-                          <img alt="Powered by Enano CMS" style="border-width: 0px;" src="/images/about-powered-enano-hover.png" />
-                        </a>';
+  var $fading_button = '';
   
   function __construct()
   {
@@ -47,6 +42,13 @@
     $this->plugin_blocks = Array();
     $this->theme_loaded = false;
     
+    $fading_button = '<a href="http://enanocms.org" onclick="window.open(this.href); return false;" style="text-align: center; margin: 0 auto; display: table; background-image: none;">
+                            <img alt="Powered by Enano CMS" style="border-width: 0; position: absolute;" 
+                                 src="' . scriptPath . '/images/about-powered-enano.png" id="enanoFader" onmouseover="domOpacity(this, 100, 0, 500);" 
+                                 onmouseout="opacity(this.id, 0, 100, 500);" />
+                            <img alt="Powered by Enano CMS" style="border-width: 0px;" src="' . scriptPath . '/images/about-powered-enano-hover.png" />
+                          </a>';
+    
     $this->theme_list = Array();
     $this->named_theme_list = Array();
     $e = $db->sql_query('SELECT theme_id,theme_name,enabled,default_style FROM '.table_prefix.'themes WHERE enabled=1 ORDER BY theme_order;');