[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 // This corrects files which incorrectly had a 'cancdn' property written; 4 // the property should be 'canCDN'. 5 6 $table = new PhabricatorFile(); 7 $conn_w = $table->establishConnection('w'); 8 foreach (new LiskMigrationIterator($table) as $file) { 9 $id = $file->getID(); 10 echo "Updating capitalization of canCDN property for file {$id}...\n"; 11 $meta = $file->getMetadata(); 12 13 if (isset($meta['cancdn'])) { 14 $meta['canCDN'] = $meta['cancdn']; 15 unset($meta['cancdn']); 16 17 queryfx( 18 $conn_w, 19 'UPDATE %T SET metadata = %s WHERE id = %d', 20 $table->getTableName(), 21 json_encode($meta), 22 $id); 23 } 24 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |