1
0
mirror of /repos/Prototyper.git synced 2026-02-27 16:12:00 +01:00

removed comments

This commit is contained in:
Aiko Mastboom
2013-04-21 12:20:32 +02:00
parent b5bf667c6e
commit fbb126566e
2 changed files with 3 additions and 18 deletions

View File

@@ -62,7 +62,7 @@ module.exports = function (config, mongoInstance, sharemodel) {
})
})
} else {
console.log('no import_leftover tag found');
config.debug && console.log('no import_leftover tag found');
return cb(null, remainder);
}
});
@@ -91,21 +91,6 @@ module.exports = function (config, mongoInstance, sharemodel) {
var replaceMarkers = function (doc, options) {
var promises = [];
/* markers:
import__[collection]_[name]_[attribute]_
_end_import__[collection]_[name]_[attribute]
reservered for importing data:
import__[collection]_[name]_json_
_end_import__[collection]_[name]_json
moves content between tags into /collection/name/attribute
import_file__[filename]__into__[collection]_[name]_[attribute]
read filename into /collection/name/attribute and process it.
*/
var import_tag = 'import__([A-Za-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z0-9]+)_([\\w\\W]*)_end_import__\\1_\\2_\\3';
var import_regexp = new RegExp(helpers.marker_prefix + import_tag + helpers.marker_postfix);
var import_strip_regexp = new RegExp(helpers.marker_postfix + '([\\w\\W]*)' + helpers.marker_prefix);
@@ -173,7 +158,7 @@ module.exports = function (config, mongoInstance, sharemodel) {
})
);
var import_file_tag = 'import_file__([A-Za-z0-9.]+)__into__([A-Za-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z0-9]+)';
var import_file_tag = 'import_file__([A-Za-z0-9.\/]+)__into__([A-Za-z0-9]+)_([A-Za-z0-9]+)_([A-Za-z0-9]+)';
var import_file_regexp = new RegExp(helpers.marker_prefix + import_file_tag + helpers.marker_postfix);
promises.push(

View File

@@ -215,7 +215,7 @@ module.exports = function (app, config) {
config.debug && console.log('running timer', documentId);
var data = args.current;
if (args.options.type == 'json') {
data = JSON.stringify(args.current);
data = JSON.parse(args.current);
}
mongodataInstance.setMongoAttribute(data, args.options,
handleMongoAttributeSetResult(args.options, data,