Author: lindner
Date: Tue Aug 12 07:21:58 2008
New Revision: 685163
URL: http://svn.apache.org/viewvc?rev=685163&view=rev
Log:
SHINDIG-513 | Fix from Jacky Wang for proper js naming and infinite recursion
bug
Modified:
incubator/shindig/trunk/features/opensocial-0.6/opensocial6to7.js
incubator/shindig/trunk/features/opensocial-0.7/opensocial7to8.js
Modified: incubator/shindig/trunk/features/opensocial-0.6/opensocial6to7.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-0.6/opensocial6to7.js?rev=685163&r1=685162&r2=685163&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-0.6/opensocial6to7.js (original)
+++ incubator/shindig/trunk/features/opensocial-0.6/opensocial6to7.js Tue Aug
12 07:21:58 2008
@@ -38,28 +38,28 @@
};
-opensocial.Person.prototype.getFieldOld = opensocial.Person.prototype.getField;
+opensocial.Person.prototype.getField_v07 =
opensocial.Person.prototype.getField;
opensocial.Person.prototype.getField = function(fieldname) {
if (fieldname == opensocial.Person.Field.NAME) {
- return this.getFieldOld(opensocial.Person.Field.NAME)
+ return this.getField_v07(opensocial.Person.Field.NAME)
.getField(opensocial.Name.Field.UNSTRUCTURED);
} else {
- return this.getFieldOld(fieldname);
+ return this.getField_v07(fieldname);
}
}
-opensocial.Person.prototype.getDisplayNameOld
+opensocial.Person.prototype.getDisplayName_v07
= opensocial.Person.getDisplayName;
opensocial.Person.prototype.getDisplayName = function() {
- return this.getFieldOld(opensocial.Person.Field.NAME)
+ return this.getField_v07(opensocial.Person.Field.NAME)
.getField(opensocial.Name.Field.UNSTRUCTURED);
}
-opensocial.newActivityOld = opensocial.newActivity;
+opensocial.newActivity_v07 = opensocial.newActivity;
opensocial.newActivity = function(title, opt_params) {
opt_params['title'] = title;
- opensocial.newActivityOld(opt_params);
+ opensocial.newActivity_v07(opt_params);
};
opensocial.DataRequest.prototype.newFetchGlobalAppDataRequest = function(keys)
{
Modified: incubator/shindig/trunk/features/opensocial-0.7/opensocial7to8.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-0.7/opensocial7to8.js?rev=685163&r1=685162&r2=685163&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-0.7/opensocial7to8.js (original)
+++ incubator/shindig/trunk/features/opensocial-0.7/opensocial7to8.js Tue Aug
12 07:21:58 2008
@@ -9,27 +9,27 @@
VIEWER_FRIENDS : 'VIEWER_FRIENDS'
};
-opensocial.DataRequest.prototype.newFetchPeopleRequestOld
+opensocial.DataRequest.prototype.newFetchPeopleRequest_v08
= opensocial.DataRequest.prototype.newFetchPeopleRequest;
opensocial.DataRequest.prototype.newFetchPeopleRequest = function(idSpec,
opt_params) {
- return this.newFetchPeopleRequestOld(translateIdSpec(idSpec), opt_params);
+ return this.newFetchPeopleRequest_v08(translateIdSpec(idSpec), opt_params);
}
-opensocial.DataRequest.prototype.newFetchPersonAppDataRequestOld
+opensocial.DataRequest.prototype.newFetchPersonAppDataRequest_v08
= opensocial.DataRequest.prototype.newFetchPersonAppDataRequest;
opensocial.DataRequest.prototype.newFetchPersonAppDataRequest =
function(idSpec,
keys, opt_params) {
- return this.newFetchPersonAppDataRequestOld(translateIdSpec(idSpec), keys,
+ return this.newFetchPersonAppDataRequest_v08(translateIdSpec(idSpec), keys,
opt_params);
}
-opensocial.DataRequest.prototype.newFetchActivitiesRequestOld
+opensocial.DataRequest.prototype.newFetchActivitiesRequest_v08
= opensocial.DataRequest.prototype.newFetchActivitiesRequest;
opensocial.DataRequest.prototype.newFetchActivitiesRequest = function(idSpec,
opt_params) {
var request
- = this.newFetchActivitiesRequestOld(translateIdSpec(idSpec), opt_params);
+ = this.newFetchActivitiesRequest_v08(translateIdSpec(idSpec),
opt_params);
request.isActivityRequest = true;
return request;
}
@@ -38,10 +38,10 @@
// (is it already valid??)
// opensocial.DataRequest.prototype.newUpdatePersonAppDataRequest
-opensocial.ResponseItem.prototype.getDataOld
+opensocial.ResponseItem.prototype.getData_v08
= opensocial.ResponseItem.prototype.getData;
opensocial.ResponseItem.prototype.getData = function() {
- var oldData = this.getDataOld();
+ var oldData = this.getData_v08();
if (this.getOriginalDataRequest() &&
this.getOriginalDataRequest().isActivityRequest) {
// The fetch activities request used to have an extra pointer to
// the activities
@@ -55,9 +55,9 @@
= opensocial.Environment.ObjectType.MEDIA_ITEM;
-opensocial.Person.prototype.getFieldOld = opensocial.Person.prototype.getField;
+opensocial.Person.prototype.getField_v08 =
opensocial.Person.prototype.getField;
opensocial.Person.prototype.getField = function(key, opt_params) {
- var value = this.getFieldOld(key, opt_params);
+ var value = this.getField_v08(key, opt_params);
if (key == 'lookingFor' && value) {
// The lookingFor field used to return a string instead of an enum
return value.getDisplayValue();
@@ -75,4 +75,4 @@
} else {
return new opensocial.IdSpec({userId : oldIdSpec});
}
-};
\ No newline at end of file
+};