Skip to content

Commit c56f1e7

Browse files
committed
Merge pull request #480 from ryanhowdy/3.5.0
3.5.0
2 parents 3854114 + eea46b6 commit c56f1e7

File tree

514 files changed

+159238
-19331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

514 files changed

+159238
-19331
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
language: php
22
php:
33
- 5.2
4+
- 5.3
5+
- 5.4
6+
- 5.5
47
before_script:
8+
- cp familyconnections/inc/config_inc_sample.php familyconnections/inc/config_inc.php
59
# - pear install --alldeps PHP_CodeSniffer
610
# - pear install pear.phpunit.de/phpcpd
711
# - phpenv rehash
812
script:
13+
- phpunit --bootstrap tests/bootstrap.php --verbose tests/.
914
# - phpcs -ns --extensions=php --report=summary --ignore=*/familyconnections/inc/thirdparty/*,*/familyconnections/inc/chat/* familyconnections/.
1015
# - phpcpd ./

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
3.5.0
2+
#407 - Move from Prototype to jQuery
3+
#441 - HTML5 YouTube videos
4+
#450 - Memory error on Family Tree with a lot of relatives
5+
#452 - Upgrade plupload to 2.1.1
6+
#454 - PHP Error pre_replace(): The /e modifier is deprecated
7+
#472 - PhotoDestination issue when uploading instagram
8+
#473 - Foursquare API needs updated
9+
110
3.4.2
211
#457 - Photos not deleted from server in Admin
312
#463 - PHP Error for comments on protected images in newsstream

README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

2-
Family Connections 3.4.2
2+
Family Connections 3.5.0
33

44

55
Installation
66
------------
77

8-
1. Upload the familyconnections/ directory in FCMS_3.4.2.zip to your web host.
8+
1. Upload the familyconnections/ directory in FCMS_3.5.0.zip to your web host.
99

1010
2. Run the online installation script by visiting your website.
1111

@@ -15,7 +15,7 @@
1515

1616

1717

18-
Upgrading from 2.6+ to 3.4.2
18+
Upgrading from 2.6+ to 3.5.0
1919
---------------------------
2020

2121
** DO NOT DELETE THE FOLLOWING FILE **

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![Family Connections](./familyconnections/ui/img/logo.gif)
22
---
33

