]> git.mxchange.org Git - friendica.git/commitdiff
Move Object\Profile to Model\Profile
authorHypolite Petovan <mrpetovan@gmail.com>
Thu, 7 Dec 2017 13:57:35 +0000 (08:57 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 8 Dec 2017 04:55:05 +0000 (23:55 -0500)
mod/profiles.php
src/Model/Profile.php [new file with mode: 0644]
src/Network/Probe.php
src/Object/Profile.php [deleted file]
src/Protocol/Diaspora.php
src/Protocol/PortableContact.php

index eca13bf10c087ce80028f0aa1b4b2eaef0db9240..2ed0daff1ce5e8c1a726674f48dd2f77499811bb 100644 (file)
@@ -10,8 +10,8 @@ use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 use Friendica\Model\GlobalContact;
+use Friendica\Model\Profile;
 use Friendica\Network\Probe;
-use Friendica\Object\Profile;
 
 function profiles_init(App $a) {
 
diff --git a/src/Model/Profile.php b/src/Model/Profile.php
new file mode 100644 (file)
index 0000000..0916e66
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * @file src/Model/Profile.php
+ */
+
+namespace Friendica\Model;
+
+class Profile
+{
+       /**
+        * @brief Returns a formatted location string from the given profile array
+        *
+        * @param array $profile Profile array (Generated from the "profile" table)
+        *
+        * @return string Location string
+        */
+       public static function formatLocation(array $profile)
+       {
+               $location = '';
+
+               if ($profile['locality']) {
+                       $location .= $profile['locality'];
+               }
+
+               if ($profile['region'] && ($profile['locality'] != $profile['region'])) {
+                       if ($location) {
+                               $location .= ', ';
+                       }
+
+                       $location .= $profile['region'];
+               }
+
+               if ($profile['country-name']) {
+                       if ($location) {
+                               $location .= ', ';
+                       }
+
+                       $location .= $profile['country-name'];
+               }
+
+               return $location;
+       }
+}
index 500aa7323fa42fc3b66ece4b4bdc9de1874202bf..320bb43cc1c76fa4f3db62aa9c4cac67b913a76d 100644 (file)
@@ -14,7 +14,7 @@ use Friendica\Core\System;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
-use Friendica\Object\Profile;
+use Friendica\Model\Profile;
 use Friendica\Protocol\Email;
 use Friendica\Util\XML;
 
diff --git a/src/Object/Profile.php b/src/Object/Profile.php
deleted file mode 100644 (file)
index 29925a9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/**
- * @file src/Object/Profile.php
- */
-
-namespace Friendica\Object;
-
-use Friendica\BaseObject;
-
-class Profile extends BaseObject
-{
-       /**
-        * @brief Returns a formatted location string from the given profile array
-        *
-        * @param array $profile Profile array (Generated from the "profile" table)
-        *
-        * @return string Location string
-        */
-       public static function formatLocation(array $profile)
-       {
-               $location = '';
-
-               if ($profile['locality']) {
-                       $location .= $profile['locality'];
-               }
-
-               if ($profile['region'] && ($profile['locality'] != $profile['region'])) {
-                       if ($location) {
-                               $location .= ', ';
-                       }
-
-                       $location .= $profile['region'];
-               }
-
-               if ($profile['country-name']) {
-                       if ($location) {
-                               $location .= ', ';
-                       }
-
-                       $location .= $profile['country-name'];
-               }
-
-               return $location;
-       }
-}
index 2cb5eb700b2258292f112d89b2866eb976ed3ee2..28989fb333fb791f3323aa736e1d21fbba2feb2e 100644 (file)
@@ -17,9 +17,9 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 use Friendica\Model\GlobalContact;
+use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 use Friendica\Object\Contact;
-use Friendica\Object\Profile;
 use Friendica\Util\XML;
 
 use dba;
index 1cc43f718d424bc86e903d075fd5a7744516bdaa..3e2defb2b79cd38573870fcec4959444dbf45eda 100644 (file)
@@ -13,8 +13,8 @@ use Friendica\Core\Config;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 use Friendica\Model\GlobalContact;
+use Friendica\Model\Profile;
 use Friendica\Network\Probe;
-use Friendica\Object\Profile;
 use dba;
 use DOMDocument;
 use DomXPath;