aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--htconfig.php5
-rw-r--r--include/bbcode.php3
-rw-r--r--include/html2plain.php5
-rw-r--r--include/pidfile.php32
-rw-r--r--include/poller.php10
-rw-r--r--view/api_test_xml.tpl1
-rw-r--r--view/theme/diabook/style-network.css2
-rw-r--r--view/theme/diabook/style-profile.css2
-rw-r--r--view/theme/diabook/style-settings.css2
-rw-r--r--view/theme/diabook/style.css2
-rw-r--r--view/theme/vier/style.css78
11 files changed, 129 insertions, 13 deletions
diff --git a/htconfig.php b/htconfig.php
index 9d9c8a2c7..63a40c809 100644
--- a/htconfig.php
+++ b/htconfig.php
@@ -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'] = "";
diff --git a/include/bbcode.php b/include/bbcode.php
index 9befbd0f7..3697f1fc5 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -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]
diff --git a/include/html2plain.php b/include/html2plain.php
index fe0e3326e..7aa20500a 100644
--- a/include/html2plain.php
+++ b/include/html2plain.php
@@ -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
index 000000000..47df8d1f4
--- /dev/null
+++ b/include/pidfile.php
@@ -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;
+ }
+}
+?>
diff --git a/include/poller.php b/include/poller.php
index 90a97867c..499483d00 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -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
index 000000000..7509a2dc1
--- /dev/null
+++ b/view/api_test_xml.tpl
@@ -0,0 +1 @@
+<ok>$ok</ok>
diff --git a/view/theme/diabook/style-network.css b/view/theme/diabook/style-network.css
index 4d35fe1c1..ef30cd07b 100644
--- a/view/theme/diabook/style-network.css
+++ b/view/theme/diabook/style-network.css
@@ -2548,4 +2548,4 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
-} \ No newline at end of file
+}
diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css
index b05b98300..9d6542ac2 100644
--- a/view/theme/diabook/style-profile.css
+++ b/view/theme/diabook/style-profile.css
@@ -2545,4 +2545,4 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
-} \ No newline at end of file
+}
diff --git a/view/theme/diabook/style-settings.css b/view/theme/diabook/style-settings.css
index fdb4f24c7..60e2f336b 100644
--- a/view/theme/diabook/style-settings.css
+++ b/view/theme/diabook/style-settings.css
@@ -2526,4 +2526,4 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
-} \ No newline at end of file
+}
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index c06449d01..e99aa5644 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -2687,4 +2687,4 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
-} \ No newline at end of file
+}
diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css
index 39f4ffea4..d8f012c4d 100644
--- a/view/theme/vier/style.css
+++ b/view/theme/vier/style.css
@@ -108,6 +108,7 @@
.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;}
@@ -139,8 +140,8 @@
.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;
@@ -604,6 +609,10 @@ nav #nav-apps-link.selected {
padding: 5px 10px; */
}
+.notify-seen {
+ background: none repeat scroll 0 0 #DDDDDD;
+ }
+
ul.menu-popup {
position: absolute;
display: none;
@@ -1244,7 +1253,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 +1282,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;
@@ -1585,6 +1645,12 @@ blockquote {
border-left: 1px solid #D2D2D2;
padding-left: 9px;
margin: 0 0 0 .8ex;
+ color: #777;
+}
+
+.oembed {
+ font-size: large;
+ font-weight: bold;
}
/* ================== */