Plugin Directory

Changeset 1797741


Ignore:
Timestamp:
01/05/2018 03:28:36 PM (8 years ago)
Author:
reifsnyderb
Message:

Version 1.24

Location:
dms/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • dms/trunk/dms.php

    r1775329 r1797741  
    44Plugin URI: http://blitzenware.com
    55Description: The complete document management solution.
    6 Version: 1.21
     6Version: 1.24
    77Author: Brian E. Reifsnyder
    88Author URI: http://blitzenware.com
     
    4040}
    4141
    42 define( 'DMS_VERSION', '1.21' );
    43 define( 'DMS_RELEASE_DATE', date_i18n( 'F j, Y', strtotime( '11/25/2017' ) ) );
     42define( 'DMS_VERSION', '1.24' );
     43define( 'DMS_RELEASE_DATE', date_i18n( 'F j, Y', strtotime( '01/05/2018' ) ) );
    4444define( 'DMS_DIR', plugin_dir_path( __FILE__ ) );
    4545define( 'DMS_URL', plugin_dir_url( __FILE__ ) );
  • dms/trunk/includes/general/i_db_upgrade.php

    r1775329 r1797741  
    4343        if ($old_version==1.17) dms_update_0117();
    4444        if ($old_version==1.20) dms_update_0120();
     45        if ($old_version==1.21) dms_update_0121();
     46        if ($old_version==1.22) dms_update_0122();
     47        if ($old_version==1.23) dms_update_0123();
    4548
    4649
     
    326329    }
    327330
    328 
     331function dms_update_0121()
     332    {
     333    global $dmsdb;
     334
     335    $query  = "UPDATE ".$dmsdb->prefix("dms_config")." ";
     336    $query .= "SET data='1.22' WHERE name='version'";
     337    $dmsdb->query($query);
     338    }
     339
     340function dms_update_0122()
     341    {
     342    global $dmsdb;
     343
     344    $query  = "UPDATE ".$dmsdb->prefix("dms_config")." ";
     345    $query .= "SET data='1.23' WHERE name='version'";
     346    $dmsdb->query($query);
     347    }
     348
     349function dms_update_0123()
     350    {
     351    global $dmsdb;
     352
     353    $query  = "UPDATE ".$dmsdb->prefix("dms_config")." ";
     354    $query .= "SET data='1.24' WHERE name='version'";
     355    $dmsdb->query($query);
     356    }
    329357
    330358
  • dms/trunk/includes/general/i_pal_wordpress.php

    r1768471 r1797741  
    140140    function query($query, $instruct = "")
    141141    {
    142     if ($dms_mysqli_db == 0) $this->connect();
     142//print "A";
     143    global $dms_mysqli_db;
     144
     145//print gettype($dms_mysqli_db);
     146
     147        if(gettype($dms_mysqli_db) == "integer")
     148        {
     149        //print "INTEGER";
     150            if($dms_mysqli_db == 0)
     151            {
     152                //print "CONNECT";
     153                $this->connect();
     154            }
     155        }
    143156
    144157        //  Sanitize query.
    145 
     158//print "B";
    146159        //  Remove ;
    147160        $query = str_replace(";","",$query);
    148 //        $position = stripos($query,";");
    149 //        if($position !== false) $query = substr($query,0,$position);
     161        // $position = stripos($query,";");
     162        // if($position !== false) $query = substr($query,0,$position);
    150163
    151164        //   Remove --
     
    163176
    164177        //  Remove \
    165         $query = str_replace("\\","",$query);
    166 //var_dump ($query);
    167 
    168 //print "A";
    169          global $dms_mysqli_db;
    170          $result = $dms_mysqli_db->query($query);
    171 //print "B";
    172 /*
    173 NOTE:  mysql_query no longer support as of PHP 5.5.0
    174 
    175         if($this->use_mysqli == true)
    176             {
    177             global $dms_mysqli_db;
    178 
    179             $result = $dms_mysqli_db->query($query);
    180             }
    181         else
    182             {
    183             $result = mysql_query($query) or trigger_error(mysql_error().$sql);
    184             }
    185 */
    186 //var_dump($result);
    187 
    188 
    189 /*
    190         if($result == FALSE)
    191             {
    192             print "Query Error:\r";
    193             print "  Query:  ".$query."\r";
    194             print "  Instruction:  ".$instruct."\r";
    195             exit(0);
    196             }
    197 */
    198 
    199         if(
     178        //$query = str_replace("\\","",$query);     Causes problems with Windows servers.
     179        //var_dump ($query);
     180
     181//print "C";
     182        //global $dms_mysqli_db;
     183        $result = $dms_mysqli_db->query($query);
     184//print "D";
     185
     186        if(
    200187            ($result != FALSE) &&
    201188            (stripos($query, "SELECT") == 0) &&
    202189            (stristr($query, "SELECT") != false ))
    203                 {
    204                 $this->num_rows = $result->num_rows;
    205 /*
    206                 if($this->use_mysqli == true)
    207                     {
    208                     $this->num_rows = $result->num_rows;
    209                     }
    210                 else
    211                     {
    212                     $this->num_rows = mysql_num_rows($result);
    213                     }
    214 */
    215                 }
    216         else
     190            {
     191            $this->num_rows = $result->num_rows;
     192            }
     193        else
    217194            {
    218195            $this->num_rows = 0;
    219196            }
    220 
    221         if ( ($this->num_rows == 1) && (strlen($instruct) > 0 ) )
    222             {
    223             $result = mysqli_fetch_object($result);
    224 
    225 /*
    226             if($this->use_mysqli == true)
    227                 {
    228                 $result = mysqli_fetch_object($result);
    229                 }
    230             else
    231                 {
    232                 $result = mysql_fetch_object($result);
    233                 }
    234 */
    235             if($instruct == "ROW") return $result;
    236             $result = $result->$instruct;
    237             }
    238 
    239         return $result;
    240     }
    241 
    242 
     197//print "E";
     198        if ( ($this->num_rows == 1) && (strlen($instruct) > 0 ) )
     199            {
     200            $result = mysqli_fetch_object($result);
     201
     202            if($instruct == "ROW") return $result;
     203            $result = $result->$instruct;
     204            }
     205
     206        return $result;
     207    }
    243208}
     209
     210
    244211$dmsdb = new dms_pal_db();
    245212
  • dms/trunk/pages/config.php

    r1768471 r1797741  
    1111
    1212global $dmsdb, $dms_config, $dms_global;
     13$dms_admin_flag = $dms_global['dms_admin_flag'];
     14
     15if(!$dms_admin_flag)
     16    {
     17    dms_redirect($dms_config['dms_url']);
     18    exit(0);
     19    }
    1320
    1421$os_types = array(0=>"Unknown",1=>"Linux",2=>"Unix",3=>"Windows");
  • dms/trunk/pages/diags.php

    r1768471 r1797741  
    6666print "&nbsp;&nbsp;Cached Database Version = ". $dms_config['version'] . "<BR>\r";
    6767
     68$query = "SELECT count(*) as num_docs FROM ".$dmsdb->prefix("dms_objects")." WHERE obj_type='".FILE."'";
     69$num_docs = $dmsdb->query($query,'num_docs');
     70
     71print "&nbsp;&nbsp;Number of Documents = ". $num_docs . "<BR>\r";
     72
    6873
    6974///////////////
     
    97102
    98103print "&nbsp;&nbsp;WordPress Version = ". get_bloginfo('version') . "<BR>\r";
     104
     105$theme = wp_get_theme();
     106$theme_name = $theme->get('Name');
     107$theme_version = $theme->get('Version');
     108
     109print "&nbsp;&nbsp;Theme Name = " . $theme_name . "<BR>\r";
     110print "&nbsp;&nbsp;Theme Version = " . $theme_version . "<BR>\r";
     111
     112
    99113print "&nbsp;&nbsp;Multisite = ";
    100114$ms_output = "N/A";
     
    118132print "&nbsp;&nbsp;upload_max_filesize = ". ini_get("upload_max_filesize") . "<BR>\r";
    119133
     134$error_reporting_settings_int = error_reporting();
     135
     136$error_reporting_string = "";
     137$er_spaces = "&nbsp;&nbsp;&nbsp;";
     138
     139$er_beginning_spaces = "";
     140
     141for($space_loop = 0; $space_loop < 25; $space_loop++)
     142{
     143    $er_beginning_spaces .= "&nbsp;";
     144}
     145
     146if($error_reporting_settings_int & E_ERROR) $error_reporting_string .= "E_ERROR" . $er_spaces;
     147if($error_reporting_settings_int & E_WARNING) $error_reporting_string .= "E_WARNING" . $er_spaces;
     148if($error_reporting_settings_int & E_PARSE) $error_reporting_string .= "E_PARSE" . $er_spaces;
     149if($error_reporting_settings_int & E_NOTICE) $error_reporting_string .= "E_NOTICE" . $er_spaces;
     150if($error_reporting_settings_int & E_CORE_ERROR) $error_reporting_string .= "E_CORE_ERROR" . $er_spaces;
     151if($error_reporting_settings_int & E_CORE_WARNING) $error_reporting_string .= "E_CORE_WARNING" . "<BR>" . $er_beginning_spaces;
     152if($error_reporting_settings_int & E_COMPILE_ERROR) $error_reporting_string .= "E_COMPILE_ERROR" . $er_spaces;
     153if($error_reporting_settings_int & E_COMPILE_WARNING) $error_reporting_string .= "E_COMPILE_WARNING" . $er_spaces;
     154if($error_reporting_settings_int & E_USER_ERROR) $error_reporting_string .= "E_USER_ERROR" . $er_spaces;
     155if($error_reporting_settings_int & E_USER_WARNING) $error_reporting_string .= "E_USER_WARNING" . $er_spaces;
     156if($error_reporting_settings_int & E_USER_NOTICE) $error_reporting_string .= "E_USER_NOTICE" . $er_spaces;
     157if($error_reporting_settings_int & E_STRICT) $error_reporting_string .= "E_STRICT" . "<BR>" . $er_beginning_spaces;
     158if($error_reporting_settings_int & E_RECOVERABLE_ERROR) $error_reporting_string .= "E_RECOVERABLE_ERROR" . $er_spaces;
     159if($error_reporting_settings_int & E_DEPRECATED) $error_reporting_string .= "E_DEPRECATED" . $er_spaces;
     160if($error_reporting_settings_int & E_USER_DEPRECATED) $error_reporting_string .= "E_USER_DEPRECATED" . $er_spaces;
     161if($error_reporting_settings_int & E_ALL) $error_reporting_string .= "E_ALL";
     162
     163print "&nbsp;&nbsp;error_reporting = " . $error_reporting_string . "<BR>\r";
     164
     165/*
     166print "&nbsp;&nbsp;&nbsp;&nbsp;<table><tr><td width = 125>error_reporting = </td><td>";
     167print $error_reporting_string;
     168print "</td></tr></table><BR>\r";
     169*/
    120170///////////////////////
    121171//  Database Connection
  • dms/trunk/pages/file_retrieve.php

    r1775329 r1797741  
    5959if( $dms_global['dms_pro_dir'] != "FALSE" )
    6060    {
    61     print "dms_global dms_pro_dir != false<br>";
     61    //print "dms_global dms_pro_dir != false<br>";
    6262
    6363
  • dms/trunk/pages/folder_new.php

    r1768471 r1797741  
    2727
    2828    if($dms_users->admin() == FALSE)
    29 //  if(!$xoopsUser->IsAdmin())
    3029            {
    3130            $active_folder_perms = dms_perms_level($active_folder);
  • dms/trunk/readme.txt

    r1775329 r1797741  
    9898== Changelog ==
    9999
     100= 1.24 =
     101* Fixed security issue with configuration page.  Only administrators can access this page.
     102* Fixed security issue with diagnostic page.  Only administrators can access this page.
     103
     104= 1.23 =
     105* Commented out a piece of debugging code that was accidentally left in in file_retrieve.php.
     106
     107= 1.22 =
     108* Fixed a mysqli problem in i_pal_wordpress.php.
     109
    100110= 1.21 =
    101111* Fixed a file retrieval error that resulted in an Internal Server Error 500 when retrieving a file.
     
    193203== Upgrade Notice ==
    194204
     205= 1.24 =
     206* Fixed security issue with configuration page.  Only administrators can access this page.
     207* Fixed security issue with diagnostic page.  Only administrators can access this page.
     208
     209= 1.23 =
     210* Commented out a piece of debugging code that was accidentally left in in file_retrieve.php.
     211
     212= 1.22 =
     213* Fixed a mysqli problem in i_pal_wordpress.php.
     214
    195215= 1.21 =
    196216* Fixed a file retrieval error that resulted in an Internal Server Error 500 when retrieving a file.
Note: See TracChangeset for help on using the changeset viewer.