From: Mikael Nordfeldth Date: Wed, 8 Jul 2015 10:30:21 +0000 (+0200) Subject: Delete notice script added. Give an ID or URI. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2103075ffaa94d56549a2b34fc0d266ff91d3603;p=quix0rs-gnu-social.git Delete notice script added. Give an ID or URI. --- diff --git a/scripts/delete_notice.php b/scripts/delete_notice.php new file mode 100755 index 0000000000..bf10cbb2b2 --- /dev/null +++ b/scripts/delete_notice.php @@ -0,0 +1,68 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); + +$shortoptions = 'i::n::u::y'; +$longoptions = array('id=', 'nickname=', 'uri=', 'yes'); + +$helptext = <<getID()." by '".$notice->getProfile()->getNickname()."'. Are you sure? [y/N] "; + $response = fgets(STDIN); + if (strtolower(trim($response)) != 'y') { + print "Aborting.\n"; + exit(0); + } +} + +print "Deleting..."; +$notice->delete(); +print "DONE.\n";