Source of file RMSUpgrade.php
Size: 0,694 Bytes - Last Modified: 2021-12-23T10:51:36+00:00
/var/www/docs.ssmods.com/process/src/code/Controllers/RMSUpgrade.php
12345678910111213141516171819202122232425262728293031323334353637383940 | <?php class RMSUpgrade extends Controller { private static $allowed_actions = array ( 'Upgrade210' ); private static $url_handlers = array( 'Upgrade210' => 'Upgrade210' ); //Change Listing FLag to new system public function Upgrade210(SS_HTTPRequest $request) { echo "Start Upgrade <br>\n"; $listings = Listing::get()->filter(array("IsNew" => '1')); echo "Upgrading ".$listings->count()."<br>\n"; if($listings->count()) { foreach($listings as $listing) { $listing->Flag = "New"; Debug::show($listing); //$listing->write(); //$listing->doPublish(); //$listing->destroy(); } } echo "Done"; } } |