* (bug 28752) XCache doesn't work in CLI mode.
* (bug 28076) Thumbnail height limited to 360 pixels on Special:Listfiles
* (bug 22227) Special:Listfiles no longer throws an error on bogus file entries
+* (bug 19408) user_properties.up_property: 32 bytes is not enough.
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result.
* Helper function: check if the given key is present in the updatelog table.
* Obviously, only use this for updates that occur after the updatelog table was
* created!
+ * @param $key String Name of the key to check for
*/
public function updateRowExists( $key ) {
$row = $this->db->selectRow(
return (bool)$row;
}
+ /**
+ * Helper function: Add a key to the updatelog table
+ * Obviously, only use this for updates that occur after the updatelog table was
+ * created!
+ * @param $key String Name of key to insert
+ * @param $val String [optional] value to insert along with the key
+ */
+ public function insertUpdateRow( $key, $val = null ) {
+ $values = array( 'ul_key' => $key );
+ if( $val && $this->canUseNewUpdatelog() ) {
+ $values['ul_value'] = $val;
+ }
+ $this->db->insert( 'updatelog', $values, __METHOD__, 'IGNORE' );
+ }
+
/**
* Updatelog was changed in 1.17 to have a ul_value column so we can record
* more information about what kind of updates we've done (that's what this
* @param $fullpath Boolean: whether to treat $patch path as a relative or not
*/
public function modifyField( $table, $field, $patch, $fullpath = false ) {
+ $updateKey = "$table-$field-$patch";
if ( !$this->db->tableExists( $table ) ) {
$this->output( "...$table table does not exist, skipping modify field patch\n" );
} elseif ( !$this->db->fieldExists( $table, $field ) ) {
$this->output( "...$field field does not exist in $table table, skipping modify field patch\n" );
+ } elseif( $this->updateRowExists( $updateKey ) ) {
+ $this->output( "...$field in table $table already modified by patch $patch\n" );
} else {
$this->output( "Modifying $field field of table $table..." );
$this->applyPatch( $patch, $fullpath );
+ $this->insertUpdateRow( $updateKey );
$this->output( "ok\n" );
}
}
array( 'doCollationUpdate' ),
array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
+
+ // 1.18
+ array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
);
}