public function run($request)
 {
     // output
     echo "<br />\n<br />\nPurging...<br />\n<br />\n";
     flush();
     ob_flush();
     foreach (Tweet::get() as $page) {
         echo "Deleting " . $page->Title . "\n";
         $page->delete();
     }
     foreach (Versioned::get_by_stage('Tweet', 'Stage') as $page) {
         echo "Deleting From Stage: " . $page->Title . "\n";
         $page->deleteFromStage('Stage');
     }
     foreach (Versioned::get_by_stage('Tweet', 'Live') as $page) {
         echo "Deleting From Live: " . $page->Title . "\n";
         $page->deleteFromStage('Live');
     }
 }
Ejemplo n.º 2
0
 public function run($request)
 {
     // eol
     $eol = php_sapi_name() == 'cli' ? "\n" : "<br>\n";
     // output
     echo $eol . $eol . 'Purging...' . $eol . $eol;
     flush();
     @ob_flush();
     foreach (Tweet::get() as $page) {
         echo "Deleting " . $page->Title . $eol;
         $page->delete();
     }
     foreach (Versioned::get_by_stage('Tweet', 'Stage') as $page) {
         echo "Deleting From Stage: " . $page->Title . $eol;
         $page->deleteFromStage('Stage');
     }
     foreach (Versioned::get_by_stage('Tweet', 'Live') as $page) {
         echo "Deleting From Live: " . $page->Title . $eol;
         $page->deleteFromStage('Live');
     }
 }