diff --git a/.htaccess b/.htaccess old mode 100755 new mode 100644 diff --git a/.htconfig.php b/.htconfig.php-dist similarity index 99% rename from .htconfig.php rename to .htconfig.php-dist index 6752b9cd..478f0ae0 100644 --- a/.htconfig.php +++ b/.htconfig.php-dist @@ -75,4 +75,4 @@ $a->config['maintenance'] = array( //At which health value should we start removing profiles? 'remove_profile_health_threshold' => -60 -); \ No newline at end of file +); diff --git a/boot.php b/boot.php old mode 100755 new mode 100644 index 786f3045..c4b346d3 --- a/boot.php +++ b/boot.php @@ -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); diff --git a/images/b_block.gif b/images/b_block.gif old mode 100755 new mode 100644 diff --git a/images/b_drop.gif b/images/b_drop.gif old mode 100755 new mode 100644 diff --git a/images/b_drop.png b/images/b_drop.png old mode 100755 new mode 100644 diff --git a/images/b_drophide.gif b/images/b_drophide.gif old mode 100755 new mode 100644 diff --git a/images/b_dropshow.gif b/images/b_dropshow.gif old mode 100755 new mode 100644 diff --git a/images/b_edit.gif b/images/b_edit.gif old mode 100755 new mode 100644 diff --git a/images/b_edit.png b/images/b_edit.png old mode 100755 new mode 100644 diff --git a/images/blue_flag_16.png b/images/blue_flag_16.png old mode 100755 new mode 100644 diff --git a/images/camera-icon.gif b/images/camera-icon.gif old mode 100755 new mode 100644 diff --git a/images/default-profile-sm.jpg b/images/default-profile-sm.jpg old mode 100755 new mode 100644 diff --git a/images/default-profile.jpg b/images/default-profile.jpg old mode 100755 new mode 100644 diff --git a/images/dfrn.gif b/images/dfrn.gif old mode 100755 new mode 100644 diff --git a/images/dislike.gif b/images/dislike.gif old mode 100755 new mode 100644 diff --git a/images/friendica-32.png b/images/friendica-32.png old mode 100755 new mode 100644 diff --git a/images/friendika-128.jpg b/images/friendika-128.jpg old mode 100755 new mode 100644 diff --git a/images/friendika-128.png b/images/friendika-128.png old mode 100755 new mode 100644 diff --git a/images/friendika-16.ico b/images/friendika-16.ico old mode 100755 new mode 100644 diff --git a/images/friendika-16.jpg b/images/friendika-16.jpg old mode 100755 new mode 100644 diff --git a/images/friendika-16.png b/images/friendika-16.png old mode 100755 new mode 100644 diff --git a/images/friendika-1600.png b/images/friendika-1600.png old mode 100755 new mode 100644 diff --git a/images/friendika-256.jpg b/images/friendika-256.jpg old mode 100755 new mode 100644 diff --git a/images/friendika-256.png b/images/friendika-256.png old mode 100755 new mode 100644 diff --git a/images/friendika-32.jpg b/images/friendika-32.jpg old mode 100755 new mode 100644 diff --git a/images/friendika-32.png b/images/friendika-32.png old mode 100755 new mode 100644 diff --git a/images/friendika-64.jpg b/images/friendika-64.jpg old mode 100755 new mode 100644 diff --git a/images/friendika-64.png b/images/friendika-64.png old mode 100755 new mode 100644 diff --git a/images/friendika.svg b/images/friendika.svg old mode 100755 new mode 100644 diff --git a/images/larrow.gif b/images/larrow.gif old mode 100755 new mode 100644 diff --git a/images/larrw.gif b/images/larrw.gif old mode 100755 new mode 100644 diff --git a/images/like.gif b/images/like.gif old mode 100755 new mode 100644 diff --git a/images/link-icon.gif b/images/link-icon.gif old mode 100755 new mode 100644 diff --git a/images/lock_icon.gif b/images/lock_icon.gif old mode 100755 new mode 100644 diff --git a/images/lrarrow.gif b/images/lrarrow.gif old mode 100755 new mode 100644 diff --git a/images/no.gif b/images/no.gif old mode 100755 new mode 100644 diff --git a/images/pen.png b/images/pen.png old mode 100755 new mode 100644 diff --git a/images/penhover.png b/images/penhover.png old mode 100755 new mode 100644 diff --git a/images/rarrow.gif b/images/rarrow.gif old mode 100755 new mode 100644 diff --git a/images/rarrw.gif b/images/rarrw.gif old mode 100755 new mode 100644 diff --git a/images/rotator.gif b/images/rotator.gif old mode 100755 new mode 100644 diff --git a/images/shield_2_16.png b/images/shield_2_16.png old mode 100755 new mode 100644 diff --git a/images/star.jpg b/images/star.jpg old mode 100755 new mode 100644 diff --git a/images/unlock_icon.gif b/images/unlock_icon.gif old mode 100755 new mode 100644 diff --git a/include/#rockstar.php# b/include/#rockstar.php# deleted file mode 100755 index 0ffa0010..00000000 --- a/include/#rockstar.php# +++ /dev/null @@ -1,166 +0,0 @@ -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(); - diff --git a/include/Photo.php b/include/Photo.php old mode 100755 new mode 100644 diff --git a/include/Scrape.php b/include/Scrape.php old mode 100755 new mode 100644 diff --git a/include/ajaxupload.js b/include/ajaxupload.js old mode 100755 new mode 100644 diff --git a/include/auth.php b/include/auth.php old mode 100755 new mode 100644 diff --git a/include/bbcode.php b/include/bbcode.php old mode 100755 new mode 100644 diff --git a/include/country.js b/include/country.js old mode 100755 new mode 100644 diff --git a/include/datetime.php b/include/datetime.php old mode 100755 new mode 100644 diff --git a/include/dba.php b/include/dba.php old mode 100755 new mode 100644 diff --git a/include/directory.php b/include/directory.php old mode 100755 new mode 100644 diff --git a/include/group.php b/include/group.php old mode 100755 new mode 100644 diff --git a/include/hostxrd.php b/include/hostxrd.php old mode 100755 new mode 100644 diff --git a/include/items.php b/include/items.php old mode 100755 new mode 100644 diff --git a/include/jquery-1.4.2.min.js b/include/jquery-1.4.2.min.js old mode 100755 new mode 100644 diff --git a/include/jquery.js b/include/jquery.js old mode 100755 new mode 100644 diff --git a/include/main.js b/include/main.js old mode 100755 new mode 100644 diff --git a/include/nav.php b/include/nav.php old mode 100755 new mode 100644 diff --git a/include/notifier.php b/include/notifier.php old mode 100755 new mode 100644 diff --git a/include/poller.php b/include/poller.php old mode 100755 new mode 100644 diff --git a/include/rockstar.php b/include/rockstar.php old mode 100755 new mode 100644 diff --git a/include/security.php b/include/security.php old mode 100755 new mode 100644 diff --git a/include/session.php b/include/session.php old mode 100755 new mode 100644 diff --git a/include/system_unavailable.php b/include/system_unavailable.php old mode 100755 new mode 100644 diff --git a/index.php b/index.php old mode 100755 new mode 100644 diff --git a/library/HTML5/Data.php b/library/HTML5/Data.php old mode 100755 new mode 100644 diff --git a/library/HTML5/InputStream.php b/library/HTML5/InputStream.php old mode 100755 new mode 100644 diff --git a/library/HTML5/Parser.php b/library/HTML5/Parser.php old mode 100755 new mode 100644 diff --git a/library/HTML5/Tokenizer.php b/library/HTML5/Tokenizer.php old mode 100755 new mode 100644 diff --git a/library/HTML5/TreeBuilder.php b/library/HTML5/TreeBuilder.php old mode 100755 new mode 100644 diff --git a/library/HTML5/named-character-references.ser b/library/HTML5/named-character-references.ser old mode 100755 new mode 100644 diff --git a/mod/admin.php b/mod/admin.php old mode 100755 new mode 100644 diff --git a/mod/directory.php b/mod/directory.php old mode 100755 new mode 100644 diff --git a/mod/flag.php b/mod/flag.php old mode 100755 new mode 100644 diff --git a/mod/home.php b/mod/home.php old mode 100755 new mode 100644 diff --git a/mod/login.php b/mod/login.php old mode 100755 new mode 100644 diff --git a/mod/lsearch.php b/mod/lsearch.php old mode 100755 new mode 100644 diff --git a/mod/moderate.php b/mod/moderate.php old mode 100755 new mode 100644 diff --git a/mod/msearch.php b/mod/msearch.php old mode 100755 new mode 100644 diff --git a/mod/opensearch.php b/mod/opensearch.php old mode 100755 new mode 100644 diff --git a/mod/photo.php b/mod/photo.php old mode 100755 new mode 100644 diff --git a/mod/pubsites.php b/mod/pubsites.php old mode 100755 new mode 100644 diff --git a/mod/redir.php b/mod/redir.php old mode 100755 new mode 100644 diff --git a/mod/settings.php b/mod/settings.php old mode 100755 new mode 100644 diff --git a/mod/siteinfo.php b/mod/siteinfo.php old mode 100755 new mode 100644 diff --git a/mod/sites.php b/mod/sites.php old mode 100755 new mode 100644 diff --git a/mod/submit.php b/mod/submit.php old mode 100755 new mode 100644 diff --git a/mod/updatesites.php b/mod/updatesites.php old mode 100755 new mode 100644 diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php old mode 100755 new mode 100644 diff --git a/mod/wall_upload.php b/mod/wall_upload.php old mode 100755 new mode 100644 diff --git a/mod/xrd.php b/mod/xrd.php old mode 100755 new mode 100644 diff --git a/view/#head.tpl# b/view/#head.tpl# old mode 100755 new mode 100644 diff --git a/view/acl_selectors.php b/view/acl_selectors.php old mode 100755 new mode 100644 diff --git a/view/album_edit.tpl b/view/album_edit.tpl old mode 100755 new mode 100644 diff --git a/view/atom_cmnt.tpl b/view/atom_cmnt.tpl old mode 100755 new mode 100644 diff --git a/view/atom_feed.tpl b/view/atom_feed.tpl old mode 100755 new mode 100644 diff --git a/view/atom_item.tpl b/view/atom_item.tpl old mode 100755 new mode 100644 diff --git a/view/atom_mail.tpl b/view/atom_mail.tpl old mode 100755 new mode 100644 diff --git a/view/atom_tomb.tpl b/view/atom_tomb.tpl old mode 100755 new mode 100644 diff --git a/view/cmnt_received_eml.tpl b/view/cmnt_received_eml.tpl old mode 100755 new mode 100644 diff --git a/view/comment_item.tpl b/view/comment_item.tpl old mode 100755 new mode 100644 diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl old mode 100755 new mode 100644 diff --git a/view/contact_selectors.php b/view/contact_selectors.php old mode 100755 new mode 100644 diff --git a/view/contact_self.tpl b/view/contact_self.tpl old mode 100755 new mode 100644 diff --git a/view/contact_template.tpl b/view/contact_template.tpl old mode 100755 new mode 100644 diff --git a/view/contacts-top.tpl b/view/contacts-top.tpl old mode 100755 new mode 100644 diff --git a/view/cropbody.tpl b/view/cropbody.tpl old mode 100755 new mode 100644 diff --git a/view/crophead.tpl b/view/crophead.tpl old mode 100755 new mode 100644 diff --git a/view/custom_tinymce.css b/view/custom_tinymce.css old mode 100755 new mode 100644 diff --git a/view/default.php b/view/default.php old mode 100755 new mode 100644 diff --git a/view/dfrn_req_confirm.tpl b/view/dfrn_req_confirm.tpl old mode 100755 new mode 100644 diff --git a/view/dfrn_request.tpl b/view/dfrn_request.tpl old mode 100755 new mode 100644 diff --git a/view/directory_header.tpl b/view/directory_header.tpl old mode 100755 new mode 100644 diff --git a/view/directory_item.tpl b/view/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/group_drop.tpl b/view/group_drop.tpl old mode 100755 new mode 100644 diff --git a/view/group_edit.tpl b/view/group_edit.tpl old mode 100755 new mode 100644 diff --git a/view/group_new.tpl b/view/group_new.tpl old mode 100755 new mode 100644 diff --git a/view/head.tpl b/view/head.tpl old mode 100755 new mode 100644 diff --git a/view/htconfig.tpl b/view/htconfig.tpl old mode 100755 new mode 100644 diff --git a/view/install_db.tpl b/view/install_db.tpl old mode 100755 new mode 100644 diff --git a/view/intro_complete_eml.tpl b/view/intro_complete_eml.tpl old mode 100755 new mode 100644 diff --git a/view/intros-top.tpl b/view/intros-top.tpl old mode 100755 new mode 100644 diff --git a/view/intros.tpl b/view/intros.tpl old mode 100755 new mode 100644 diff --git a/view/jot-header.tpl b/view/jot-header.tpl old mode 100755 new mode 100644 diff --git a/view/jot-plain.tpl b/view/jot-plain.tpl old mode 100755 new mode 100644 diff --git a/view/jot-save.tpl b/view/jot-save.tpl old mode 100755 new mode 100644 diff --git a/view/jot.tpl b/view/jot.tpl old mode 100755 new mode 100644 diff --git a/view/login.tpl b/view/login.tpl old mode 100755 new mode 100644 diff --git a/view/logout.tpl b/view/logout.tpl old mode 100755 new mode 100644 diff --git a/view/lostpass.tpl b/view/lostpass.tpl old mode 100755 new mode 100644 diff --git a/view/lostpass_eml.tpl b/view/lostpass_eml.tpl old mode 100755 new mode 100644 diff --git a/view/mail_conv.tpl b/view/mail_conv.tpl old mode 100755 new mode 100644 diff --git a/view/mail_head.tpl b/view/mail_head.tpl old mode 100755 new mode 100644 diff --git a/view/mail_list.tpl b/view/mail_list.tpl old mode 100755 new mode 100644 diff --git a/view/mail_received_eml.tpl b/view/mail_received_eml.tpl old mode 100755 new mode 100644 diff --git a/view/msg-header.tpl b/view/msg-header.tpl old mode 100755 new mode 100644 diff --git a/view/osearch.tpl b/view/osearch.tpl old mode 100755 new mode 100644 diff --git a/view/passchanged_eml.tpl b/view/passchanged_eml.tpl old mode 100755 new mode 100644 diff --git a/view/photo_album.tpl b/view/photo_album.tpl old mode 100755 new mode 100644 diff --git a/view/photo_edit.tpl b/view/photo_edit.tpl old mode 100755 new mode 100644 diff --git a/view/photo_item.tpl b/view/photo_item.tpl old mode 100755 new mode 100644 diff --git a/view/photo_top.tpl b/view/photo_top.tpl old mode 100755 new mode 100644 diff --git a/view/photos_upload.tpl b/view/photos_upload.tpl old mode 100755 new mode 100644 diff --git a/view/profed_head.tpl b/view/profed_head.tpl old mode 100755 new mode 100644 diff --git a/view/profile-hide-friends.tpl b/view/profile-hide-friends.tpl old mode 100755 new mode 100644 diff --git a/view/profile-in-directory.tpl b/view/profile-in-directory.tpl old mode 100755 new mode 100644 diff --git a/view/profile_advanced.php b/view/profile_advanced.php old mode 100755 new mode 100644 diff --git a/view/profile_edit.tpl b/view/profile_edit.tpl old mode 100755 new mode 100644 diff --git a/view/profile_entry.tpl b/view/profile_entry.tpl old mode 100755 new mode 100644 diff --git a/view/profile_entry_default.tpl b/view/profile_entry_default.tpl old mode 100755 new mode 100644 diff --git a/view/profile_listing_header.tpl b/view/profile_listing_header.tpl old mode 100755 new mode 100644 diff --git a/view/profile_photo.tpl b/view/profile_photo.tpl old mode 100755 new mode 100644 diff --git a/view/profile_selectors.php b/view/profile_selectors.php old mode 100755 new mode 100644 diff --git a/view/profile_tabs.tpl b/view/profile_tabs.tpl old mode 100755 new mode 100644 diff --git a/view/prv_message.tpl b/view/prv_message.tpl old mode 100755 new mode 100644 diff --git a/view/pwdreset.tpl b/view/pwdreset.tpl old mode 100755 new mode 100644 diff --git a/view/register-link.tpl b/view/register-link.tpl old mode 100755 new mode 100644 diff --git a/view/register.tpl b/view/register.tpl old mode 100755 new mode 100644 diff --git a/view/request_notify_eml.tpl b/view/request_notify_eml.tpl old mode 100755 new mode 100644 diff --git a/view/settings.tpl b/view/settings.tpl old mode 100755 new mode 100644 diff --git a/view/settings_nick_set.tpl b/view/settings_nick_set.tpl old mode 100755 new mode 100644 diff --git a/view/settings_nick_subdir.tpl b/view/settings_nick_subdir.tpl old mode 100755 new mode 100644 diff --git a/view/settings_nick_unset.tpl b/view/settings_nick_unset.tpl old mode 100755 new mode 100644 diff --git a/view/sidenote.tpl b/view/sidenote.tpl old mode 100755 new mode 100644 diff --git a/view/viewcontact_template.tpl b/view/viewcontact_template.tpl old mode 100755 new mode 100644 diff --git a/view/wall_item.tpl b/view/wall_item.tpl old mode 100755 new mode 100644 diff --git a/view/wall_item_drop.tpl b/view/wall_item_drop.tpl old mode 100755 new mode 100644 diff --git a/view/wall_received_eml.tpl b/view/wall_received_eml.tpl old mode 100755 new mode 100644 diff --git a/view/wallwall_item.tpl b/view/wallwall_item.tpl old mode 100755 new mode 100644 diff --git a/view/xrd_host.tpl b/view/xrd_host.tpl old mode 100755 new mode 100644 diff --git a/view/xrd_person.tpl b/view/xrd_person.tpl old mode 100755 new mode 100644