]> git.mxchange.org Git - friendica.git/commitdiff
Merge commit 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Thu, 5 Apr 2012 22:00:46 +0000 (00:00 +0200)
committerMichael Vogel <icarus@dabo.de>
Thu, 5 Apr 2012 22:00:46 +0000 (00:00 +0200)
htconfig.php
include/bbcode.php
include/html2plain.php
include/pidfile.php [new file with mode: 0644]
include/poller.php
view/api_test_xml.tpl [new file with mode: 0644]
view/theme/diabook/style-network.css
view/theme/diabook/style-profile.css
view/theme/diabook/style-settings.css
view/theme/diabook/style.css
view/theme/vier/style.css

index 9d9c8a2c791ddd185a2d68949f4add5c5d6c76ec..63a40c8090417866535283e73af7dc7347a6bc36 100755 (executable)
@@ -83,5 +83,8 @@ $a->config['system']['no_regfullname'] = true;
 // If set to true the priority settings of ostatus contacts are used
 $a->config['system']['ostatus_use_priority'] = false;
 
-// If enabled all items are cached in the given directory
+// If enabled, all items are cached in the given directory
 $a->config['system']['itemcache'] = "";
+
+// If enabled, the lockpath is used for a lockfile to check if the poller is running
+$a->config['system']['lockpath'] = "";
index 9befbd0f7963a390a2c76776e3989d3aa803b12f..3697f1fc5d1dccbea26eb3c06f561e5e83edf60b 100644 (file)
@@ -230,7 +230,8 @@ function bbcode($Text,$preserve_nl = false) {
                                     $Text);
 
        // [img=widthxheight]image source[/img]
-       $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
+       //$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
+       $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="width: $1px;" >', $Text);
 
        // Images
        // [img]pathtoimage[/img]
index fe0e3326e81a8ae35bcbc0791931e9dcc738e92a..7aa20500a57a1ad2594fa4f489743035dc343ebb 100644 (file)
@@ -83,12 +83,15 @@ function collecturls($message) {
        $urls = array();
        foreach ($result as $treffer) {
                // A list of some links that should be ignored
-               $list = array("/user/", "/tag/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
+               $list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
                                "//facebook.com/profile.php?id=", "//plus.google.com/");
                foreach ($list as $listitem)
                        if (strpos($treffer[1], $listitem) !== false)
                                $ignore = true;
 
+               if ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/posts") !== false))
+                               $ignore = false;
+
                if (!$ignore)
                        $urls[$treffer[1]] = $treffer[1];
        }
diff --git a/include/pidfile.php b/include/pidfile.php
new file mode 100644 (file)
index 0000000..47df8d1
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+class pidfile {
+       private $_file;
+       private $_running;
+
+       public function __construct($dir, $name) {
+               $this->_file = "$dir/$name.pid";
+
+               if (file_exists($this->_file)) {
+                       $pid = trim(file_get_contents($this->_file));
+                       if (posix_kill($pid, 0)) {
+                               $this->_running = true;
+                       }
+               }
+
+               if (! $this->_running) {
+                       $pid = getmypid();
+                       file_put_contents($this->_file, $pid);
+               }
+       }
+
+       public function __destruct() {
+               if ((! $this->_running) && file_exists($this->_file)) {
+                       unlink($this->_file);
+               }
+       }
+
+       public function is_already_running() {
+               return $this->_running;
+       }
+}
+?>
index 90a97867c204e5abae28479262c8729e5320b242..499483d007dea6ecaffde1d9c4d0fffb420e79e3 100755 (executable)
@@ -25,10 +25,20 @@ function poller_run($argv, $argc){
        require_once('include/Contact.php');
        require_once('include/email.php');
        require_once('include/socgraph.php');
+       require_once('include/pidfile.php');
 
        load_config('config');
        load_config('system');
 
+       $lockpath = get_config('system','lockpath');
+       if ($lockpath != '') {
+               $pidfile = new pidfile($lockpath, 'poller.lck');
+               if($pidfile->is_already_running()) {
+                       logger("poller: Already running");
+                       exit;
+               }
+       }
+
        $a->set_baseurl(get_config('system','url'));
 
        load_hooks();
diff --git a/view/api_test_xml.tpl b/view/api_test_xml.tpl
new file mode 100644 (file)
index 0000000..7509a2d
--- /dev/null
@@ -0,0 +1 @@
+<ok>$ok</ok>
index c4f0b54b1ba8a77465bcf3f4557cf7d60e2bb29a..c40a9bf502aa79c18a85c9f726ace3cecc822ffe 100644 (file)
@@ -2543,4 +2543,4 @@ list-style-type: disc;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
\ No newline at end of file
+}
index 5ac152252a6d40f7dc03d7b0b40157eef7417767..a34ee4cc9bb6539d2a872dba18821a4ece8aaf7a 100644 (file)
@@ -2538,4 +2538,4 @@ list-style-type: disc;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
\ No newline at end of file
+}
index fdb4f24c74c44e131a3d68a1e21e3e7a6479442a..60e2f336b2644815d8d3f5f8d2d80b0b770a9e0b 100644 (file)
@@ -2526,4 +2526,4 @@ list-style-type: disc;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
\ No newline at end of file
+}
index 5f60c0bfff47bf1a281ca2dcbbd43344a0ef790b..c097545e5165a7a37c4aa36f1d504d7a1d5fb43f 100644 (file)
@@ -2561,4 +2561,4 @@ list-style-type: disc;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
\ No newline at end of file
+}
index 39f4ffea47657fc5c7bbc6fccd8fe2fa1230e57a..13b648d5c57295bed9596d0228144456b9d9ba59 100644 (file)
 
 .tools                 { background-position: -50px  -40px;}
 .lock          { background-position: -70px  -40px;}
+.unlock        { background-position: -90px  -40px;}
 
 .video          { background-position: -110px -40px;}
 .youtube        { background-position: -130px -40px;}
 
 .icon {
   display: block;
-  width: 20px;
-  height: 20px;
+  width: 18px;
+  height: 18px;
   background-image: url('icons.png');
 }
 
@@ -415,17 +416,21 @@ code {
        background: #EEE;
 }
 .tool .label {
-  float: left;
+/*  float: left; */
 }
 .tool .action {
   float: right;
 }
 .tool a {
-  color: #000;
+/*  color: #000; */
 }
 .tool a:hover {
-  text-decoration: none;
+  text-decoration: underline;
+}
+.sidebar-group-element {
+/*  color: #000; */
 }
+
 /* popup notifications */
 div.jGrowl div.notice {
   background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
@@ -1244,7 +1249,8 @@ section {
 #jot #jot-tools li.loading img {
   margin-top: 10px;
 }
-#jot #jot-title {
+/* #jot */
+#jot-title {
   border: 0px;
   margin: 0px;
   height: 20px;
@@ -1272,6 +1278,56 @@ section {
   line-height: 20px;
   padding-right: 20px;
 }
+
+#profile-jot-submit {
+  float: right;
+  margin-left: 15px;
+}
+#profile-upload-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#profile-attach-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#profile-link-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#profile-video-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#profile-audio-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#profile-location-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#profile-nolocation-wrapper {
+  float: left;
+  margin-left: 15px;
+}
+#jot-perms-icon {
+  float: right;
+  margin-left: 15px;
+}
+#jot-preview-link {
+  float: right;
+}
+#profile-jot-end {
+  clear: both;
+}
+#profile-jot-text_tbl {
+  width: 800px;
+}
+#profile-jot-wrapper {
+  margin-bottom: 20px;
+}
+
 /** buttons **/
 /*input[type="submit"] {
        border: 0px;