diff --git a/lib/classes/record/Interface.class.php b/lib/classes/record/Interface.class.php index 1730c36fe7..a97c859d17 100644 --- a/lib/classes/record/Interface.class.php +++ b/lib/classes/record/Interface.class.php @@ -97,8 +97,6 @@ interface record_Interface public function get_reg_name(); - public function get_bitly_link(); - public function get_hd_file(); public function delete(); diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index ef12549ae0..bd039fbc82 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -1376,54 +1376,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface return $regname; } - /** - * - * @return string - */ - public function get_bitly_link() - { - - $registry = registry::get_instance(); - - if ($this->bitly_link !== null) - return $this->bitly_link; - - $this->bitly_link = false; - - if (trim($registry->get('GV_bitly_user')) == '' - && trim($registry->get('GV_bitly_key')) == '') - return $this->bitly_link; - - try - { - $short = new PHPShortener(); - $bitly = $short->encode($url . 'view/', 'bit.ly', $registry); - - if (preg_match('/^(http:\/\/)?(www\.)?([^\/]*)\/(.*)$/', $bitly, $results)) - { - if ($results[3] && $results[4]) - { - $hash = 'http://bit.ly/' . $results[4]; - $sql = 'UPDATE record SET bitly = :hash WHERE record_id = :record_id'; - - $connbas = connection::getPDOConnection($this->get_sbas_id()); - $stmt = $connbas->prepare($sql); - $stmt->execute(array(':hash' => $hash, ':record_id' => $this->get_record_id())); - $stmt->closeCursor(); - - $this->bitly_link = 'http://bit.ly/' . $hash; - } - } - } - catch (Exception $e) - { - unset($e); - } - $this->delete_data_from_cache(); - - return $this->bitly_link; - } - /** * * @param collection $collection diff --git a/lib/vendor/symfony b/lib/vendor/symfony index 6924e63587..4316595dbb 160000 --- a/lib/vendor/symfony +++ b/lib/vendor/symfony @@ -1 +1 @@ -Subproject commit 6924e63587466c865ca8dc746ff3fcf5cd1a1dcf +Subproject commit 4316595dbb7be9dcf2156d090d52f23f11b1ea90 diff --git a/templates/web/prod/preview/popularity.html b/templates/web/prod/preview/popularity.html index 86b56bd55d..b66e47694c 100644 --- a/templates/web/prod/preview/popularity.html +++ b/templates/web/prod/preview/popularity.html @@ -1,12 +1,4 @@ - {% if record.get_bitly_link() and user.ACL().has_right_on_base(record.get_base_id(), 'canreport') %} -