aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/crepair.php2
-rw-r--r--mod/dirsearch.php31
-rw-r--r--mod/display.php15
-rw-r--r--mod/fbrowser.php2
-rw-r--r--mod/import.php4
-rw-r--r--mod/item.php7
-rw-r--r--mod/oexchange.php9
-rw-r--r--mod/photo.php4
-rw-r--r--mod/photos.php13
-rwxr-xr-xmod/poke.php164
-rw-r--r--mod/post.php2
-rw-r--r--mod/profile_photo.php8
-rwxr-xr-xmod/setup.php24
-rw-r--r--mod/starred.php8
-rw-r--r--mod/wall_upload.php2
15 files changed, 145 insertions, 150 deletions
diff --git a/mod/crepair.php b/mod/crepair.php
index e5ece0f98..f749fac0e 100644
--- a/mod/crepair.php
+++ b/mod/crepair.php
@@ -76,7 +76,7 @@ function crepair_post(&$a) {
if($photo) {
logger('mod-crepair: updating photo from ' . $photo);
- require_once("Photo.php");
+ require_once('include/photo/photo_driver.php');
$photos = import_profile_photo($photo,local_user(),$contact['id']);
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 7e4323da9..c7fa8a9d8 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -22,14 +22,14 @@ function dirsearch_content(&$a) {
json_return_and_die($ret);
}
- $name = ((x($_REQUEST,'name')) ? $_REQUEST['name'] : '');
- $address = ((x($_REQUEST,'address')) ? $_REQUEST['address'] : '');
- $locale = ((x($_REQUEST,'locale')) ? $_REQUEST['locale'] : '');
- $region = ((x($_REQUEST,'region')) ? $_REQUEST['region'] : '');
+ $name = ((x($_REQUEST,'name')) ? $_REQUEST['name'] : '');
+ $address = ((x($_REQUEST,'address')) ? $_REQUEST['address'] : '');
+ $locale = ((x($_REQUEST,'locale')) ? $_REQUEST['locale'] : '');
+ $region = ((x($_REQUEST,'region')) ? $_REQUEST['region'] : '');
$postcode = ((x($_REQUEST,'postcode')) ? $_REQUEST['postcode'] : '');
- $country = ((x($_REQUEST,'country')) ? $_REQUEST['country'] : '');
- $gender = ((x($_REQUEST,'gender')) ? $_REQUEST['gender'] : '');
- $marital = ((x($_REQUEST,'marital')) ? $_REQUEST['marital'] : '');
+ $country = ((x($_REQUEST,'country')) ? $_REQUEST['country'] : '');
+ $gender = ((x($_REQUEST,'gender')) ? $_REQUEST['gender'] : '');
+ $marital = ((x($_REQUEST,'marital')) ? $_REQUEST['marital'] : '');
$keywords = ((x($_REQUEST,'keywords')) ? $_REQUEST['keywords'] : '');
// TODO - a meta search which joins all of these things to one search string
@@ -55,12 +55,15 @@ function dirsearch_content(&$a) {
if($keywords)
$sql_extra .= " OR xprof_keywords like '" . protect_sprintf( '%' . dbesc($keywords) . '%' ) . "' ";
- $perpage = (($_REQUEST['n']) ? $_REQUEST['n'] : 80);
- $page = (($_REQUEST['p']) ? intval($_REQUEST['p'] - 1) : 0);
- $startrec = (($page+1) * $perpage) - $perpage;
- $limit = (($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 0);
+ $perpage = (($_REQUEST['n']) ? $_REQUEST['n'] : 80);
+ $page = (($_REQUEST['p']) ? intval($_REQUEST['p'] - 1) : 0);
+ $startrec = (($page+1) * $perpage) - $perpage;
+ $limit = (($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 0);
$return_total = ((x($_REQUEST,'return_total')) ? intval($_REQUEST['return_total']) : 0);
+
+ $mtime = ((x($_REQUEST,'mtime')) ? datetime_convert('UTC','UTC',$_REQUEST['mtime']) : '');
+
// ok a separate tag table won't work.
// merge them into xprof
@@ -86,8 +89,14 @@ function dirsearch_content(&$a) {
}
}
+ if($mtime) {
+ $qlimit = '';
+ $sql_extra .= " and xchan_hash in ( select ud_hash from updates where ud_date > '" . dbesc($mtime) . "' ) ";
+ }
+
$order = " ORDER BY `xchan_name` ASC ";
+
$r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and not ( xchan_flags & %d ) $order $qlimit ",
intval(XCHAN_FLAGS_HIDDEN)
);
diff --git a/mod/display.php b/mod/display.php
index 170f800ac..b1ae54df3 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -94,6 +94,8 @@ function display_content(&$a, $update = 0, $load = false) {
if($update && $load) {
+ $updateable = false;
+
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
if($load) {
@@ -107,6 +109,8 @@ function display_content(&$a, $update = 0, $load = false) {
intval(local_user()),
dbesc($target_item['parent_mid'])
);
+ if($r)
+ $updateable = true;
}
if($r === null) {
$r = q("SELECT * from item
@@ -149,6 +153,17 @@ function display_content(&$a, $update = 0, $load = false) {
$o .= conversation($a,$items,'display', $update, 'client');
+
+ if($updateable) {
+ $x = q("UPDATE item SET item_flags = ( item_flags ^ %d )
+ WHERE (item_flags & %d) AND uid = %d and parent = %d ",
+ intval(ITEM_UNSEEN),
+ intval(ITEM_UNSEEN),
+ intval(local_user()),
+ intval($r[0]['parent'])
+ );
+ }
+
return $o;
diff --git a/mod/fbrowser.php b/mod/fbrowser.php
index d10d8021b..31004c0d8 100644
--- a/mod/fbrowser.php
+++ b/mod/fbrowser.php
@@ -5,7 +5,7 @@
* @author Fabio Comuni <fabrixxm@kirgroup.com>
*/
-require_once('include/Photo.php');
+require_once('include/photo/photo_driver.php');
/**
* @param App $a
diff --git a/mod/import.php b/mod/import.php
index 8b8019a99..4602c8aa8 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -114,7 +114,7 @@ function import_post(&$a) {
$channel = $r[0];
if($data['photo']) {
- require_once('include/Photo.php');
+ require_once('include/photo/photo_driver.php');
import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id,$channel['channel_id']);
}
@@ -217,7 +217,7 @@ function import_post(&$a) {
. "')" );
- require_once("Photo.php");
+ require_once('include/photo/photo_driver.php');
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
$r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
where xchan_hash = '%s' limit 1",
diff --git a/mod/item.php b/mod/item.php
index a9b658441..814c2f0c6 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -321,6 +321,13 @@ function item_post(&$a) {
/**
+ * fix naked links by passing through a callback to see if this is a red site
+ * (already known to us) which will get a zrl, otherwise link with url
+ */
+
+ $body = preg_replace_callback("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body);
+
+ /**
*
* When a photo was uploaded into the message using the (profile wall) ajax
* uploader, The permissions are initially set to disallow anybody but the
diff --git a/mod/oexchange.php b/mod/oexchange.php
index 791a493ff..63b48751c 100644
--- a/mod/oexchange.php
+++ b/mod/oexchange.php
@@ -32,18 +32,19 @@ function oexchange_content(&$a) {
$tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
- $s = fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
+ $ret = z_fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
+
+ if($ret['success'])
+ $s = $ret['body'];
if(! strlen($s))
return;
- require_once('include/html2bbcode.php');
-
$post = array();
$post['profile_uid'] = local_user();
$post['return'] = '/oexchange/done' ;
- $post['body'] = html2bbcode($s);
+ $post['body'] = $s;
$post['type'] = 'wall';
$_REQUEST = $post;
diff --git a/mod/photo.php b/mod/photo.php
index aff4dc895..43418e524 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -1,7 +1,7 @@
<?php
require_once('include/security.php');
-require_once('include/Photo.php');
+require_once('include/photo/photo_driver.php');
function photo_init(&$a) {
@@ -151,7 +151,7 @@ function photo_init(&$a) {
}
if(isset($res) && intval($res) && $res < 500) {
- $ph = new Photo($data, $mimetype);
+ $ph = photo_factory($data, $mimetype);
if($ph->is_valid()) {
$ph->scaleImageSquare($res);
$data = $ph->imageString();
diff --git a/mod/photos.php b/mod/photos.php
index df41b3a07..4e8f48e29 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1,5 +1,5 @@
<?php
-require_once('include/Photo.php');
+require_once('include/photo/photo_driver.php');
require_once('include/photos.php');
require_once('include/items.php');
require_once('include/acl_selectors.php');
@@ -59,7 +59,9 @@ function photos_post(&$a) {
logger('mod_photos: REQUEST ' . print_r($_REQUEST,true), LOGGER_DATA);
logger('mod_photos: FILES ' . print_r($_FILES,true), LOGGER_DATA);
- $phototypes = Photo::supportedTypes();
+ $ph = photo_factory('');
+
+ $phototypes = $ph->supportedTypes();
$can_post = false;
@@ -233,7 +235,7 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
if(count($r)) {
- $ph = new Photo($r[0]['data'], $r[0]['type']);
+ $ph = photo_factory($r[0]['data'], $r[0]['type']);
if($ph->is_valid()) {
$rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 );
$ph->rotate($rotate_deg);
@@ -565,7 +567,8 @@ function photos_content(&$a) {
return;
}
- $phototypes = Photo::supportedTypes();
+ $ph = photo_factory('');
+ $phototypes = $ph->supportedTypes();
$_SESSION['photo_return'] = $a->cmd;
@@ -1070,7 +1073,7 @@ function photos_content(&$a) {
$dislike = '';
// display comments
- if(count($r)) {
+ if($r) {
foreach($r as $item) {
like_puller($a,$item,$alike,'like');
diff --git a/mod/poke.php b/mod/poke.php
index 2ccbfbd77..6cf0c97f1 100755
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -1,17 +1,30 @@
-<?php
+<?php /** @file */
+
+/**
+ *
+ * Poke, prod, finger, or otherwise do unspeakable things to somebody - who must be a connection in your address book
+ * This function can be invoked with the required arguments (verb and cid and private and possibly parent) silently via ajax or
+ * other web request. You must be logged in and connected to a channel.
+ * If the required arguments aren't present, we'll display a simple form to choose a recipient and a verb.
+ * parent is a special argument which let's you attach this activity as a comment to an existing conversation, which
+ * may have started with somebody else poking (etc.) somebody, but this isn't necessary. This can be used in the adult
+ * plugin version to have entire conversations where Alice poked Bob, Bob fingered Alice, Alice hugged Bob, etc.
+ *
+ * private creates a private conversation with the recipient. Otherwise your channel's default post privacy is used.
+ *
+ */
-require_once('include/security.php');
-require_once('include/bbcode.php');
require_once('include/items.php');
-
function poke_init(&$a) {
if(! local_user())
return;
$uid = local_user();
- $verb = notags(trim($_GET['verb']));
+ $channel = $a->get_channel();
+
+ $verb = notags(trim($_REQUEST['verb']));
if(! $verb)
return;
@@ -23,109 +36,86 @@ function poke_init(&$a) {
$activity = ACTIVITY_POKE . '#' . urlencode($verbs[$verb][0]);
- $contact_id = intval($_GET['cid']);
+ $contact_id = intval($_REQUEST['cid']);
if(! $contact_id)
return;
- $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : 0);
-
+ $parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
logger('poke: verb ' . $verb . ' contact ' . $contact_id, LOGGER_DEBUG);
- $r = q("SELECT * FROM `contact` WHERE `id` = %d and `uid` = %d LIMIT 1",
+ $r = q("SELECT * FROM abook left join xchan on xchan_hash = abook_xchan where abook_id = %d and abook_channel = %d LIMIT 1",
intval($contact_id),
intval($uid)
);
- if(! count($r)) {
- logger('poke: no contact ' . $contact_id);
+ if(! $r) {
+ logger('poke: no target ' . $contact_id);
return;
}
$target = $r[0];
+ $parent_item = null;
if($parent) {
- $r = q("select mid, private, allow_cid, allow_gid, deny_cid, deny_gid
+ $r = q("select mid, item_private, owner_xchan, allow_cid, allow_gid, deny_cid, deny_gid
from item where id = %d and parent = %d and uid = %d limit 1",
intval($parent),
intval($parent),
intval($uid)
);
- if(count($r)) {
- $parent_mid = $r[0]['mid'];
- $private = $r[0]['private'];
- $allow_cid = $r[0]['allow_cid'];
- $allow_gid = $r[0]['allow_gid'];
- $deny_cid = $r[0]['deny_cid'];
- $deny_gid = $r[0]['deny_gid'];
+ if($r) {
+ $parent_item = $r[0];
+ $parent_mid = $r[0]['mid'];
+ $item_private = $r[0]['item_private'];
+ $allow_cid = $r[0]['allow_cid'];
+ $allow_gid = $r[0]['allow_gid'];
+ $deny_cid = $r[0]['deny_cid'];
+ $deny_gid = $r[0]['deny_gid'];
}
}
else {
- $private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
+ $item_private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
- $allow_cid = (($private) ? '<' . $target['id']. '>' : $a->user['allow_cid']);
- $allow_gid = (($private) ? '' : $a->user['allow_gid']);
- $deny_cid = (($private) ? '' : $a->user['deny_cid']);
- $deny_gid = (($private) ? '' : $a->user['deny_gid']);
+ $allow_cid = (($item_private) ? '<' . $target['abook_hash']. '>' : $channel['channel_allow_cid']);
+ $allow_gid = (($item_private) ? '' : $channel['channel_allow_gid']);
+ $deny_cid = (($item_private) ? '' : $channel['channel_deny_cid']);
+ $deny_gid = (($item_private) ? '' : $channel['channel_deny_gid']);
}
-
-
- $poster = $a->contact;
-
- $mid = item_message_id();
-
$arr = array();
+ $arr['item_flags'] = ITEM_WALL | ITEM_ORIGIN;
+ if($parent_item)
+ $arr['item_flags'] |= ITEM_THREAD_TOP;
- $arr['uid'] = $uid;
- $arr['mid'] = $mid;
+ $arr['owner_xchan'] = (($parent_item) ? $parent_item['owner_xchan'] : $channel['channel_hash']);
$arr['parent_mid'] = (($parent_mid) ? $parent_mid : $mid);
- $arr['type'] = 'activity';
- $arr['wall'] = 1;
- $arr['contact-id'] = $poster['id'];
- $arr['owner-name'] = $poster['name'];
- $arr['owner-link'] = $poster['url'];
- $arr['owner-avatar'] = $poster['thumb'];
- $arr['author-name'] = $poster['name'];
- $arr['author-link'] = $poster['url'];
- $arr['author-avatar'] = $poster['thumb'];
$arr['title'] = '';
$arr['allow_cid'] = $allow_cid;
$arr['allow_gid'] = $allow_gid;
$arr['deny_cid'] = $deny_cid;
$arr['deny_gid'] = $deny_gid;
- $arr['last-child'] = 1;
- $arr['visible'] = 1;
$arr['verb'] = $activity;
- $arr['private'] = $private;
- $arr['obj_type'] = ACTIVITY_OBJ_PERSON;
-
- $arr['origin'] = 1;
- $arr['body'] = '[zrl=' . $poster['url'] . ']' . $poster['name'] . '[/zrl]' . ' ' . t($verbs[$verb][0]) . ' ' . '[zrl=' . $target['url'] . ']' . $target['name'] . '[/zrl]';
-
- $arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $target['name'] . '</title><id>' . $a->get_baseurl() . '/contact/' . $target['id'] . '</id>';
- $arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $target['url'] . '" />' . "\n");
-
- $arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $target['photo'] . '" />' . "\n");
- $arr['object'] .= '</link></object>' . "\n";
-
- $item_id = item_store($arr);
- if($item_id) {
- q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
- dbesc($a->get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
- intval($uid),
- intval($item_id)
- );
- proc_run('php',"include/notifier.php","tag","$item_id");
- }
-
+ $arr['item_private'] = $item_private;
+ $arr['obj_type'] = ACTIVITY_OBJ_PERSON;
+ $arr['body'] = '[zrl=' . $channel['xchan_url'] . ']' . $channel['xchan_name'] . '[/zrl]' . ' ' . t($verbs[$verb][0]) . ' ' . '[zrl=' . $target['xchan_url'] . ']' . $target['xchan_name'] . '[/zrl]';
+
+ $obj = array(
+ 'type' => ACTIVITY_OBJ_PERSON,
+ 'title' => $target['xchan_name'],
+ 'id' => $target['xchan_hash'],
+ 'link' => array(
+ array('rel' => 'alternate', 'type' => 'text/html', 'href' => $target['xchan_url']),
+ array('rel' => 'photo', 'type' => $target['xchan_photo_mimetype'], 'href' => $target['xchan_photo_l'])
+ ),
+ );
- call_hooks('post_local_end', $arr);
+ $arr['object'] = json_encode($obj);
- proc_run('php',"include/notifier.php","like","$post_id");
+ post_activity_item($arr);
return;
}
@@ -142,43 +132,19 @@ function poke_content(&$a) {
$name = '';
$id = '';
- if(intval($_GET['c'])) {
- $r = q("select id,name from contact where id = %d and uid = %d limit 1",
- intval($_GET['c']),
+ if(intval($_REQUEST['c'])) {
+ $r = q("select abook_id, xchan_name from abook left join xchan on abook_xchan = xchan_hash
+ where abook_id = %d and abook_channel = %d limit 1",
+ intval($_REQUEST['c']),
intval(local_user())
);
- if(count($r)) {
- $name = $r[0]['name'];
- $id = $r[0]['id'];
+ if($r) {
+ $name = $r[0]['xchan_name'];
+ $id = $r[0]['abook_id'];
}
}
-
- $base = $a->get_baseurl();
-
- $a->page['htmlhead'] .= <<< EOT
-
-<script>$(document).ready(function() {
- var a;
- a = $("#poke-recip").autocomplete({
- serviceUrl: '$base/acl',
- minChars: 2,
- width: 350,
- onSelect: function(value,data) {
- $("#poke-recip-complete").val(data);
- }
- });
- a.setOptions({ params: { type: 'a' }});
-
-
-});
-
-</script>
-EOT;
-
- $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
-
-
+ $parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : '0');
$verbs = get_poke_verbs();
diff --git a/mod/post.php b/mod/post.php
index 5919ed2b4..5ec7eabca 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -1,4 +1,4 @@
-<?php
+<?php /** @file */
/**
* Zot endpoint
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index ea7a01bc9..64dfc0e83 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -1,6 +1,6 @@
<?php
-require_once("Photo.php");
+require_once('include/photo/photo_driver.php');
function profile_photo_init(&$a) {
@@ -77,7 +77,7 @@ function profile_photo_post(&$a) {
$base_image = $r[0];
- $im = new Photo($base_image['data'], $base_image['type']);
+ $im = photo_factory($base_image['data'], $base_image['type']);
if($im->is_valid()) {
$im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
@@ -164,7 +164,7 @@ function profile_photo_post(&$a) {
}
$imagedata = @file_get_contents($src);
- $ph = new Photo($imagedata, $filetype);
+ $ph = photo_factory($imagedata, $filetype);
if(! $ph->is_valid()) {
notice( t('Unable to process image.') . EOL );
@@ -251,7 +251,7 @@ function profile_photo_content(&$a) {
return;
}
- $ph = new Photo($r[0]['data'], $r[0]['type']);
+ $ph = photo_factory($r[0]['data'], $r[0]['type']);
// go ahead as if we have just uploaded a new photo to crop
profile_photo_crop_ui_head($a, $ph);
}
diff --git a/mod/setup.php b/mod/setup.php
index cd303205e..b80435f0b 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -34,12 +34,12 @@ function setup_post(&$a) {
$adminmail = notags(trim($_POST['adminmail']));
$siteurl = notags(trim($_POST['siteurl']));
- require_once("dba.php");
+ require_once('include/dba/dba_driver.php');
unset($db);
- $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
+ $db = dba_factory($dbhost, $dbuser, $dbpass, $dbdata, true);
/*if(get_db_errno()) {
unset($db);
- $db = new dba($dbhost, $dbuser, $dbpass, '', true);
+ $db = dba_factory($dbhost, $dbuser, $dbpass, '', true);
if(! get_db_errno()) {
$r = q("CREATE DATABASE '%s'",
@@ -76,7 +76,7 @@ function setup_post(&$a) {
// connect to db
- $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
+ $db = dba_factory($dbhost, $dbuser, $dbpass, $dbdata, true);
$tpl = get_intltext_template('htconfig.tpl');
$txt = replace_macros($tpl,array(
@@ -120,7 +120,7 @@ function setup_content(&$a) {
global $install_wizard_pass, $db;
$o = '';
$wizard_status = "";
- $install_title = t('Friendica Red Communications Server - Setup');
+ $install_title = t('Red Identity/Communications Server - Setup');
@@ -136,7 +136,7 @@ function setup_content(&$a) {
$db_return_text="";
if(x($a->data,'db_installed')) {
$txt = '<p style="font-size: 130%;">';
- $txt .= t('Your Friendica site database has been installed.') . EOL;
+ $txt .= t('Your site database has been installed.') . EOL;
$db_return_text .= $txt;
}
@@ -233,7 +233,7 @@ function setup_content(&$a) {
$o .= replace_macros($tpl, array(
'$title' => $install_title,
'$pass' => t('Database connection'),
- '$info_01' => t('In order to install Friendica we need to know how to connect to your database.'),
+ '$info_01' => t('In order to install Red we need to know how to connect to your database.'),
'$info_02' => t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
'$info_03' => t('The database you specify below should already exist. If it does not, please create it before continuing.'),
@@ -330,7 +330,7 @@ function check_php(&$phpath, &$checks) {
$help = "";
if(!$passed) {
$help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL;
- $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron. See <a href='http://friendica.com/node/27'>'Activating scheduled tasks'</a>") . EOL ;
+ $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron.") . EOL;
$help .= EOL . EOL ;
$tpl = get_markup_template('field_input.tpl');
$help .= replace_macros($tpl, array(
@@ -444,7 +444,7 @@ function check_htconfig(&$checks) {
$status=false;
$help = t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
$help .= t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
- $help .= t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.').EOL;
+ $help .= t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Red top folder.').EOL;
$help .= t('You can alternatively skip this procedure and perform a manual installation. Please see the file "install/INSTALL.txt" for instructions.').EOL;
}
@@ -458,8 +458,8 @@ function check_smarty3(&$checks) {
if( !is_writable('view/tpl/smarty3') ) {
$status=false;
- $help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
- $help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/tpl/smarty3/ under the Friendica top level folder.').EOL;
+ $help = t('Red uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
+ $help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/tpl/smarty3/ under the Red top level folder.').EOL;
$help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
$help .= t('Note: as a security measure, you should give the web server write access to view/tpl/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
}
@@ -527,7 +527,7 @@ function what_next() {
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
.t('Please see the file "install/INSTALL.txt".')
."</p><p>"
- .t("Go to your new Friendica node <a href='$baseurl/register'>registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
+ .t("Go to your new Red node <a href='$baseurl/register'>registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
."</p>";
}
diff --git a/mod/starred.php b/mod/starred.php
index 530c5c7e0..ca7621b0f 100644
--- a/mod/starred.php
+++ b/mod/starred.php
@@ -19,13 +19,7 @@ function starred_init(&$a) {
if(! count($r))
killme();
- $item_flags = $r[0]['item_flags'];
-
- if($item_flags & ITEM_STARRED)
- $item_flags -= ITEM_STARRED;
- else
- $item_flags += ITEM_STARRED;
-
+ $item_flags = ( $r[0]['item_flags'] ^ ITEM_STARRED );
$r = q("UPDATE item SET item_flags = %d WHERE uid = %d and id = %d LIMIT 1",
intval($item_flags),
diff --git a/mod/wall_upload.php b/mod/wall_upload.php
index cee40744f..0d24755d2 100644
--- a/mod/wall_upload.php
+++ b/mod/wall_upload.php
@@ -1,6 +1,6 @@
<?php
-require_once('Photo.php');
+require_once('include/photo/photo_driver.php');
require_once('include/photos.php');