From 6c595e8e9a5f752f11d32c1690e9ba4f3ca99bf7 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 30 Jan 2016 13:50:35 +0100 Subject: [PATCH] Opps, left-overs from merge ... Signed-off-by: Roland Haeder --- plugins/Bookmark/classes/Bookmark.php | 18 ---------- plugins/Event/classes/RSVP.php | 4 --- plugins/OStatus/lib/salmonaction.php | 9 ----- .../actions/twitterauthorization.php | 33 ------------------- 4 files changed, 64 deletions(-) diff --git a/plugins/Bookmark/classes/Bookmark.php b/plugins/Bookmark/classes/Bookmark.php index 7fd3f53ac1..b593bc1909 100644 --- a/plugins/Bookmark/classes/Bookmark.php +++ b/plugins/Bookmark/classes/Bookmark.php @@ -92,16 +92,12 @@ class Bookmark extends Managed_DataObject * @return Bookmark The found bookmark object. * @throws NoResultException When you don't find it after all. */ -<<<<<<< .merge_file_ZPs3Af static public function fromStored(Notice $stored) { return self::getByPK(array('uri' => $stored->getUri())); } public function getStored() -======= - static function getByNotice(Notice $notice) ->>>>>>> .merge_file_eD7Wwf { return Notice::getByKeys(array('uri' => $this->getUri())); } @@ -161,12 +157,7 @@ class Bookmark extends Managed_DataObject * * @return Bookmark the Bookmark object */ -<<<<<<< .merge_file_ZPs3Af static function saveActivityObject(ActivityObject $actobj, Notice $stored) -======= - static function saveNew(Profile $profile, $title, $url, $rawtags, $description, - array $options=array()) ->>>>>>> .merge_file_eD7Wwf { $url = null; // each extra element is array('tagname', array('attr'=>'val', ...), 'content') @@ -186,20 +177,11 @@ class Bookmark extends Managed_DataObject throw new ClientException(sprintf(_m('Expected exactly 1 link rel=related in a Bookmark, got %1$d.'), count($relLinkEls))); } -<<<<<<< .merge_file_ZPs3Af if (!strlen($actobj->title)) { throw new ClientException(_m('You must provide a non-empty title.')); } if (!common_valid_http_url($url)) { throw new ClientException(_m('Only web bookmarks can be posted (HTTP or HTTPS).')); -======= - if (array_key_exists('uri', $options)) { - $other = Bookmark::getKV('uri', $options['uri']); - if (!empty($other)) { - // TRANS: Client exception thrown when trying to save a new bookmark that already exists. - throw new ClientException(_m('Bookmark already exists.')); - } ->>>>>>> .merge_file_eD7Wwf } try { diff --git a/plugins/Event/classes/RSVP.php b/plugins/Event/classes/RSVP.php index 7fa76d7151..f6b8c0aa7c 100644 --- a/plugins/Event/classes/RSVP.php +++ b/plugins/Event/classes/RSVP.php @@ -91,11 +91,7 @@ class RSVP extends Managed_DataObject ); } -<<<<<<< .merge_file_oq2F7C static public function beforeSchemaUpdate() -======= - function saveNew(Profile $profile, $event, $verb, array $options = array()) ->>>>>>> .merge_file_L3oA6C { $table = strtolower(get_called_class()); $schema = Schema::get(); diff --git a/plugins/OStatus/lib/salmonaction.php b/plugins/OStatus/lib/salmonaction.php index f328f0916a..2f48042820 100644 --- a/plugins/OStatus/lib/salmonaction.php +++ b/plugins/OStatus/lib/salmonaction.php @@ -79,17 +79,8 @@ class SalmonAction extends Action $this->clientError($e->getMessage()); } -<<<<<<< .merge_file_l1W8if // Cryptographic verification test, throws exception on failure $magic_env->verify($this->actor); -======= - // Cryptographic verification test - if (!$magic_env->verify($this->actor)) { - common_debug("Salmon signature verification failed."); - // TRANS: Client error. - $this->clientError(_m('Salmon signature verification failed.')); - } ->>>>>>> .merge_file_ISiK5f return true; } diff --git a/plugins/TwitterBridge/actions/twitterauthorization.php b/plugins/TwitterBridge/actions/twitterauthorization.php index d3df46bfef..c9b892b640 100644 --- a/plugins/TwitterBridge/actions/twitterauthorization.php +++ b/plugins/TwitterBridge/actions/twitterauthorization.php @@ -56,50 +56,17 @@ class TwitterauthorizationAction extends FormAction var $access_token = null; var $verifier = null; -<<<<<<< .merge_file_Bq71r4 protected $needLogin = false; // authorization page can also be used to create a new user -======= - /** - * Initialize class members. Looks for 'oauth_token' parameter. - * - * @param array $args misc. arguments - * - * @return boolean true - */ - function prepare(array $args=array()) - { - parent::prepare($args); ->>>>>>> .merge_file_Ad5nH4 protected function doPreparation() { $this->oauth_token = $this->arg('oauth_token'); $this->verifier = $this->arg('oauth_verifier'); -<<<<<<< .merge_file_Bq71r4 if ($this->scoped instanceof Profile) { try { $flink = Foreign_link::getByUserID($this->scoped->getID(), TWITTER_SERVICE); $fuser = $flink->getForeignUser(); -======= - return true; - } - - /** - * Handler method - * - * @param array $args is ignored since it's now passed in in prepare() - * - * @return nothing - */ - function handle(array $args=array()) - { - parent::handle($args); - - if (common_logged_in()) { - $user = common_current_user(); - $flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE); ->>>>>>> .merge_file_Ad5nH4 // If there's already a foreign link record and a foreign user // (no exceptions were thrown when fetching either of them...) -- 2.30.2