Cleanups:

- don't commit files that are being ignored, better provide a "template" file
  that needs copying to the right file and ignore the file that will have local
  changes like config files will always have.
- fixed CHMOD, no need for executable flag here as the server won't execute
  these files, but only load (read) them
- fixed E_NOTICE in boot.php when entrance/index page (no parameter) is being
  called

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-03-01 20:00:32 +01:00
parent 2be31c767c
commit c353b31569
No known key found for this signature in database
GPG Key ID: B72F8185C6C7BD78
175 changed files with 3 additions and 169 deletions

0
.htaccess Executable file → Normal file
View File

View File

@ -75,4 +75,4 @@ $a->config['maintenance'] = array(
//At which health value should we start removing profiles?
'remove_profile_health_threshold' => -60
);
);

4
boot.php Executable file → Normal file
View File

@ -53,7 +53,7 @@ class App {
public $argc;
public $module;
public $pager;
public $strings;
public $strings;
public $path;
private $scheme;
@ -80,7 +80,7 @@ class App {
$this->query_string = $_SERVER['QUERY_STRING'];
$this->cmd = trim($_GET['q'],'/');
$this->cmd = (isset($_GET['q']) ? trim($_GET['q'],'/') : '');
$this->argv = explode('/',$this->cmd);

0
images/b_block.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 83 B

After

Width:  |  Height:  |  Size: 83 B

0
images/b_drop.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 138 B

0
images/b_drop.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

0
images/b_drophide.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

0
images/b_dropshow.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 138 B

0
images/b_edit.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

0
images/b_edit.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 451 B

0
images/blue_flag_16.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1003 B

After

Width:  |  Height:  |  Size: 1003 B

0
images/camera-icon.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1015 B

After

Width:  |  Height:  |  Size: 1015 B

0
images/default-profile-sm.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B

0
images/default-profile.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 490 B

0
images/dfrn.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 109 B

0
images/dislike.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 133 B

0
images/friendica-32.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
images/friendika-128.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

0
images/friendika-128.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

0
images/friendika-16.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
images/friendika-16.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 659 B

0
images/friendika-16.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 699 B

0
images/friendika-1600.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

0
images/friendika-256.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
images/friendika-256.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
images/friendika-32.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
images/friendika-32.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
images/friendika-64.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

0
images/friendika-64.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
images/friendika.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

0
images/larrow.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

0
images/larrw.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1004 B

After

Width:  |  Height:  |  Size: 1004 B

0
images/like.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
images/link-icon.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 145 B

0
images/lock_icon.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 932 B

After

Width:  |  Height:  |  Size: 932 B

0
images/lrarrow.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

0
images/no.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 631 B

0
images/pen.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

0
images/penhover.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

0
images/rarrow.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

0
images/rarrw.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 999 B

0
images/rotator.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 826 B

0
images/shield_2_16.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 974 B

0
images/star.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 608 B

0
images/unlock_icon.gif Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 938 B

After

Width:  |  Height:  |  Size: 938 B

View File

@ -1,166 +0,0 @@
<?php
require_once("boot.php");
$a = new App;
@include(".htconfig.php");
require_once("dba.php");
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
unset($db_host, $db_user, $db_pass, $db_data);
ruire_once("esession.php");
require_once("datetime.php");
$a->set_baseurl(get_config('system','url'));
$u = q("SELECT * FROM `user` WHERE 1 LIMIT 1");
if(! count($u))
killme();
$uid = $u[0]['uid'];
$nickname = $u[0]['nickname'];
$intros = q("SELECT `intro`.*, `intro`.`id` AS `intro_id`, `contact`.*
FROM `intro` LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id`
WHERE `intro`.`blocked` = 0 AND `intro`.`ignore` = 0");
if(! count($intros))
return;
foreach($intros as $intro) {
$intro_id = intval($intro['intro_id']);
$dfrn_id = $intro['issued-id'];
$contact_id = $intro['contact-id'];
$relation = $intro['rel'];
$site_pubkey = $intro['site-pubkey'];
$dfrn_confirm = $intro['confirm'];
$aes_allow = $intro['aes_allow'];
$res=openssl_pkey_new(array(
'digest_alg' => 'whirlpool',
'private_key_bits' => 4096,
'encrypt_key' => false ));
$private_key = '';
openssl_pkey_export($res, $private_key);
$pubkey = openssl_pkey_get_details($res);
$public_key = $pubkey["key"];
$r = q("UPDATE `contact` SET `issued-pubkey` = '%s', `prvkey` = '%s' WHERE `id` = %d LIMIT 1",
dbesc($public_key),
dbesc($private_key),
intval($contact_id)
);
$params = array();
$src_aes_key = random_string();
$result = "";
openssl_private_encrypt($dfrn_id,$result,$u[0]['prvkey']);
$params['dfrn_id'] = $result;
$params['public_key'] = $public_key;
$my_url = $a->get_baseurl() . '/profile/' . $nickname ;
openssl_public_encrypt($my_url, $params['source_url'], $site_pubkey);
if($aes_allow && function_exists('openssl_encrypt')) {
openssl_public_encrypt($src_aes_key, $params['aes_key'], $site_pubkey);
$params['public_key'] = openssl_encrypt($public_key,'AES-256-CBC',$src_aes_key);
}
$res = post_url($dfrn_confirm,$params);
$xml = simplexml_load_string($res);
$status = (int) $xml->status;
switch($status) {
case 0:
break;
case 1:
// birthday paradox - generate new dfrn-id and fall through.
$new_dfrn_id = random_string();
$r = q("UPDATE contact SET `issued-id` = '%s' WHERE `id` = %d LIMIT 1",
dbesc($new_dfrn_id),
intval($contact_id)
);
case 2:
break;
case 3:
default:
break;
}
if(($status == 0 || $status == 3) && ($intro_id)) {
// delete the notification
$r = q("DELETE FROM `intro` WHERE `id` = %d LIMIT 1",
intval($intro_id)
);
}
if($status != 0)
killme();
require_once("Photo.php");
$photo_failure = false;
$filename = basename($intro['photo']);
$img_str = fetch_url($intro['photo'],true);
$img = new Photo($img_str);
if($img) {
$img->scaleImageSquare(175);
$hash = hash('md5',uniqid(mt_rand(),true));
$r = $img->store($contact_id, $hash, $filename, t('Contact Photos'), 4 );
if($r === false)
$photo_failure = true;
$img->scaleImage(80);
$r = $img->store($contact_id, $hash, $filename, t('Contact Photos'), 5 );
if($r === false)
$photo_failure = true;
$photo = $a->get_baseurl() . '/photo/' . $hash . '-4.jpg';
$thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.jpg';
}
else
$photo_failure = true;
if($photo_failure) {
$photo = $a->get_baseurl() . '/images/default-profile.jpg';
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
}
$r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `rel` = %d,
`name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s',
`readonly` = %d, `profile-id` = %d, `blocked` = 0, `pending` = 0,
`network` = 'dfrn' WHERE `id` = %d LIMIT 1",
dbesc($photo),
dbesc($thumb),
intval(($relation == DIRECTION_OUT) ? DIRECTION_BOTH : DIRECTION_IN),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval((x($a->config,'rockstar-readonly')) ? $a->config['rockstar-readonly'] : 0),
intval((x($a->config,'rockstar-profile')) ? $a->config['rockstar-profile'] : 0),
intval($contact_id)
);
}
killme();

0
include/Photo.php Executable file → Normal file
View File

0
include/Scrape.php Executable file → Normal file
View File

0
include/ajaxupload.js Executable file → Normal file
View File

0
include/auth.php Executable file → Normal file
View File

0
include/bbcode.php Executable file → Normal file
View File

0
include/country.js Executable file → Normal file
View File

0
include/datetime.php Executable file → Normal file
View File

0
include/dba.php Executable file → Normal file
View File

0
include/directory.php Executable file → Normal file
View File

0
include/group.php Executable file → Normal file
View File

0
include/hostxrd.php Executable file → Normal file
View File

0
include/items.php Executable file → Normal file
View File

0
include/jquery-1.4.2.min.js vendored Executable file → Normal file
View File

0
include/jquery.js vendored Executable file → Normal file
View File

0
include/main.js Executable file → Normal file
View File

0
include/nav.php Executable file → Normal file
View File

0
include/notifier.php Executable file → Normal file
View File

0
include/poller.php Executable file → Normal file
View File

0
include/rockstar.php Executable file → Normal file
View File

0
include/security.php Executable file → Normal file
View File

0
include/session.php Executable file → Normal file
View File

0
include/system_unavailable.php Executable file → Normal file
View File

0
index.php Executable file → Normal file
View File

0
library/HTML5/Data.php Executable file → Normal file
View File

0
library/HTML5/InputStream.php Executable file → Normal file
View File

0
library/HTML5/Parser.php Executable file → Normal file
View File

0
library/HTML5/Tokenizer.php Executable file → Normal file
View File

0
library/HTML5/TreeBuilder.php Executable file → Normal file
View File

0
library/HTML5/named-character-references.ser Executable file → Normal file
View File

0
mod/admin.php Executable file → Normal file
View File

0
mod/directory.php Executable file → Normal file
View File

0
mod/flag.php Executable file → Normal file
View File

0
mod/home.php Executable file → Normal file
View File

0
mod/login.php Executable file → Normal file
View File

0
mod/lsearch.php Executable file → Normal file
View File

0
mod/moderate.php Executable file → Normal file
View File

0
mod/msearch.php Executable file → Normal file
View File

0
mod/opensearch.php Executable file → Normal file
View File

0
mod/photo.php Executable file → Normal file
View File

0
mod/pubsites.php Executable file → Normal file
View File

0
mod/redir.php Executable file → Normal file
View File

0
mod/settings.php Executable file → Normal file
View File

0
mod/siteinfo.php Executable file → Normal file
View File

0
mod/sites.php Executable file → Normal file
View File

0
mod/submit.php Executable file → Normal file
View File

0
mod/updatesites.php Executable file → Normal file
View File

0
mod/viewcontacts.php Executable file → Normal file
View File

0
mod/wall_upload.php Executable file → Normal file
View File

0
mod/xrd.php Executable file → Normal file
View File

0
view/#head.tpl# Executable file → Normal file
View File

0
view/acl_selectors.php Executable file → Normal file
View File

0
view/album_edit.tpl Executable file → Normal file
View File

0
view/atom_cmnt.tpl Executable file → Normal file
View File

0
view/atom_feed.tpl Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More