@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Better destruction of PhameBlog, BadgesBadge

Summary: Allows proper destruction of Badge Awards and Phame Posts.

Test Plan: bin/remove destroy PHID...

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16182

+8 -6
+1 -1
src/applications/badges/storage/PhabricatorBadgesBadge.php
··· 186 186 ->execute(); 187 187 188 188 foreach ($awards as $award) { 189 - $engine->destroyObjectPermanently($award); 189 + $engine->destroyObject($award); 190 190 } 191 191 192 192 $this->openTransaction();
+5 -3
src/applications/phame/storage/PhameBlog.php
··· 322 322 323 323 $this->openTransaction(); 324 324 325 - $posts = id(new PhamePost()) 326 - ->loadAllWhere('blogPHID = %s', $this->getPHID()); 325 + $posts = id(new PhamePostQuery()) 326 + ->setViewer($engine->getViewer()) 327 + ->withBlogPHIDs(array($this->getPHID())) 328 + ->execute(); 327 329 foreach ($posts as $post) { 328 - $post->delete(); 330 + $engine->destroyObject($post); 329 331 } 330 332 $this->delete(); 331 333
+2 -2
src/applications/phame/storage/PhamePost.php
··· 258 258 return $timeline; 259 259 } 260 260 261 + 261 262 /* -( PhabricatorDestructibleInterface )----------------------------------- */ 263 + 262 264 263 265 public function destroyObjectPermanently( 264 266 PhabricatorDestructionEngine $engine) { 265 267 266 268 $this->openTransaction(); 267 - 268 269 $this->delete(); 269 - 270 270 $this->saveTransaction(); 271 271 } 272 272