Index: trunk/extensions/MSSQLBackCompat/DatabaseMssqlOld.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | /** |
12 | 12 | * @ingroup Database |
13 | 13 | */ |
14 | | -class DatabaseMssql extends DatabaseBase { |
| 14 | +class DatabaseMssqlOld extends DatabaseBase { |
15 | 15 | |
16 | 16 | var $mAffectedRows; |
17 | 17 | var $mLastResult; |
— | — | @@ -523,7 +523,7 @@ |
524 | 524 | for( $i = 0; $i < $n; $i++ ) { |
525 | 525 | $meta = mssql_fetch_field( $res->result, $i ); |
526 | 526 | if( $field == $meta->name ) { |
527 | | - return new MSSQLField($meta); |
| 527 | + return new MSSQLOldField($meta); |
528 | 528 | } |
529 | 529 | } |
530 | 530 | return false; |
— | — | @@ -952,17 +952,33 @@ |
953 | 953 | /** |
954 | 954 | * @ingroup Database |
955 | 955 | */ |
956 | | -class MSSQLField extends MySQLField { |
| 956 | +class MSSQLOldField implements Field { |
957 | 957 | |
958 | 958 | function __construct() { |
959 | 959 | } |
960 | 960 | |
961 | 961 | static function fromText($db, $table, $field) { |
962 | | - $n = new MSSQLField; |
| 962 | + $n = new MSSQLOldField; |
963 | 963 | $n->name = $field; |
964 | 964 | $n->tablename = $table; |
965 | 965 | return $n; |
966 | 966 | } |
967 | 967 | |
| 968 | + function name() { |
| 969 | + return $this->name; |
| 970 | + } |
| 971 | + |
| 972 | + function tableName() { |
| 973 | + return $this->tableName; |
| 974 | + } |
| 975 | + |
| 976 | + function isNullable() { |
| 977 | + return true; |
| 978 | + } |
| 979 | + |
| 980 | + function type() { |
| 981 | + return ''; |
| 982 | + } |
| 983 | + |
968 | 984 | } // end DatabaseMssql class |
969 | 985 | |
Index: trunk/extensions/MSSQLBackCompat/MSSQLBackCompat.php |
— | — | @@ -0,0 +1,13 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$wgExtensionCredits['other'][] = array( |
| 5 | + 'path' => __FILE__, |
| 6 | + 'name' => 'MSSQLBackCompat', |
| 7 | + 'url' => '', |
| 8 | + 'author' => 'Sam Reed', |
| 9 | + 'descriptionmsg' => 'codereview-desc', |
| 10 | +); |
| 11 | + |
| 12 | +$dir = dirname( __FILE__ ) . '/'; |
| 13 | +$wgAutoloadClasses['DatabaseMssqlOld'] = $dir . 'DatabaseMssqlOld.php'; |
| 14 | +$wgAutoloadClasses['MSSQLOldField'] = $dir . 'DatabaseMssqlOld.php'; |
\ No newline at end of file |
Property changes on: trunk/extensions/MSSQLBackCompat/MSSQLBackCompat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 15 | + native |