changed object names to fit conventions

This commit is contained in:
Max Nowack
2014-11-11 18:30:54 +01:00
parent 74d7142ab4
commit f46592e233
3 changed files with 15 additions and 15 deletions

View File

@@ -50,7 +50,7 @@ function generateXML (data){
});
}
ifTruePushArray(data.custom, channel, data.custom);
ifTruePushArray(data.custom_elements, channel, data.custom_elements);
data.items.forEach(function(item) {
var item_values = [
@@ -96,7 +96,7 @@ function generateXML (data){
}
}
ifTruePushArray(item.custom, item_values, item.custom);
ifTruePushArray(item.custom_elements, item_values, item.custom_elements);
channel.push({ item: item_values });
@@ -110,8 +110,8 @@ function generateXML (data){
version: '2.0'
};
for(var name in data.customNamespaces) {
_attr['xmlns:' + name] = data.customNamespaces[name];
for(var name in data.custom_namespaces) {
_attr['xmlns:' + name] = data.custom_namespaces[name];
}
//only add namespace if GeoRSS is true
@@ -148,8 +148,8 @@ function RSS (options, items) {
this.ttl = options.ttl;
//option to return feed as GeoRSS is set automatically if feed.lat/long is used
this.geoRSS = options.geoRSS || false;
this.customNamespaces = options.customNamespaces || {};
this.custom = options.custom || [];
this.custom_namespaces = options.custom_namespaces || {};
this.custom_elements = options.custom_elements || [];
this.items = items || [];
this.item = function (options) {
@@ -165,7 +165,7 @@ function RSS (options, items) {
lat: options.lat,
long: options.long,
enclosure: options.enclosure || false,
custom: options.custom || []
custom_elements: options.custom_elements || []
};
this.items.push(item);