]> git.mxchange.org Git - friendica-addons.git/blobdiff - statusnet/statusnet.php
modified: statusnet.tgz Set up tabs in code correctly.
[friendica-addons.git] / statusnet / statusnet.php
index bf606cba0b5811b7759a8c881404bc19c000d309..f558cbec07ec5a467608988df7dfe8f2e8ea0060 100755 (executable)
@@ -407,19 +407,19 @@ function statusnet_post_hook(&$a,&$b) {
                        $shortlink = "";
                        require_once('library/slinky.php');
                        $slinky = new Slinky( $b['plink'] );
-            $yourls_url = get_config('yourls','url1');
-            if ($yourls_url) {
-                $yourls_username = get_config('yourls','username1');
-                $yourls_password = get_config('yourls', 'password1');
+                       $yourls_url = get_config('yourls','url1');
+                       if ($yourls_url) {
+                               $yourls_username = get_config('yourls','username1');
+                               $yourls_password = get_config('yourls', 'password1');
                                $yourls_ssl = get_config('yourls', 'ssl1');
-                $yourls = new Slinky_YourLS();
-                $yourls->set( 'username', $yourls_username );
-                $yourls->set( 'password', $yourls_password );
+                               $yourls = new Slinky_YourLS();
+                               $yourls->set( 'username', $yourls_username );
+                               $yourls->set( 'password', $yourls_password );
                                $yourls->set( 'ssl', $yourls_ssl );
-                $yourls->set( 'yourls-url', $yourls_url );
-                $slinky->set_cascade( array( $yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) );
-            }
-            else {
+                               $yourls->set( 'yourls-url', $yourls_url );
+                               $slinky->set_cascade( array( $yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) );
+                       }
+                       else {
                                // setup a cascade of shortening services
                                // try to get a short link from these services
                                // in the order ur1.ca, trim, id.gd, tinyurl
@@ -429,9 +429,9 @@ function statusnet_post_hook(&$a,&$b) {
                        // the new message will be shortened such that "... $shortlink"
                        // will fit into the character limit
                        $msg = substr($msg, 0, $max_char-strlen($shortlink)-4);
-            $msg .= '... ' . $shortlink;
+                       $msg .= '... ' . $shortlink;
                }
-        // and now tweet it :-)
+               // and now tweet it :-)
                if(strlen($msg))
                        $dent->post('statuses/update', array('status' => $msg));
        }