Changeset 2703 in subversion


Ignore:
Timestamp:
Jul 3, 2009 9:18:39 AM (4 years ago)
Author:
thomasb
Message:

Use spl_autoload_register() instead of autoload (#1485947) + fix indentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/iniset.php

    r2667 r2703  
    7979 * @todo Make our classes conform to a more straight forward CS. 
    8080 */ 
    81 function __autoload($classname) 
     81function rcube_autoload($classname) 
    8282{ 
    8383  $filename = preg_replace( 
    84       array('/MDB2_(.+)/', 
    85             '/Mail_(.+)/', 
    86             '/Net_(.+)/', 
    87             '/^html_.+/', 
    88             '/^utf8$/', 
    89             '/html2text/' 
    90         ), 
    91       array('MDB2/\\1', 
    92             'Mail/\\1', 
    93             'Net/\\1', 
    94             'html', 
    95             'utf8.class', 
    96             'lib/html2text'     // see #1485505 
    97         ), 
     84      array( 
     85        '/MDB2_(.+)/', 
     86        '/Mail_(.+)/', 
     87        '/Net_(.+)/', 
     88        '/^html_.+/', 
     89        '/^utf8$/', 
     90        '/html2text/' 
     91      ), 
     92      array( 
     93        'MDB2/\\1', 
     94        'Mail/\\1', 
     95        'Net/\\1', 
     96        'html', 
     97        'utf8.class', 
     98        'lib/html2text'  // see #1485505 
     99      ), 
    98100      $classname 
    99101  ); 
    100102  include $filename. '.php'; 
    101103} 
     104 
     105spl_autoload_register('rcube_autoload'); 
    102106 
    103107/** 
Note: See TracChangeset for help on using the changeset viewer.