Merge "Rewrite ORMTable::unprefixFieldNames"
[lhc/web/wiklou.git] / includes / db / ORMTable.php
index 755a851..31f32e5 100644 (file)
@@ -784,7 +784,11 @@ class ORMTable extends DBAccessBase implements IORMTable {
         * @return array
         */
        public function unprefixFieldNames( array $fieldNames ) {
-               return array_map( array( $this, 'unprefixFieldName' ), $fieldNames );
+               $start = strlen( $this->fieldPrefix );
+
+               return array_map( function( $fieldName ) use ( $start ) {
+                       return substr( $fieldName, $start );
+               }, $fieldNames );
        }
 
        /**