4+
[![Build Status](https://travis-ci.org/ryanhowdy/fcms.svg?branch=3.5.0)](https://travis-ci.org/ryanhowdy/fcms)
45
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/ryanhowdy/fcms/badges/quality-score.png?s=755b6ade4f4add05acf377fbaf03bb3a201f471c)](https://scrutinizer-ci.com/g/ryanhowdy/fcms/)
56

67

@@ -19,7 +20,7 @@ Because social networking sites like Facebook/Google+ are not private enough for
1920

2021
# Installation
2122

22-
1. Upload the familyconnections/ directory in FCMS_3.3.1.zip to your web host.
23+
1. Upload the familyconnections/ directory in FCMS_3.5.0.zip to your web host.
2324

2425
2. Run the online installation script by visiting your website.
2526

@@ -30,7 +31,7 @@ Because social networking sites like Facebook/Google+ are not private enough for
3031

3132
# Upgrade
3233

33-
## Upgrading from 2.6+ to 3.3.1
34+
## Upgrading from 2.6+ to 3.5.0
3435

3536
__DO NOT DELETE *inc/config_inc.php*__
3637

@@ -41,6 +42,3 @@ __DO NOT TOUCH ANY FILES IN THE FOLLOWING DIRECTORIES__
4142
* uploads/photos/memberX/
4243
* uploads/upimages/
4344

44-
45-
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ryanhowdy/fcms/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
46-

dev/list

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
./familyconnections/admin/polls.php
1111
./familyconnections/admin/scheduler.php
1212
./familyconnections/admin/upgrade.php
13-
./familyconnections/admin/vimeo.php
1413
./familyconnections/admin/youtube.php
1514
./familyconnections/calendar.php
1615
./familyconnections/contact.php
@@ -60,17 +59,32 @@
6059
./familyconnections/inc/socialmedia.php
6160
./familyconnections/inc/upgrade_inc.php
6261
./familyconnections/inc/upimages.php
63-
./familyconnections/inc/Upload/PhotoGallery/Destination.php
64-
./familyconnections/inc/Upload/PhotoGallery/Destination/Protected.php
62+
./familyconnections/inc/Upload/Destination/PhotoGallery.php
63+
./familyconnections/inc/Upload/Destination/PhotoGallery/Protected.php
64+
./familyconnections/inc/Upload/Destination/PhotoGallery/S3.php
65+
./familyconnections/inc/Upload/Destination.php
66+
./familyconnections/inc/Upload/Destination/Profile.php
67+
./familyconnections/inc/Upload/Destination/Profile/Protected.php
68+
./familyconnections/inc/Upload/Destination/Profile/S3.php
69+
./familyconnections/inc/Upload/FamilyTree/Form/Java.php
70+
./familyconnections/inc/Upload/FamilyTree/Form.php
71+
./familyconnections/inc/Upload/FamilyTree/Form/Plupload.php
72+
./familyconnections/inc/Upload/FamilyTree.php
6573
./familyconnections/inc/Upload/PhotoGallery/Form/Instagram.php
6674
./familyconnections/inc/Upload/PhotoGallery/Form/Java.php
6775
./familyconnections/inc/Upload/PhotoGallery/Form.php
6876
./familyconnections/inc/Upload/PhotoGallery/Form/Picasa.php
69-
./familyconnections/inc/Upload/PhotoGallery/Handler/Instagram.php
70-
./familyconnections/inc/Upload/PhotoGallery/Handler/Java.php
71-
./familyconnections/inc/Upload/PhotoGallery/Handler.php
72-
./familyconnections/inc/Upload/PhotoGallery/Handler/Picasa.php
77+
./familyconnections/inc/Upload/PhotoGallery/Form/Plupload.php
78+
./familyconnections/inc/Upload/PhotoGallery/Instagram.php
79+
./familyconnections/inc/Upload/PhotoGallery/Java.php
7380
./familyconnections/inc/Upload/PhotoGallery.php
81+
./familyconnections/inc/Upload/PhotoGallery/Picasa.php
82+
./familyconnections/inc/Upload/PhotoGallery/Plupload.php
83+
./familyconnections/inc/Upload/Photo.php
84+
./familyconnections/inc/Upload/Profile/Form/Java.php
85+
./familyconnections/inc/Upload/Profile/Form.php
86+
./familyconnections/inc/Upload/Profile/Form/Plupload.php
87+
./familyconnections/inc/Upload/Profile.php
7488
./familyconnections/inc/User.php
7589
./familyconnections/inc/utils.php
7690
./familyconnections/inc/validation.php
@@ -92,14 +106,29 @@
92106
./familyconnections/settings.php
93107
./familyconnections/ui/admin/footer.php
94108
./familyconnections/ui/admin/header.php
95-
./familyconnections/ui/themes/bare/footer.php
96-
./familyconnections/ui/themes/bare/header.php
97-
./familyconnections/ui/themes/bare/navigation.php
98-
./familyconnections/ui/themes/blue-chrome/footer.php
99-
./familyconnections/ui/themes/blue-chrome/header.php
100-
./familyconnections/ui/themes/blue-chrome/navigation.php
101-
./familyconnections/ui/themes/default/footer.php
102-
./familyconnections/ui/themes/default/header.php
103-
./familyconnections/ui/themes/default/navigation.php
109+
./familyconnections/ui/themes/blue-chrome/templates/global/comments.php
110+
./familyconnections/ui/themes/blue-chrome/templates/global/footer.php
111+
./familyconnections/ui/themes/blue-chrome/templates/global/header.php
112+
./familyconnections/ui/themes/blue-chrome/templates/global/navigation.php
113+
./familyconnections/ui/themes/blue-chrome/templates/global/page-navigation.php
114+
./familyconnections/ui/themes/blue-chrome/templates/home/footer.php
115+
./familyconnections/ui/themes/blue-chrome/templates/home/main.php
116+
./familyconnections/ui/themes/blue-chrome/templates/home/new.php
117+
./familyconnections/ui/themes/blue-chrome/templates/home/sidebar.php
118+
./familyconnections/ui/themes/blue-chrome/templates/poll/polls.php
119+
./familyconnections/ui/themes/blue-chrome/templates/poll/result.php
120+
./familyconnections/ui/themes/blue-chrome/templates/poll/view.php
121+
./familyconnections/ui/themes/default/templates/global/comments.php
122+
./familyconnections/ui/themes/default/templates/global/footer.php
123+
./familyconnections/ui/themes/default/templates/global/header.php
124+
./familyconnections/ui/themes/default/templates/global/navigation.php
125+
./familyconnections/ui/themes/default/templates/global/page-navigation.php
126+
./familyconnections/ui/themes/default/templates/home/footer.php
127+
./familyconnections/ui/themes/default/templates/home/main.php
128+
./familyconnections/ui/themes/default/templates/home/new.php
129+
./familyconnections/ui/themes/default/templates/home/sidebar.php
130+
./familyconnections/ui/themes/default/templates/poll/polls.php
131+
./familyconnections/ui/themes/default/templates/poll/result.php
132+
./familyconnections/ui/themes/default/templates/poll/view.php
104133
./familyconnections/video.php
105134
./familyconnections/whereiseveryone.php

familyconnections/addressbook.php

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ function control ()
134134
/**
135135
* displayHeader
136136
*
137+
* @param array $options
138+
*
137139
* @return void
138140
*/
139-
function displayHeader ()
141+
function displayHeader ($options = null)
140142
{
141143
$params = array(
142144
'currentUserId' => $this->fcmsUser->id,
@@ -149,20 +151,7 @@ function displayHeader ()
149151
'version' => getCurrentVersion(),
150152
);
151153

152-
$params['javascript'] = '
153-
<script type="text/javascript" src="ui/js/tablesort.js"></script>
154-
<script type="text/javascript">
155-
//<![CDATA[
156-
Event.observe(window, \'load\', function() {
157-
initChatBar(\''.T_('Chat').'\', \''.URL_PREFIX.'\');
158-
initAddressBookClickRow();
159-
initCheckAll(\''.T_("Select All").'\');
160-
deleteConfirmationLink("del_address", "'.T_('Are you sure you want to DELETE this address?').'");
161-
});
162-
//]]>
163-
</script>';
164-
165-
loadTemplate('global', 'header', $params);
154+
displayPageHeader($params, $options);
166155
}
167156

168157
/**
@@ -713,7 +702,9 @@ function displayAddForm ()
713702
*/
714703
function displayAddress ()
715704
{
716-
$this->displayHeader();
705+
$this->displayHeader(
706+
array('jsOnload' => 'deleteConfirmationLink("del_address", "'.T_('Are you sure you want to DELETE this address?').'");')
707+
);
717708

718709
$address = (int)$_GET['address'];
719710
$cat = 'all';
@@ -753,7 +744,9 @@ function removeAlert ()
753744
*/
754745
function displayAddressList ()
755746
{
756-
$this->displayHeader();
747+
$this->displayHeader(
748+
array('jsOnload' => 'initCheckAll("'.T_('Select All').'"); initAddressBookClickRow();')
749+
);
757750

758751
$cat = 'members';
759752

familyconnections/admin/config.php

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ function displayHeader ()
154154
$TMPL = $this->fcmsTemplate;
155155

156156
$TMPL['javascript'] = '
157-
<script src="'.URL_PREFIX.'ui/js/prototype.js" type="text/javascript"></script>
158-
<script src="'.URL_PREFIX.'ui/js/scriptaculous.js" type="text/javascript"></script>
157+
<script src="'.URL_PREFIX.'ui/js/jquery.js" type="text/javascript"></script>
158+
<script src="'.URL_PREFIX.'ui/js/jqueryui/jquery-ui.min.js" type="text/javascript"></script>
159+
<link rel="stylesheet" type="text/css" href="'.URL_PREFIX.'ui/js/jqueryui/jquery-ui.min.css"/>
159160
<script src="'.URL_PREFIX.'ui/js/admin.js" type="text/javascript"></script>
160161
<script src="'.URL_PREFIX.'ui/js/livevalidation.js" type="text/javascript"></script>';
161162

@@ -1152,54 +1153,48 @@ function displayNavigationForm ()
11521153
11531154
<p><input type="submit" class="btn primary" id="submit-navigation" name="submit-navigation" value="'.T_('Save').'"/></p>
11541155
</form>
1155-
11561156
<script type="text/javascript">
1157-
$("submit-navigation").hide();
1158-
$$(".order").each(function(item) {
1159-
item.hide();
1160-
item.up("li").addClassName("sortable");
1157+
$("#submit-navigation").hide();
1158+
$(".order").each(function() {
1159+
$(this).before(\'<span class="ui-icon ui-icon-arrowthick-2-n-s"></span>\');
1160+
$(this).hide();
11611161
});
1162-
Sortable.create("com_order", {
1163-
onUpdate: function() {
1164-
new Ajax.Request("config.php", {
1165-
method: "post",
1166-
onSuccess: function(response) {
1167-
if (response.responseText !== "success") {
1168-
insertAlertMessage("error", "navigation-heading", "'.T_('An error occurred. Changes could not be saved.').'");
1169-
} else {
1170-
insertAlertMessage("success inline-alert", "navigation-heading", "'.T_('Changes Saved').'");
1171-
}
1172-
},
1173-
onFailure: function(response) {
1174-
insertAlertMessage("error", "navigation-heading", "'.T_('An error occurred. Changes could not be saved.').'");
1175-
},
1176-
parameters: {
1177-
"submit-ajax-navigation": "1",
1178-
data: Sortable.serialize("com_order")
1162+
1163+
$("#com_order").sortable({
1164+
stop: function(event, ui) {
1165+
var arr = $("#com_order").sortable("toArray");
1166+
$.ajax({
1167+
url : "config.php",
1168+
type : "POST",
1169+
data : {
1170+
"submit-ajax-navigation" : 1,
1171+
data : arr,
1172+
com_order : 1
11791173
}
1174+
}).done(function(data) {
1175+
insertAlertMessage("success inline-alert", "navigation-heading", "'.T_('Changes Saved').'");
1176+
}).fail(function() {
1177+
insertAlertMessage("error", "navigation-heading", "'.T_('An error occurred. Changes could not be saved.').'");
11801178
});
1181-
}
1179+
},
11821180
});
1183-
Sortable.create("share_order", {
1184-
onUpdate: function() {
1185-
new Ajax.Request("config.php", {
1186-
method: "post",
1187-
onSuccess: function(response) {
1188-
if (response.responseText !== "success") {
1189-
insertAlertMessage("error", "navigation-heading", "'.T_('An error occurred. Changes could not be saved.').'");
1190-
} else {
1191-
insertAlertMessage("success inline-alert", "navigation-heading", "'.T_('Changes Saved').'");
1192-
}
1193-
},
1194-
onFailure: function(response) {
1195-
insertAlertMessage("error", "navigation-heading", "'.T_('An error occurred. Changes could not be saved.').'");
1196-
},
1197-
parameters: {
1198-
"submit-ajax-navigation": "1",
1199-
data: Sortable.serialize("share_order")
1181+
$("#share_order").sortable({
1182+
stop: function(event, ui) {
1183+
var arr = $("#share_order").sortable("toArray");
1184+
$.ajax({
1185+
url : "config.php",
1186+
type : "POST",
1187+
data : {
1188+
"submit-ajax-navigation" : 1,
1189+
data : arr,
1190+
share_order : 1
12001191
}
1192+
}).done(function(data) {
1193+
insertAlertMessage("success inline-alert", "navigation-heading", "'.T_('Changes Saved').'");
1194+
}).fail(function() {
1195+
insertAlertMessage("error", "navigation-heading", "'.T_('An error occurred. Changes could not be saved.').'");
12011196
});
1202-
}
1197+
},
12031198
});
12041199
</script>';
12051200

@@ -1223,16 +1218,20 @@ function displayNavigationFormSubmit ($ajax = false)
12231218
// Fix the data (Ajax)
12241219
if (isset($_POST['data']))
12251220
{
1226-
parse_str($_POST['data']);
1227-
1228-
if (isset($share_order))
1221+
if (isset($_POST['share_order']))
12291222
{
1230-
$shareOrder = $share_order;
1223+
foreach ($_POST['data'] as $data)
1224+
{
1225+
$shareOrder[] = substr($data, 6);
1226+
}
12311227
}
12321228

1233-
if (isset($com_order))
1229+
if (isset($_POST['com_order']))
12341230
{
1235-
$communicateOrder = $com_order;
1231+
foreach ($_POST['data'] as $data)
1232+
{
1233+
$communicateOrder[] = substr($data, 4);
1234+
}
12361235
}
12371236
}
12381237
// Fix the data (Form)
@@ -1312,8 +1311,8 @@ function displayNavigationFormSubmit ($ajax = false)
13121311
{
13131312
if ($ajax)
13141313
{
1315-
echo 'error';
1316-
exit();
1314+
header("HTTP/1.0 404 Not Found");
1315+
return;
13171316
}
13181317
$this->displayHeader();
13191318
$this->fcmsError->displayError();
@@ -1341,8 +1340,8 @@ function displayNavigationFormSubmit ($ajax = false)
13411340
{
13421341
if ($ajax)
13431342
{
1344-
echo 'error';
1345-
exit();
1343+
header("HTTP/1.0 404 Not Found");
1344+
return;
13461345
}
13471346
$this->displayHeader();
13481347
$this->fcmsError->displayError();
@@ -1353,8 +1352,7 @@ function displayNavigationFormSubmit ($ajax = false)
13531352

13541353
if ($ajax)
13551354
{
1356-
echo 'success';
1357-
exit();
1355+
return;
13581356
}
13591357

13601358
$_SESSION['success'] = 1;

familyconnections/admin/facebook.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ function displayHeader ()
8686
{
8787
$TMPL = $this->fcmsTemplate;
8888

89-
$TMPL['javascript'] = '
90-
<script src="'.URL_PREFIX.'ui/js/prototype.js" type="text/javascript"></script>';
91-
9289
include_once URL_PREFIX.'ui/admin/header.php';
9390

9491
echo '

0 commit comments

Comments
 (0)