]> git.mxchange.org Git - friendica.git/blobdiff - mod/update_profile.php
Merge pull request #7828 from nupplaphil/task/move_enotify
[friendica.git] / mod / update_profile.php
index 4d1f158b39dd9f12871e1e8c5546a286cfc65601..85ca3d3c975def5d56395fb2dc79cf44980fc329 100644 (file)
@@ -8,8 +8,7 @@
 use Friendica\App;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
-
-require_once 'mod/profile.php';
+use Friendica\Module\Profile;
 
 function update_profile_content(App $a) {
 
@@ -29,13 +28,9 @@ function update_profile_content(App $a) {
         * on the client side and then swap the image back.
         */
 
-       $text = profile_content($a, $profile_uid);
-
-       $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
-       $replace = "<img\${1} dst=\"\${2}\"";
-       $text = preg_replace($pattern, $replace, $text);
+       $text = Profile::content([], $profile_uid);
 
-       if (PConfig::get(local_user(), "system", "bandwith_saver")) {
+       if (PConfig::get(local_user(), "system", "bandwidth_saver")) {
                $replace = "<br />".L10n::t("[Embedded content - reload page to view]")."<br />";
                $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
                $text = preg_replace($pattern, $replace, $text);
@@ -51,5 +46,5 @@ function update_profile_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
\ No newline at end of file