diff --git a/README.md b/README.md index f39254e00..bb2aaa1a6 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.14) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.15) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -143,13 +143,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 21st December, 2021 -+ *Version*: 2.12.14 ++ *Last Build*: 12th February, 2022 ++ *Version*: 2.12.15 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **285607** -+ *Field count*: **1562** -+ *File count*: **1824** ++ *Line count*: **286261** ++ *Field count*: **1580** ++ *File count*: **1829** + *Folder count*: **256** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index f39254e00..bb2aaa1a6 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.14) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.15) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -143,13 +143,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 21st December, 2021 -+ *Version*: 2.12.14 ++ *Last Build*: 12th February, 2022 ++ *Version*: 2.12.15 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **285607** -+ *Field count*: **1562** -+ *File count*: **1824** ++ *Line count*: **286261** ++ *Field count*: **1580** ++ *File count*: **1829** + *Folder count*: **256** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/DASHJViewLagacy.php b/admin/compiler/joomla_3/DASHJViewLagacy.php index f8570c57e..c9a759f75 100644 --- a/admin/compiler/joomla_3/DASHJViewLagacy.php +++ b/admin/compiler/joomla_3/DASHJViewLagacy.php @@ -62,10 +62,10 @@ class ###Component###View###Component### extends JViewLegacy JToolBarHelper::title(JText::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2'); // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###component###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###component###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } if ($canDo->get('core.admin') || $canDo->get('core.options')) diff --git a/admin/compiler/joomla_3/JViewLegacy_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_custom_admin.php index d0fe52b18..8f3201187 100644 --- a/admin/compiler/joomla_3/JViewLegacy_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_custom_admin.php @@ -63,10 +63,10 @@ class ###Component###View###SView### extends JViewLegacy JToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS### // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###sviews###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###sviews###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // add the options comp button diff --git a/admin/compiler/joomla_3/JViewLegacy_import.php b/admin/compiler/joomla_3/JViewLegacy_import.php index 853c4cb75..3371eace3 100644 --- a/admin/compiler/joomla_3/JViewLegacy_import.php +++ b/admin/compiler/joomla_3/JViewLegacy_import.php @@ -89,10 +89,10 @@ class ###Component###ViewImport extends JViewLegacy } // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('import'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('import'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } } } diff --git a/admin/compiler/joomla_3/JViewLegacy_import_custom.php b/admin/compiler/joomla_3/JViewLegacy_import_custom.php index e540e6e31..f8b56738c 100644 --- a/admin/compiler/joomla_3/JViewLegacy_import_custom.php +++ b/admin/compiler/joomla_3/JViewLegacy_import_custom.php @@ -37,10 +37,10 @@ class ###Component###View###View### extends JViewLegacy } // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###view###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###view###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } } } diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index 2f2718e14..2b457fe14 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -129,10 +129,10 @@ class ###Component###View###Views### extends JViewLegacy }###ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST######IMPORTBUTTON### // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###views###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###views###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // add the options comp button diff --git a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php index f128fab13..f56863a6c 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_custom_admin.php @@ -53,10 +53,10 @@ class ###Component###View###SViews### extends JViewLegacy JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS### // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###sviews###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###sviews###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // add the options comp button diff --git a/admin/compiler/joomla_3/JViewLegacy_list_site.php b/admin/compiler/joomla_3/JViewLegacy_list_site.php index db213620c..7a2410c70 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_site.php @@ -49,10 +49,10 @@ class ###Component###View###SViews### extends JViewLegacy {###SITE_CUSTOM_BUTTONS### // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###sviews###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###sviews###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // now initiate the toolbar $this->toolbar = JToolbar::getInstance(); diff --git a/admin/compiler/joomla_3/JViewLegacy_site.php b/admin/compiler/joomla_3/JViewLegacy_site.php index 27473368a..7a7b1e978 100644 --- a/admin/compiler/joomla_3/JViewLegacy_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_site.php @@ -49,10 +49,10 @@ class ###Component###View###SView### extends JViewLegacy {###SITE_CUSTOM_BUTTONS### // set help url for this view if found - $help_url = ###Component###Helper::getHelpUrl('###sview###'); - if (###Component###Helper::checkString($help_url)) + $this->help_url = ###Component###Helper::getHelpUrl('###sview###'); + if (###Component###Helper::checkString($this->help_url)) { - JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url); + JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); } // now initiate the toolbar $this->toolbar = JToolbar::getInstance(); diff --git a/admin/custom/marked.js b/admin/custom/marked.js index 0fdb17766..e5e465f45 100644 --- a/admin/custom/marked.js +++ b/admin/custom/marked.js @@ -1,7 +1,6 @@ /** * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked + * Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked */ -(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
"+(escaped?code:escape(code,true))+"\n
"}return'
'+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"
\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); - +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,function(r){"use strict";function i(e,t){for(var u=0;ue.length)&&(t=e.length);for(var u=0,n=new Array(t);u=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}r.defaults=e();function u(e){return t[e]}var n=/[&<>"']/,l=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,t={"&":"&","<":"<",">":">",'"':""","'":"'"};function D(e,t){if(t){if(n.test(e))return e.replace(l,u)}else if(a.test(e))return e.replace(o,u);return e}var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function m(e){return e.replace(c,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var h=/(^|[^\[])\^/g;function p(u,e){u=u.source||u,e=e||"";var n={replace:function(e,t){return t=(t=t.source||t).replace(h,"$1"),u=u.replace(e,t),n},getRegex:function(){return new RegExp(u,e)}};return n}var f=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function F(e,t,u){if(e){var n;try{n=decodeURIComponent(m(u)).replace(f,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!g.test(u)&&(u=function(e,t){A[" "+e]||(d.test(e)?A[" "+e]=e+"/":A[" "+e]=w(e,"/",!0));var u=-1===(e=A[" "+e]).indexOf(":");return"//"===t.substring(0,2)?u?t:e.replace(C,"$1")+t:"/"===t.charAt(0)?u?t:e.replace(k,"$1")+t:e+t}(t,u));try{u=encodeURI(u).replace(/%25/g,"%")}catch(e){return null}return u}var A={},d=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;var E={exec:function(){}};function b(e){for(var t,u,n=1;nt)u.splice(t);else for(;u.length>=1,e+=e;return u+e}function _(e,t,u,n){var r=t.href,i=t.title?D(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");if("!"===e[0].charAt(0))return{type:"image",raw:u,href:r,title:i,text:D(t)};n.state.inLink=!0;t={type:"link",raw:u,href:r,title:i,text:t,tokens:n.inlineTokens(t,[])};return n.state.inLink=!1,t}var z=function(){function e(e){this.options=e||r.defaults}var t=e.prototype;return t.space=function(e){e=this.rules.block.newline.exec(e);if(e&&0=u.length?e.slice(u.length):e}).join("\n")}(u,t[3]||"");return{type:"code",raw:u,lang:t[2]&&t[2].trim(),text:e}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var u=t[2].trim();/#$/.test(u)&&(e=w(u,"#"),!this.options.pedantic&&e&&!/ $/.test(e)||(u=e.trim()));u={type:"heading",raw:t[0],depth:t[1].length,text:u,tokens:[]};return this.lexer.inline(u.text,u.tokens),u}},t.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var u,n,r,i,s,l,a,o,D,c,h,p=1<(g=t[1].trim()).length,f={type:"list",raw:"",ordered:p,start:p?+g.slice(0,-1):"",loose:!1,items:[]},g=p?"\\d{1,9}\\"+g.slice(-1):"\\"+g;this.options.pedantic&&(g=p?g:"[*+-]");for(var F=new RegExp("^( {0,3}"+g+")((?: [^\\n]*)?(?:\\n|$))");e&&(h=!1,t=F.exec(e))&&!this.rules.block.hr.test(e);){if(u=t[0],e=e.substring(u.length),a=t[2].split("\n",1)[0],o=e.split("\n",1)[0],this.options.pedantic?(i=2,c=a.trimLeft()):(i=t[2].search(/[^ ]/),c=a.slice(i=4=i||!a.trim())c+="\n"+a.slice(i);else{if(s)break;c+="\n"+a}s||a.trim()||(s=!0),u+=D+"\n",e=e.substring(D.length+1)}f.loose||(l?f.loose=!0:/\n *\n *$/.test(u)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(c))&&(r="[ ] "!==n[0],c=c.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:u,task:!!n,checked:r,loose:!1,text:c}),f.raw+=u}f.items[f.items.length-1].raw=u.trimRight(),f.items[f.items.length-1].text=c.trimRight(),f.raw=f.raw.trimRight();for(var d=f.items.length,C=0;C/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):D(e[0]):e[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;var u=w(e.slice(0,-1),"\\");if((e.length-u.length)%2==0)return}else{var n=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var u=e.length,n=0,r=0;r$/.test(e)?u.slice(1):u.slice(1,-1):u)&&u.replace(this.rules.inline._escapes,"$1"),title:n&&n.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}},t.reflink=function(e,t){if((u=this.rules.inline.reflink.exec(e))||(u=this.rules.inline.nolink.exec(e))){var e=(u[2]||u[1]).replace(/\s+/g," ");if((e=t[e.toLowerCase()])&&e.href)return _(u,e,u[0],this.lexer);var u=u[0].charAt(0);return{type:"text",raw:u,text:u}}},t.emStrong=function(e,t,u){void 0===u&&(u="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!u.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var r=n[1]||n[2]||"";if(!r||""===u||this.rules.inline.punctuation.exec(u)){var i,s=n[0].length-1,l=s,a=0,o="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+s);null!=(n=o.exec(t));)if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(i=i.length,n[3]||n[4])l+=i;else if(!((n[5]||n[6])&&s%3)||(s+i)%3){if(!(0<(l-=i))){if(i=Math.min(i,i+l+a),Math.min(s,i)%2){var D=e.slice(1,s+n.index+i);return{type:"em",raw:e.slice(0,s+n.index+i+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}D=e.slice(2,s+n.index+i-1);return{type:"strong",raw:e.slice(0,s+n.index+i+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}}else a+=i}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var u=t[2].replace(/\n/g," "),n=/[^ ]/.test(u),e=/^ /.test(u)&&/ $/.test(u),u=D(u=n&&e?u.substring(1,u.length-1):u,!0);return{type:"codespan",raw:t[0],text:u}}},t.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},t.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}},t.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var u,t="@"===e[2]?"mailto:"+(u=D(this.options.mangle?t(e[1]):e[1])):u=D(e[1]);return{type:"link",raw:e[0],text:u,href:t,tokens:[{type:"text",raw:u,text:u}]}}},t.url=function(e,t){var u,n,r,i;if(u=this.rules.inline.url.exec(e)){if("@"===u[2])r="mailto:"+(n=D(this.options.mangle?t(u[0]):u[0]));else{for(;i=u[0],u[0]=this.rules.inline._backpedal.exec(u[0])[0],i!==u[0];);n=D(u[0]),r="www."===u[1]?"http://"+n:n}return{type:"link",raw:u[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t){e=this.rules.inline.text.exec(e);if(e){t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):D(e[0]):e[0]:D(this.options.smartypants?t(e[0]):e[0]);return{type:"text",raw:e[0],text:t}}},e}(),$={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:E,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};$.def=p($.def).replace("label",$._label).replace("title",$._title).getRegex(),$.bullet=/(?:[*+-]|\d{1,9}[.)])/,$.listItemStart=p(/^( *)(bull) */).replace("bull",$.bullet).getRegex(),$.list=p($.list).replace(/bull/g,$.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+$.def.source+")").getRegex(),$._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$._comment=/|$)/,$.html=p($.html,"i").replace("comment",$._comment).replace("tag",$._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$.paragraph=p($._paragraph).replace("hr",$.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.blockquote=p($.blockquote).replace("paragraph",$.paragraph).getRegex(),$.normal=b({},$),$.gfm=b({},$.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),$.gfm.table=p($.gfm.table).replace("hr",$.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.gfm.paragraph=p($._paragraph).replace("hr",$.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",$.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.pedantic=b({},$.normal,{html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,paragraph:p($.normal._paragraph).replace("hr",$.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",$.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var S={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:E,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:E,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",S.punctuation=p(S.punctuation).replace(/punctuation/g,S._punctuation).getRegex(),S.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,S.escapedEmSt=/\\\*|\\_/g,S._comment=p($._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),S.emStrong.lDelim=p(S.emStrong.lDelim).replace(/punct/g,S._punctuation).getRegex(),S.emStrong.rDelimAst=p(S.emStrong.rDelimAst,"g").replace(/punct/g,S._punctuation).getRegex(),S.emStrong.rDelimUnd=p(S.emStrong.rDelimUnd,"g").replace(/punct/g,S._punctuation).getRegex(),S._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,S._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,S._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,S.autolink=p(S.autolink).replace("scheme",S._scheme).replace("email",S._email).getRegex(),S._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,S.tag=p(S.tag).replace("comment",S._comment).replace("attribute",S._attribute).getRegex(),S._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,S._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,S._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,S.link=p(S.link).replace("label",S._label).replace("href",S._href).replace("title",S._title).getRegex(),S.reflink=p(S.reflink).replace("label",S._label).replace("ref",$._label).getRegex(),S.nolink=p(S.nolink).replace("ref",$._label).getRegex(),S.reflinkSearch=p(S.reflinkSearch,"g").replace("reflink",S.reflink).replace("nolink",S.nolink).getRegex(),S.normal=b({},S),S.pedantic=b({},S.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",S._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",S._label).getRegex()}),S.gfm=b({},S.normal,{escape:p(S.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\'+(u?e:D(e,!0))+"\n":"
    "+(u?e:D(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,u,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,u){var n=t?"ol":"ul";return"<"+n+(t&&1!==u?' start="'+u+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var u=t.header?"th":"td";return(t.align?"<"+u+' align="'+t.align+'">':"<"+u+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,u){if(null===(e=F(this.options.sanitize,this.options.baseUrl,e)))return u;e='
    "},t.image=function(e,t,u){if(null===(e=F(this.options.sanitize,this.options.baseUrl,e)))return u;u=''+u+'":">"},t.text=function(e){return e},e}(),O=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,u){return""+u},t.image=function(e,t,u){return""+u},t.br=function(){return""},e}(),q=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var u=e,n=0;if(this.seen.hasOwnProperty(u))for(n=this.seen[e];u=e+"-"+ ++n,this.seen.hasOwnProperty(u););return t||(this.seen[e]=n,this.seen[u]=0),u},t.slug=function(e,t){void 0===t&&(t={});e=this.serialize(e);return this.getNextSafeSlug(e,t.dryrun)},e}(),L=function(){function u(e){this.options=e||r.defaults,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new O,this.slugger=new q}u.parse=function(e,t){return new u(t).parse(e)},u.parseInline=function(e,t){return new u(t).parseInline(e)};var e=u.prototype;return e.parse=function(e,t){void 0===t&&(t=!0);for(var u,n,r,i,s,l,a,o,D,c,h,p,f,g,F,A,d="",C=e.length,k=0;kAn error occurred:

    "+D(e.message+"",!0)+"
    ";throw e}}j.options=j.setOptions=function(e){return b(j.defaults,e),e=j.defaults,r.defaults=e,j},j.getDefaults=e,j.defaults=r.defaults,j.use=function(){for(var e=arguments.length,t=new Array(e),u=0;uAn error occurred:

    "+D(e.message+"",!0)+"
    ";throw e}},j.Parser=L,j.parser=L.parse,j.Renderer=Z,j.TextRenderer=O,j.Lexer=I,j.lexer=I.lex,j.Tokenizer=z,j.Slugger=q;var P=(j.parse=j).options,Q=j.setOptions,U=j.use,M=j.walkTokens,N=j.parseInline,X=j,G=L.parse,E=I.lex;r.Lexer=I,r.Parser=L,r.Renderer=Z,r.Slugger=q,r.TextRenderer=O,r.Tokenizer=z,r.getDefaults=e,r.lexer=E,r.marked=j,r.options=P,r.parse=X,r.parseInline=N,r.parser=G,r.setOptions=Q,r.use=U,r.walkTokens=M,Object.defineProperty(r,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 758b9cc78..b4a0377f1 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -4703,6 +4703,11 @@ class Get 'type' => 'php'); foreach ($results as $_nr => &$result) { + // Trigger Event: jcb_ce_onBeforeModelDynamicGetData + $this->triggerEvent( + 'jcb_ce_onBeforeModelDynamicGetData', + array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context) + ); // set GUI mapper id $guiMapper['id'] = (int) $result->id; // add calculations if set @@ -5213,6 +5218,11 @@ class Get { $result->plugin_events = ''; } + // Trigger Event: jcb_ce_onAfterModelDynamicGetData + $this->triggerEvent( + 'jcb_ce_onAfterModelDynamicGetData', + array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context) + ); } return $results; @@ -9379,6 +9389,8 @@ class Get $module->form_files = array(); $module->fieldsets_label = array(); $module->fieldsets_paths = array(); + $module->add_rule_path = array(); + $module->add_field_path = array(); // set global fields rule to default component path $module->fields_rules_paths = 1; // set the fields data @@ -9453,6 +9465,30 @@ class Get // set where to path is pointing $module->fieldsets_paths[$unique] = $form['fields_rules_paths']; + // check for extra rule paths + if (isset($form['addrulepath']) + && ComponentbuilderHelper::checkArray($form['addrulepath'])) + { + foreach ($form['addrulepath'] as $add_rule_path) + { + if (ComponentbuilderHelper::checkString($add_rule_path['path'])) + { + $module->add_rule_path[$unique] = $add_rule_path['path']; + } + } + } + // check for extra field paths + if (isset($form['addfieldpath']) + && ComponentbuilderHelper::checkArray($form['addfieldpath'])) + { + foreach ($form['addfieldpath'] as $add_field_path) + { + if (ComponentbuilderHelper::checkString($add_field_path['path'])) + { + $module->add_field_path[$unique] = $add_field_path['path']; + } + } + } // add the label if set to lang if (isset($form['label']) && ComponentbuilderHelper::checkString( @@ -10287,6 +10323,8 @@ class Get $plugin->form_files = array(); $plugin->fieldsets_label = array(); $plugin->fieldsets_paths = array(); + $plugin->add_rule_path = array(); + $plugin->add_field_path = array(); // set global fields rule to default component path $plugin->fields_rules_paths = 1; // set the fields data @@ -10370,6 +10408,30 @@ class Get $plugin->fieldsets_label[$unique] = $this->setLang($form['label']); } + // check for extra rule paths + if (isset($form['addrulepath']) + && ComponentbuilderHelper::checkArray($form['addrulepath'])) + { + foreach ($form['addrulepath'] as $add_rule_path) + { + if (ComponentbuilderHelper::checkString($add_rule_path['path'])) + { + $plugin->add_rule_path[$unique] = $add_rule_path['path']; + } + } + } + // check for extra field paths + if (isset($form['addfieldpath']) + && ComponentbuilderHelper::checkArray($form['addfieldpath'])) + { + foreach ($form['addfieldpath'] as $add_field_path) + { + if (ComponentbuilderHelper::checkString($add_field_path['path'])) + { + $plugin->add_field_path[$unique] = $add_field_path['path']; + } + } + } // build the fields $form['fields'] = array_map( function ($field) use ($key, $unique) { diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 17fee9ad4..31c23e8b0 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -946,44 +946,78 @@ class Structure extends Get { // default to the field set name $label = $fieldset; - if (isset( - $module->fieldsets_label[$file - . $field_name . $fieldset] - )) + if (isset($module->fieldsets_label[$file . $field_name . $fieldset])) { - $label = $module->fieldsets_label[$file - . $field_name . $fieldset]; + $label = $module->fieldsets_label[$file . $field_name . $fieldset]; } // add path to module rules and custom fields - if (isset( - $module->fieldsets_paths[$file - . $field_name . $fieldset] - ) - && $module->fieldsets_paths[$file - . $field_name . $fieldset] == 2) + if (isset($module->fieldsets_paths[$file . $field_name . $fieldset]) + && ($module->fieldsets_paths[$file . $field_name . $fieldset] == 2 + || $module->fieldsets_paths[$file . $field_name . $fieldset] == 3)) { + if ($module->target == 2) + { + if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) + { + $module->add_rule_path[$file . $field_name . $fieldset] = + '/administrator/modules/' + . $module->file_name . '/rules'; + } + + if (!isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $module->add_field_path[$file . $field_name . $fieldset] = + '/administrator/modules/' + . $module->file_name . '/fields'; + } + } + else + { + if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) + { + $module->add_rule_path[$file . $field_name . $fieldset] = + '/modules/' . $module->file_name + . '/rules'; + } + + if (!isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $module->add_field_path[$file . $field_name . $fieldset] = + '/modules/' . $module->file_name + . '/fields'; + } + } + } + // add path to module rules and custom fields + if (isset($module->add_rule_path[$file . $field_name . $fieldset]) + || isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(1) . ''; - $xml .= PHP_EOL . $this->_t(1) - . '
    _t(2) - . 'addrulepath="/modules/' - . strtolower($module->code_name) - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/modules/' - . strtolower($module->code_name) - . '/fields"'; + . $this->setLine(__LINE__) . ' default paths of ' + . $fieldset . ' fieldset points to the module -->'; + + $xml .= PHP_EOL . $this->_t(1) . '
    add_rule_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addrulepath="' . $module->add_rule_path[$file . $field_name . $fieldset] . '"'; + } + + if (isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="' . $module->add_field_path[$file . $field_name . $fieldset] . '"'; + } + $xml .= PHP_EOL . $this->_t(1) . '>'; } else { - $xml .= PHP_EOL . $this->_t(1) - . '
    '; + $xml .= PHP_EOL . $this->_t(1) . '
    '; } // check if we have an inner field set if (ComponentbuilderHelper::checkString( @@ -1321,46 +1355,60 @@ class Structure extends Get { // default to the field set name $label = $fieldset; - if (isset( - $plugin->fieldsets_label[$file - . $field_name . $fieldset] - )) + if (isset($plugin->fieldsets_label[$file . $field_name . $fieldset])) { - $label = $plugin->fieldsets_label[$file - . $field_name . $fieldset]; + $label = $plugin->fieldsets_label[$file . $field_name . $fieldset]; } // add path to plugin rules and custom fields - if (isset( - $plugin->fieldsets_paths[$file - . $field_name . $fieldset] - ) - && $plugin->fieldsets_paths[$file - . $field_name . $fieldset] == 2) + if (isset($plugin->fieldsets_paths[$file . $field_name . $fieldset]) + && ($plugin->fieldsets_paths[$file . $field_name . $fieldset] == 2 + || $plugin->fieldsets_paths[$file . $field_name . $fieldset] == 3)) + { + if (!isset($plugin->add_rule_path[$file . $field_name . $fieldset])) + { + $plugin->add_rule_path[$file . $field_name . $fieldset] = + '/plugins/' . strtolower($plugin->group + ) . '/' . strtolower($plugin->code_name) + . '/rules'; + } + + if (!isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $plugin->add_field_path[$file . $field_name . $fieldset] = + '/plugins/' . strtolower($plugin->group + ) . '/' . strtolower($plugin->code_name) + . '/fields'; + } + } + // add path to plugin rules and custom fields + if (isset($plugin->add_rule_path[$file . $field_name . $fieldset]) + || isset($plugin->add_field_path[$file . $field_name . $fieldset])) { $xml .= PHP_EOL . $this->_t(1) . ''; - $xml .= PHP_EOL . $this->_t(1) - . '
    _t(2) - . 'addrulepath="/plugins/' - . strtolower($plugin->group) . '/' - . strtolower($plugin->code_name) - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/plugins/' - . strtolower($plugin->group) . '/' - . strtolower($plugin->code_name) - . '/fields"'; + . $this->setLine(__LINE__) . ' default paths of ' + . $fieldset . ' fieldset points to the plugin -->'; + + $xml .= PHP_EOL . $this->_t(1) . '
    add_rule_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addrulepath="' . $plugin->add_rule_path[$file . $field_name . $fieldset] . '"'; + } + + if (isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="' . $plugin->add_field_path[$file . $field_name . $fieldset] . '"'; + } + $xml .= PHP_EOL . $this->_t(1) . '>'; } else { - $xml .= PHP_EOL . $this->_t(1) - . '
    '; + $xml .= PHP_EOL . $this->_t(1) . '
    '; } // check if we have an inner field set if (ComponentbuilderHelper::checkString( diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 0e2632cdb..22e9d0fd4 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -3771,17 +3771,8 @@ class Interpretation extends Fields { $getItem .= $this->setCustomViewGroup($get->group, $code, $tab); } - // get ready to get query - $getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "//" - . $this->setLine(__LINE__) - . " Reset the query using our newly populated query object."; - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) - . "\$db->setQuery(\$query);"; - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//" - . $this->setLine(__LINE__) - . " Load the results as a stdClass object."; - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) - . "\$data = \$db->loadObject();"; + // db set query data placeholder + $getItem .= $this->hhh . "DB_SET_QUERY_DATA" . $this->hhh; // set after item php if (isset($get->add_php_after_getitem) && $get->add_php_after_getitem == 1 @@ -3792,6 +3783,36 @@ class Interpretation extends Fields $get->php_after_getitem, $this->placeholders ); } + // check the getItem string to see if we should still add set query to data + if (strpos($getItem, '$data =') === false) + { + // get ready to get query + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] = + PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "//" + . $this->setLine(__LINE__) + . " Reset the query using our newly populated query object."; + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .= + PHP_EOL . $this->_t(1) . $tab . $this->_t(1) + . "\$db->setQuery(\$query);"; + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .= + PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//" + . $this->setLine(__LINE__) + . " Load the results as a stdClass object."; + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .= + PHP_EOL . $this->_t(1) . $tab . $this->_t(1) + . "\$data = \$db->loadObject();"; + // add the db set query to data + } + else + { + // remove our placeholder + $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] = ''; + } + // add the db set query to data + $getItem = str_replace( + array_keys($setQuery), + array_values($setQuery), $getItem + ); $getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "if (empty(\$data))"; $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{"; @@ -3849,7 +3870,7 @@ class Interpretation extends Fields . "return false;"; } $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "}"; - // dispatcher placholder + // dispatcher placeholder $getItem .= $this->hhh . "DISPATCHER" . $this->hhh; if (ComponentbuilderHelper::checkArray($get->main_get)) { @@ -10334,7 +10355,7 @@ class Interpretation extends Fields $db = ''; foreach ($this->queryBuilder as $view => $fields) { - // build the uninstall array + // build the uninstallation array $this->uninstallBuilder[] = "DROP TABLE IF EXISTS `#__" . $component . "_" . $view . "`;"; @@ -10426,10 +10447,17 @@ class Interpretation extends Fields ) && in_array($data['ID'], $this->addSQL['field'][$view])) { + // to soon.... + //$this->updateSQLBuilder["ALTERTABLE`#__" . $component + //. "_" . $view . "`ADDCOLUMNIFNOTEXISTS`" . $field . "`"] + // = "ALTER TABLE `#__" . $component . "_" . $view + // . "` ADD COLUMN IF NOT EXISTS `" . $field . "` " . $data['type'] + // . $lenght . " " . $default . " AFTER `" . $last_name + // . "`;"; $this->updateSQLBuilder["ALTERTABLE`#__" . $component - . "_" . $view . "`ADDCOLUMNIFNOTEXISTS`" . $field . "`"] + . "_" . $view . "`ADD`" . $field . "`"] = "ALTER TABLE `#__" . $component . "_" . $view - . "` ADD COLUMN IF NOT EXISTS `" . $field . "` " . $data['type'] + . "` ADD `" . $field . "` " . $data['type'] . $lenght . " " . $default . " AFTER `" . $last_name . "`;"; } @@ -10480,55 +10508,55 @@ class Interpretation extends Fields { $db_ .= PHP_EOL . $this->_t(1) . "`params` text NULL,"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['published'])) { $db_ .= PHP_EOL . $this->_t(1) . "`published` TINYINT(3) NOT NULL DEFAULT 1,"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['created_by'])) { $db_ .= PHP_EOL . $this->_t(1) . "`created_by` INT(10) unsigned NOT NULL DEFAULT 0,"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['modified_by'])) { $db_ .= PHP_EOL . $this->_t(1) . "`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['created'])) { $db_ .= PHP_EOL . $this->_t(1) . "`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['modified'])) { $db_ .= PHP_EOL . $this->_t(1) . "`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['checked_out'])) { $db_ .= PHP_EOL . $this->_t(1) . "`checked_out` int(11) unsigned NOT NULL DEFAULT 0,"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['checked_out_time'])) { $db_ .= PHP_EOL . $this->_t(1) . "`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['version'])) { $db_ .= PHP_EOL . $this->_t(1) . "`version` INT(10) unsigned NOT NULL DEFAULT 1,"; } - // check if default field was over written + // check if default field was overwritten if (!isset($this->fieldsNames[$view]['hits'])) { $db_ .= PHP_EOL . $this->_t(1) @@ -21487,16 +21515,16 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(2) . "JToolbarHelper::divider();"; $toolBar .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " set help url for this view if found"; - $toolBar .= PHP_EOL . $this->_t(2) . "\$help_url = " + $toolBar .= PHP_EOL . $this->_t(2) . "\$this->help_url = " . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::getHelpUrl('" . $nameSingleCode . "');"; $toolBar .= PHP_EOL . $this->_t(2) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' - . $this->hhh] . "Helper::checkString(\$help_url))"; + . $this->hhh] . "Helper::checkString(\$this->help_url))"; $toolBar .= PHP_EOL . $this->_t(2) . "{"; $toolBar .= PHP_EOL . $this->_t(3) . "JToolbarHelper::help('" - . $this->langPrefix . "_HELP_MANAGER', false, \$help_url);"; + . $this->langPrefix . "_HELP_MANAGER', false, \$this->help_url);"; $toolBar .= PHP_EOL . $this->_t(2) . "}"; } @@ -21748,7 +21776,7 @@ class Interpretation extends Fields public function setCheckinCall() { $call = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) - . " check in items"; + . " Check in items"; $call .= PHP_EOL . $this->_t(2) . "\$this->checkInNow();" . PHP_EOL; return $call; @@ -21777,22 +21805,28 @@ class Interpretation extends Fields ) . " Get a db connection."; $checkin .= PHP_EOL . $this->_t(3) . "\$db = JFactory::getDbo();"; $checkin .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) - . " reset query"; + . " Reset query."; $checkin .= PHP_EOL . $this->_t(3) . "\$query = \$db->getQuery(true);"; $checkin .= PHP_EOL . $this->_t(3) . "\$query->select('*');"; $checkin .= PHP_EOL . $this->_t(3) . "\$query->from(\$db->quoteName('#__" . $component . "_" . $view . "'));"; - $checkin .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query);"; + $checkin .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Only select items that are checked out."; + $checkin .= PHP_EOL . $this->_t(3) + . "\$query->where(\$db->quoteName('checked_out') . '!=0');"; + $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Query only to see if we have a rows"; + $checkin .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query, 0, 1);"; $checkin .= PHP_EOL . $this->_t(3) . "\$db->execute();"; $checkin .= PHP_EOL . $this->_t(3) . "if (\$db->getNumRows())"; $checkin .= PHP_EOL . $this->_t(3) . "{"; $checkin .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) - . " Get Yesterdays date"; + . " Get Yesterdays date."; $checkin .= PHP_EOL . $this->_t(4) . "\$date = JFactory::getDate()->modify(\$time)->toSql();"; $checkin .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) - . " reset query"; + . " Reset query."; $checkin .= PHP_EOL . $this->_t(4) . "\$query = \$db->getQuery(true);"; $checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ @@ -21814,7 +21848,7 @@ class Interpretation extends Fields $checkin .= PHP_EOL . $this->_t(4) . ");"; $checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine( __LINE__ - ) . " Check table"; + ) . " Check table."; $checkin .= PHP_EOL . $this->_t(4) . "\$query->update(\$db->quoteName('#__" . $component . "_" . $view . "'))->set(\$fields)->where(\$conditions); "; @@ -28597,43 +28631,72 @@ function vdm_dkim() { { // default to the field set name $label = $fieldset; - if (isset( - $module->fieldsets_label[$field_name . $fieldset] - )) + if (isset($module->fieldsets_label[$field_name . $fieldset])) { - $label = $module->fieldsets_label[$field_name - . $fieldset]; + $label = $module->fieldsets_label[$field_name . $fieldset]; } // add path to module rules and custom fields if (isset($module->fieldsets_paths[$field_name . $fieldset]) - && $module->fieldsets_paths[$field_name . $fieldset] - == 2) + && ($module->fieldsets_paths[$field_name . $fieldset] == 2 + || $module->fieldsets_paths[$field_name . $fieldset] == 3)) { - $xml .= PHP_EOL . $this->_t(1) . ''; - $xml .= PHP_EOL . $this->_t(1) . '
    target == 2) { - $xml .= PHP_EOL . $this->_t(2) - . 'addrulepath="/administrator/modules/' - . $module->file_name - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/administrator/modules/' - . $module->file_name - . '/fields"'; + if (!isset($module->add_rule_path[$field_name . $fieldset])) + { + $module->add_rule_path[$field_name . $fieldset] = + '/administrator/modules/' + . $module->file_name . '/rules'; + } + + if (!isset($module->add_field_path[$field_name . $fieldset])) + { + $module->add_field_path[$field_name . $fieldset] = + '/administrator/modules/' + . $module->file_name . '/fields'; + } } else { - $xml .= PHP_EOL . $this->_t(2) - . 'addrulepath="/modules/' . $module->file_name - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/modules/' . $module->file_name - . '/fields"'; + if (!isset($module->add_rule_path[$field_name . $fieldset])) + { + $module->add_rule_path[$field_name . $fieldset] = + '/modules/' . $module->file_name + . '/rules'; + } + + if (!isset($module->add_field_path[$field_name . $fieldset])) + { + $module->add_field_path[$field_name . $fieldset] = + '/modules/' . $module->file_name + . '/fields'; + } } + } + // add path to module rules and custom fields + if (isset($module->add_rule_path[$field_name . $fieldset]) + || isset($module->add_field_path[$field_name . $fieldset])) + { + + $xml .= PHP_EOL . $this->_t(1) . ''; + + $xml .= PHP_EOL . $this->_t(1) . '
    add_rule_path[$field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addrulepath="' . $module->add_rule_path[$field_name . $fieldset] . '"'; + } + + if (isset($module->add_field_path[$field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="' . $module->add_field_path[$field_name . $fieldset] . '"'; + } + $xml .= PHP_EOL . $this->_t(1) . '>'; } else @@ -28974,33 +29037,54 @@ function vdm_dkim() { { // default to the field set name $label = $fieldset; - if (isset( - $plugin->fieldsets_label[$field_name . $fieldset] - )) + if (isset($plugin->fieldsets_label[$field_name . $fieldset])) { - $label = $plugin->fieldsets_label[$field_name - . $fieldset]; + $label = $plugin->fieldsets_label[$field_name . $fieldset]; } // add path to plugin rules and custom fields if (isset($plugin->fieldsets_paths[$field_name . $fieldset]) - && $plugin->fieldsets_paths[$field_name . $fieldset] - == 2) + && ($plugin->fieldsets_paths[$field_name . $fieldset] == 2 + || $plugin->fieldsets_paths[$field_name . $fieldset] == 3)) + { + if (!isset($plugin->add_rule_path[$field_name . $fieldset])) + { + $plugin->add_rule_path[$field_name . $fieldset] = + '/plugins/' . strtolower($plugin->group + ) . '/' . strtolower($plugin->code_name) + . '/rules'; + } + + if (!isset($plugin->add_field_path[$field_name . $fieldset])) + { + $plugin->add_field_path[$field_name . $fieldset] = + '/plugins/' . strtolower($plugin->group + ) . '/' . strtolower($plugin->code_name) + . '/fields'; + } + } + // add path to plugin rules and custom fields + if (isset($plugin->add_rule_path[$field_name . $fieldset]) + || isset($plugin->add_field_path[$field_name . $fieldset])) { $xml .= PHP_EOL . $this->_t(1) . ''; + $xml .= PHP_EOL . $this->_t(1) . '
    _t(2) - . 'addrulepath="/plugins/' . strtolower( - $plugin->group - ) . '/' . strtolower($plugin->code_name) - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/plugins/' . strtolower( - $plugin->group - ) . '/' . strtolower($plugin->code_name) - . '/fields"'; + + if (isset($plugin->add_rule_path[$field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addrulepath="' . $plugin->add_rule_path[$field_name . $fieldset] . '"'; + } + + if (isset($plugin->add_field_path[$field_name . $fieldset])) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="' . $plugin->add_field_path[$field_name . $fieldset] . '"'; + } + $xml .= PHP_EOL . $this->_t(1) . '>'; } else diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 24da55931..99c85408c 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -2061,7 +2061,7 @@ abstract class ComponentbuilderHelper 'hash' => '84478dfa0cd880395815e0ee026812a4', 'html' => 'VDM a JCB sponsor | Because community matters...'), array( - 'url' => 'https://allmycms.com/images/banners/agerix/agerix-loves-jcb-728-90.gif', + 'url' => 'https://cms-experts.org/images/banners/agerix/agerix-loves-jcb-728-90.gif', 'hash' => 'b24c0726aa809cdcc04bcffe7e1e1529', 'html' => 'Agerix a JCB sponsor | Because community matters...') ), @@ -2823,8 +2823,8 @@ abstract class ComponentbuilderHelper // delete an existing zip file (or use an exclusion parameter in Folder::files() File::delete($filepath); - // get a list of files in the current directory tree - $files = Folder::files('.', '', true, true); + // get a list of files in the current directory tree (also the hidden files) + $files = Folder::files('.', '', true, true, array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array('.*~')); $zipArray = array(); // setup the zip array foreach ($files as $file) diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 25ac40906..eff098d0c 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -2813,6 +2813,8 @@ COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_YOUTUBE="Youtube" COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ZOOM_OUT="Zoom Out" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD="Component Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE="Clone" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE_ME_LABEL="Clone" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_BY_DESC="The user that created this Component Dashboard." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_DATE_DESC="The date this Component Dashboard was created." @@ -2843,6 +2845,8 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_HINT="Name Here" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_LABEL="Name" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW="A New Component Dashboard" +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_dashboard that should be exactly the same. Just selecting that component_dashboard and clicking save, will overwrite this component_dashboard with that selected component_dashboard data." +COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_dashboard's values into this one." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_PHP_DASHBOARD_NOTE_DESCRIPTION="Adding custom PHP method to the dashboard model
    use the public function getMethodName() to insure the data is set to the view,
    Note the convention public function get...() replace the ... with the unique method name." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PERMISSION="Permissions" @@ -2865,6 +2869,8 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_DESCRIPTION="Add custom COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_LABEL="Folder (custom folder)" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADVANCE="Advance" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_BASIC="Basic" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE="Clone" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE_ME_LABEL="Clone" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_BY_DESC="The user that created this Component Files & Folders." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_DATE_DESC="The date this Component Files & Folders was created." @@ -2938,6 +2944,8 @@ If you are in the installation application:
    JPATH_BASE == JPATH_INSTALLATION.
    JPATH_ROOT is the root path for the Joomla install and does not depend upon any application.

    " COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_LABEL="Constant Paths" +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_files_folders that should be exactly the same. Just selecting that component_files_folders and clicking save, will overwrite this component_files_folders with that selected component_files_folders data." +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_files_folders's values into this one." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION="Should file be updated." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL="Update" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ORDERING_LABEL="Ordering" @@ -2956,6 +2964,8 @@ COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS="Component Global Settings" COM_COMPONENTBUILDER_COMPONENT_MODULES="Component Modules" COM_COMPONENTBUILDER_COMPONENT_MODULES_ADDJOOMLA_MODULES_DESCRIPTION="Setup the Joomla modules for this component." COM_COMPONENTBUILDER_COMPONENT_MODULES_ADDJOOMLA_MODULES_LABEL="Joomla Modules" +COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE="Clone" +COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE_ME_LABEL="Clone" COM_COMPONENTBUILDER_COMPONENT_MODULES_COMPILE_AMP_EXPORT="Compile & Export" COM_COMPONENTBUILDER_COMPONENT_MODULES_COMPILE_ONLY="Compile (only)" COM_COMPONENTBUILDER_COMPONENT_MODULES_CREATED_BY_DESC="The user that created this Component Modules." @@ -2976,6 +2986,8 @@ COM_COMPONENTBUILDER_COMPONENT_MODULES_MODULE="Module" COM_COMPONENTBUILDER_COMPONENT_MODULES_MODULES="Modules" COM_COMPONENTBUILDER_COMPONENT_MODULES_MODULE_LABEL="Modules" COM_COMPONENTBUILDER_COMPONENT_MODULES_NEW="A New Component Modules" +COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_modules that should be exactly the same. Just selecting that component_modules and clicking save, will overwrite this component_modules with that selected component_modules data." +COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_modules's values into this one." COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_ON_JOOMLA_MODULES_DESCRIPTION="Do not add the same Joomla modules twice it will not work." COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_ON_JOOMLA_MODULES_LABEL="Setting Joomla Modules" COM_COMPONENTBUILDER_COMPONENT_MODULES_ORDERING_LABEL="Ordering" @@ -3034,6 +3046,8 @@ COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_YES_INCLUDE_BASED_ON_OPTIONS="Yes in COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS="Component Placeholders" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_ADDPLACEHOLDERS_DESCRIPTION="Set dnamic placeholders for this component." COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_ADDPLACEHOLDERS_LABEL="Placeholders" +COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE="Clone" +COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE_ME_LABEL="Clone" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CREATED_BY_DESC="The user that created this Component Placeholders." COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CREATED_DATE_DESC="The date this Component Placeholders was created." @@ -3049,6 +3063,8 @@ COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_MODIFIED_DATE_DESC="The date this Component Placeholders was modified." COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_MODIFIED_DATE_LABEL="Modified Date" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NEW="A New Component Placeholders" +COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_placeholders that should be exactly the same. Just selecting that component_placeholders and clicking save, will overwrite this component_placeholders with that selected component_placeholders data." +COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_placeholders's values into this one." COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_PERMISSION="Permissions" COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_PUBLISHING="Publishing" @@ -3067,6 +3083,8 @@ COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VERSION_LABEL="Version" COM_COMPONENTBUILDER_COMPONENT_PLUGINS="Component Plugins" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS_DESCRIPTION="Setup the Joomla plugins for this component." COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS_LABEL="Joomla Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE="Clone" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE_ME_LABEL="Clone" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_COMPILE_AMP_EXPORT="Compile & Export" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_COMPILE_ONLY="Compile (only)" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CREATED_BY_DESC="The user that created this Component Plugins." @@ -3084,6 +3102,8 @@ COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_DATE_DESC="The date this Component Plugins was modified." COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_DATE_LABEL="Modified Date" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NEW="A New Component Plugins" +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_plugins that should be exactly the same. Just selecting that component_plugins and clicking save, will overwrite this component_plugins with that selected component_plugins data." +COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_plugins's values into this one." COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_ON_JOOMLA_PLUGINS_DESCRIPTION="Do not add the same Joomla plugins twice it will not work." COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_ON_JOOMLA_PLUGINS_LABEL="Setting Joomla Plugins" COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ORDERING_LABEL="Ordering" @@ -3930,10 +3950,10 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB="New Tab" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB_2="New Tab 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEXT="Next" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO="No" -COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?= JText::_('Text') ?>
    -<?= JText::sprintf('Hello %s', $this->user->name) ?>
    +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
    +<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
    Just get UPPERCASE language string:
    -<?= JustTEXT::_('Text') ?>" +<?php echo JustTEXT::_('Text'); ?>" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" @@ -6217,7 +6237,11 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_N_ITEMS_UNFEATURED_1="%s Joomla Modu COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_N_ITEMS_UNPUBLISHED="%s Joomla Modules Updates unpublished." COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Joomla Module Updates unpublished." COM_COMPONENTBUILDER_JOOMLA_MODULE_ABSTRACT_CLASS="abstract class" +COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDFIELDPATH_DESCRIPTION="Set other field path" +COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDFIELDPATH_LABEL="Other Field Path" COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDREADME_LABEL="Add README" +COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDRULEPATH_DESCRIPTION="Set other rule path" +COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDRULEPATH_LABEL="Other Rule Path" COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_CLASS_HELPER_DESCRIPTION="You can add a helper class to your module." COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_CLASS_HELPER_HEADER_DESCRIPTION="You can add your own custom helper header script." COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_CLASS_HELPER_HEADER_LABEL="Add Class Helper Header" @@ -6419,10 +6443,10 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW="A New Joomla Module" COM_COMPONENTBUILDER_JOOMLA_MODULE_NO="No" COM_COMPONENTBUILDER_JOOMLA_MODULE_NONE="None" -COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?= JText::_('Text') ?>
    -<?= JText::sprintf('Hello %s', $this->user->name) ?>
    +COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
    +<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
    Just get UPPERCASE language string:
    -<?= JustTEXT::_('Text') ?>" +<?php echo JustTEXT::_('Text'); ?>" COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String" COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION="

    All libraries added to modules are added to the component media folder for now

    So over here you are able to manually add HTML code to your model default tmpl.

    " @@ -6442,6 +6466,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL="The ZIP Op COM_COMPONENTBUILDER_JOOMLA_MODULE_NOT_REQUIRED="Not Required" COM_COMPONENTBUILDER_JOOMLA_MODULE_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_JOOMLA_MODULE_OTHER="Other" +COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_LABEL="Path" +COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_MESSAGE="Error! Please add extra field path here." COM_COMPONENTBUILDER_JOOMLA_MODULE_PERMISSION="Permissions" COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_METHOD_UNINSTALL_DESCRIPTION="PHP script that should run during uninstall." COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_METHOD_UNINSTALL_LABEL="PHP Method (uninstall)" @@ -6660,7 +6686,11 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNFEATURED="%s Joomla Plugin COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNFEATURED_1="%s Joomla Plugin Updates unfeatured." COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNPUBLISHED="%s Joomla Plugins Updates unpublished." COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Joomla Plugin Updates unpublished." +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDFIELDPATH_DESCRIPTION="Set other field path" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDFIELDPATH_LABEL="Other Field Path" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDREADME_LABEL="Add README" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDRULEPATH_DESCRIPTION="Set other rule path" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDRULEPATH_LABEL="Other Rule Path" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_DESCRIPTION="You can add your own custom header script, combined with the default header script that make the extended class work." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_LABEL="Add Custom Class Header" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_METHOD_UNINSTALL_LABEL="Add PHP Method (uninstall)" @@ -6915,6 +6945,8 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL="The ZIP Op COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOT_REQUIRED="Not Required" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_OTHER="Other" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_LABEL="Path" +COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_MESSAGE="Error! Please add extra field path here." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PERMISSION="Permissions" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_METHOD_UNINSTALL_DESCRIPTION="PHP script that should run during uninstall." COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_METHOD_UNINSTALL_LABEL="PHP Method (uninstall)" @@ -7265,10 +7297,10 @@ COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL="Name" COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_LAYOUT_NEW="A New Layout" COM_COMPONENTBUILDER_LAYOUT_NO="No" -COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?= JText::_('Text') ?>
    -<?= JText::sprintf('Hello %s', $this->user->name) ?>
    +COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
    +<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
    Just get UPPERCASE language string:
    -<?= JustTEXT::_('Text') ?>" +<?php echo JustTEXT::_('Text'); ?>" COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String" COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" @@ -8361,10 +8393,10 @@ COM_COMPONENTBUILDER_SITE_VIEW_NEW_TAB_2="New Tab 2" COM_COMPONENTBUILDER_SITE_VIEW_NEXT="Next" COM_COMPONENTBUILDER_SITE_VIEW_NO="No" COM_COMPONENTBUILDER_SITE_VIEW_NONE="None" -COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?= JText::_('Text') ?>
    -<?= JText::sprintf('Hello %s', $this->user->name) ?>
    +COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
    +<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
    Just get UPPERCASE language string:
    -<?= JustTEXT::_('Text') ?>" +<?php echo JustTEXT::_('Text'); ?>" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String" COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body [[[SITE_TOOLBAR]]] to add the custom position of the toolbar." COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." @@ -8835,10 +8867,10 @@ COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL="Name" COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_TEMPLATE_NEW="A New Template" COM_COMPONENTBUILDER_TEMPLATE_NO="No" -COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?= JText::_('Text') ?>
    -<?= JText::sprintf('Hello %s', $this->user->name) ?>
    +COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
    +<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
    Just get UPPERCASE language string:
    -<?= JustTEXT::_('Text') ?>" +<?php echo JustTEXT::_('Text'); ?>" COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String" COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details." COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code" diff --git a/admin/layouts/component_dashboard/clone_left.php b/admin/layouts/component_dashboard/clone_left.php new file mode 100644 index 000000000..d240e31d2 --- /dev/null +++ b/admin/layouts/component_dashboard/clone_left.php @@ -0,0 +1,44 @@ + + * @gitea Joomla Component Builder + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'note_how_to_clone', + 'clone_me' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/component_files_folders/clone_left.php b/admin/layouts/component_files_folders/clone_left.php new file mode 100644 index 000000000..d240e31d2 --- /dev/null +++ b/admin/layouts/component_files_folders/clone_left.php @@ -0,0 +1,44 @@ + + * @gitea Joomla Component Builder + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'note_how_to_clone', + 'clone_me' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/component_modules/clone_left.php b/admin/layouts/component_modules/clone_left.php new file mode 100644 index 000000000..d240e31d2 --- /dev/null +++ b/admin/layouts/component_modules/clone_left.php @@ -0,0 +1,44 @@ + + * @gitea Joomla Component Builder + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'note_how_to_clone', + 'clone_me' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/component_placeholders/clone_left.php b/admin/layouts/component_placeholders/clone_left.php new file mode 100644 index 000000000..d240e31d2 --- /dev/null +++ b/admin/layouts/component_placeholders/clone_left.php @@ -0,0 +1,44 @@ + + * @gitea Joomla Component Builder + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'note_how_to_clone', + 'clone_me' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/component_plugins/clone_left.php b/admin/layouts/component_plugins/clone_left.php new file mode 100644 index 000000000..d240e31d2 --- /dev/null +++ b/admin/layouts/component_plugins/clone_left.php @@ -0,0 +1,44 @@ + + * @gitea Joomla Component Builder + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'note_how_to_clone', + 'clone_me' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 7d1d56bf9..94314a6df 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -203,7 +203,7 @@ class ComponentbuilderModelAdmin_views extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -817,17 +817,19 @@ class ComponentbuilderModelAdmin_views extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_admin_view')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -842,7 +844,7 @@ class ComponentbuilderModelAdmin_views extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_admin_view'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/admins_custom_tabs.php b/admin/models/admins_custom_tabs.php index ae1ee5152..2cd0de01a 100644 --- a/admin/models/admins_custom_tabs.php +++ b/admin/models/admins_custom_tabs.php @@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_admin_custom_tabs')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_admin_custom_tabs'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/admins_fields.php b/admin/models/admins_fields.php index 3827615f4..4630c9cd8 100644 --- a/admin/models/admins_fields.php +++ b/admin/models/admins_fields.php @@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_admin_fields')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_admin_fields'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/admins_fields_conditions.php b/admin/models/admins_fields_conditions.php index 26dd6cf54..f588062a1 100644 --- a/admin/models/admins_fields_conditions.php +++ b/admin/models/admins_fields_conditions.php @@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_admin_fields_conditions')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_admin_fields_conditions'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/admins_fields_relations.php b/admin/models/admins_fields_relations.php index d6a54b264..16491c625 100644 --- a/admin/models/admins_fields_relations.php +++ b/admin/models/admins_fields_relations.php @@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_admin_fields_relations')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_admin_fields_relations'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 78657fe19..5d9ddab42 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -1803,10 +1803,10 @@ class ComponentbuilderModelAjax extends JModelList $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.alias','a.template','b.name','a.dynamic_get'))); + $query->select($db->quoteName(array('a.id', 'a.alias', 'a.template', 'b.name', 'a.dynamic_get'))); $query->from($db->quoteName('#__componentbuilder_template', 'a')); $query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')'); - $query->where($db->quoteName('a.id') . ' != '.(int) $id); + $query->where($db->quoteName('a.id') . ' != '. (int) $id); $query->where($db->quoteName('a.published') . ' = 1'); // Reset the query using our newly populated query object. $db->setQuery($query); @@ -1839,10 +1839,10 @@ class ComponentbuilderModelAjax extends JModelList $templateString[] = "".$result->name." ".$editget."<?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?> ".$edit.""; } // build the table - $table = '

    '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS').'

    '; - $table .= ''; - $table .= ''; - $table .= ''.implode("",$templateString)."
    '.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'
    '.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').''.JText::_('COM_COMPONENTBUILDER_SNIPPET').'
    "; + $table = '

    ' . JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS') . '

    '; + $table .= ''; + $table .= ''; + $table .= '' . implode("", $templateString) . "
    ' . JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE') . '
    ' . JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET') . '' . JText::_('COM_COMPONENTBUILDER_SNIPPET') . '
    "; } return $table; } @@ -1892,34 +1892,38 @@ class ComponentbuilderModelAjax extends JModelList switch ($result->gettype) { case 1: - // single - $layoutString[] = "".$result->name." ".$editget."<?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?> ".$edit.""; + // single + $layoutString[] = "" . $result->name . " " . $editget . "<?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', \$this->item); ?> " . $edit . ""; break; case 2: - // list - $layoutString[] = "".$result->name." ".$editget."<?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?> ".$edit.""; + // list + $layoutString[] = "" . $result->name . " " . $editget . "<?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', \$this->items); ?> " . $edit . ""; break; case 3: case 4: - // custom - $result->getcustom = ComponentbuilderHelper::safeString($result->getcustom); - if (substr($result->getcustom, 0, strlen('get')) == 'get') - { - $varName = substr($result->getcustom, strlen('get')); - } - else - { - $varName = $result->getcustom; - } - $layoutString[] = "".$result->name." ".$editget."<?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?> ".$edit.""; + // custom + $result->getcustom = ComponentbuilderHelper::safeString($result->getcustom); + if (substr($result->getcustom, 0, strlen('get')) == 'get') + { + $varName = substr($result->getcustom, strlen('get')); + } + else + { + $varName = $result->getcustom; + } + $layoutString[] = "" . $result->name . " " . $editget . "<?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', \$this->" . $varName . "); ?> " . $edit . ""; + break; + default: + // no get + $layoutString[] = "" . JText::_('COM_COMPONENTBUILDER_NONE_SELECTED') . "<?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', [?]); ?> " . $edit . ""; break; } } // build the table - $table = '

    '.JText::_('COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS').'

    '; - $table .= ''; - $table .= ''; - $table .= ''.implode("",$layoutString)."
    '.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'
    '.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').''.JText::_('COM_COMPONENTBUILDER_SNIPPET').'
    "; + $table = '

    ' . JText::_('COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS') . '

    '; + $table .= ''; + $table .= ''; + $table .= '' . implode("",$layoutString) . "
    ' . JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE') . '
    ' . JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET') . '' . JText::_('COM_COMPONENTBUILDER_SNIPPET') . '
    "; } return $table; } diff --git a/admin/models/class_extendings.php b/admin/models/class_extendings.php index 68251a878..4beb12da9 100644 --- a/admin/models/class_extendings.php +++ b/admin/models/class_extendings.php @@ -110,7 +110,7 @@ class ComponentbuilderModelClass_extendings extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -323,17 +323,19 @@ class ComponentbuilderModelClass_extendings extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_class_extends')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -348,7 +350,7 @@ class ComponentbuilderModelClass_extendings extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_class_extends'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index 646fc1b6d..6b3e5e79f 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -118,7 +118,7 @@ class ComponentbuilderModelClass_methods extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -502,17 +502,19 @@ class ComponentbuilderModelClass_methods extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_class_method')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -527,7 +529,7 @@ class ComponentbuilderModelClass_methods extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_class_method'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index cebbe41f7..5b1288dd8 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -118,7 +118,7 @@ class ComponentbuilderModelClass_properties extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -498,17 +498,19 @@ class ComponentbuilderModelClass_properties extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_class_property')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -523,7 +525,7 @@ class ComponentbuilderModelClass_properties extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_class_property'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index a765e57eb..4ca14076a 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -37,6 +37,12 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin 'above' => array( 'joomla_component' ) + ), + 'clone' => array( + 'left' => array( + 'note_how_to_clone', + 'clone_me' + ) ) ); @@ -927,6 +933,19 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin $data['metadata'] = (string) $metadata; } + + // check if we have a clone moment + if (isset($data['clone_me']) && $data['clone_me'] > 0) + { + // get the following data from clone_me (component_dashboard) + $keys = array('php_dashboard_methods','dashboard_tab','params'); + foreach ($keys as $key) + { + $data[$key] = ComponentbuilderHelper::getVar('component_dashboard', $data['clone_me'], 'joomla_component', $key); + } + } + + // Set the dashboard_tab items to data. if (isset($data['dashboard_tab']) && is_array($data['dashboard_tab'])) { diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php index aca5ac366..85a385443 100644 --- a/admin/models/component_files_folders.php +++ b/admin/models/component_files_folders.php @@ -39,6 +39,12 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin 'joomla_component' ) ), + 'clone' => array( + 'left' => array( + 'note_how_to_clone', + 'clone_me' + ) + ), 'advance' => array( 'fullwidth' => array( 'note_add_files_fullpath', @@ -872,6 +878,19 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin $data['metadata'] = (string) $metadata; } + + // check if we have a clone moment + if (isset($data['clone_me']) && $data['clone_me'] > 0) + { + // get the following data from clone_me (component_files_folders) + $keys = array('addfiles','addfolders','addfilesfullpath','addfoldersfullpath'); + foreach ($keys as $key) + { + $data[$key] = ComponentbuilderHelper::getVar('component_files_folders', $data['clone_me'], 'joomla_component', $key); + } + } + + // Set the addfoldersfullpath items to data. if (isset($data['addfoldersfullpath']) && is_array($data['addfoldersfullpath'])) { diff --git a/admin/models/component_modules.php b/admin/models/component_modules.php index c8ac01b17..b5d099cbc 100644 --- a/admin/models/component_modules.php +++ b/admin/models/component_modules.php @@ -36,6 +36,12 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin 'above' => array( 'joomla_component' ) + ), + 'clone' => array( + 'left' => array( + 'note_how_to_clone', + 'clone_me' + ) ) ); @@ -805,6 +811,15 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin $data['metadata'] = (string) $metadata; } + + // check if we have a clone moment + if (isset($data['clone_me']) && $data['clone_me'] > 0) + { + // get addjoomla_modules data from clone_me (component_modules) + $data['addjoomla_modules'] = ComponentbuilderHelper::getVar('component_modules', $data['clone_me'], 'joomla_component', 'addjoomla_modules'); + } + + // Set the addjoomla_modules items to data. if (isset($data['addjoomla_modules']) && is_array($data['addjoomla_modules'])) { diff --git a/admin/models/component_placeholders.php b/admin/models/component_placeholders.php index 71c3129e8..d373a4914 100644 --- a/admin/models/component_placeholders.php +++ b/admin/models/component_placeholders.php @@ -35,6 +35,12 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin 'above' => array( 'joomla_component' ) + ), + 'clone' => array( + 'left' => array( + 'note_how_to_clone', + 'clone_me' + ) ) ); @@ -804,6 +810,15 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin $data['metadata'] = (string) $metadata; } + + // check if we have a clone moment + if (isset($data['clone_me']) && $data['clone_me'] > 0) + { + // get addplaceholders data from clone_me (component_placeholders) + $data['addplaceholders'] = ComponentbuilderHelper::getVar('component_placeholders', $data['clone_me'], 'joomla_component', 'addplaceholders'); + } + + // Set the addplaceholders items to data. if (isset($data['addplaceholders']) && is_array($data['addplaceholders'])) { diff --git a/admin/models/component_plugins.php b/admin/models/component_plugins.php index 127ff9c81..47815e893 100644 --- a/admin/models/component_plugins.php +++ b/admin/models/component_plugins.php @@ -36,6 +36,12 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin 'above' => array( 'joomla_component' ) + ), + 'clone' => array( + 'left' => array( + 'note_how_to_clone', + 'clone_me' + ) ) ); @@ -805,6 +811,15 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin $data['metadata'] = (string) $metadata; } + + // check if we have a clone moment + if (isset($data['clone_me']) && $data['clone_me'] > 0) + { + // get addjoomla_plugins data from clone_me (component_plugins) + $data['addjoomla_plugins'] = ComponentbuilderHelper::getVar('component_plugins', $data['clone_me'], 'joomla_component', 'addjoomla_plugins'); + } + + // Set the addjoomla_plugins items to data. if (isset($data['addjoomla_plugins']) && is_array($data['addjoomla_plugins'])) { diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 25f89450e..5d86c665c 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -423,7 +423,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList .append("

    " + issue.title + "

    ") .append("\"@" ") .append("" + issue.user.login + " '.JText::_('COM_COMPONENTBUILDER_OPENED_THIS').' '.JText::_('COM_COMPONENTBUILDER_ISSUE').'-" + issue.number + " (" + timeago + ") ") - .append(marked(issue.body)) + .append(marked.parse(issue.body)) .append("'.JText::_('COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'...
    "); }); }); @@ -436,7 +436,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList .append("

    " + issue.title + "

    ") .append("\"@" ") .append("" + issue.user.login + " '.JText::_('COM_COMPONENTBUILDER_OPENED').' '.JText::_('COM_COMPONENTBUILDER_ISSUE').'-" + issue.number + " (" + timeago + ")") - .append(marked(issue.body)) + .append(marked.parse(issue.body)) .append("'.JText::_('COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB').'...
    "); }); }); @@ -475,7 +475,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList .append(activeNotice) .append("\"@" ") .append("" + tagrelease.author.login + " '.JText::_('COM_COMPONENTBUILDER_RELEASED_THIS').' " + tagrelease.tag_name+ " (" + timeago + ")") - .append(marked(tagrelease.body)) + .append(marked.parse(tagrelease.body)) .append(" " + tagrelease.assets[0].name + " (" + tagrelease.assets[0].download_count + ") ") .append("| '.JText::_('COM_COMPONENTBUILDER_OPEN_ON_GITHUB').'...
    "); }); @@ -503,7 +503,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList jQuery(document).ready(function () { jQuery.get(gewiki) .success(function(wiki) { - jQuery("#wiki-md").html(marked(wiki)); + jQuery("#wiki-md").html(marked.parse(wiki)); }) .error(function(jqXHR, textStatus, errorThrown) { jQuery("#wiki-md").html("'.JText::_('COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER').'"); @@ -527,7 +527,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList jQuery.get(noticeboard) .success(function(board) { if (board.length > 5) { - jQuery("#noticeboard-md").html(marked(board)); + jQuery("#noticeboard-md").html(marked.parse(board)); getIS(1,board).done(function(result) { if (result){ jQuery("#cpanel_tabTabs a").each(function() { @@ -599,7 +599,7 @@ jQuery(document).ready( function($) { jQuery.get(proboard) .success(function(board) { if (board.length > 5) { - jQuery("#proboard-md").html(marked(board)); + jQuery("#proboard-md").html(marked.parse(board)); } else { jQuery("#proboard-md").html("'.JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'"); } diff --git a/admin/models/components_admin_views.php b/admin/models/components_admin_views.php index 555516d82..75ec3e4bf 100644 --- a/admin/models/components_admin_views.php +++ b/admin/models/components_admin_views.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_admin_views extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_admin_views')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_admin_views'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_config.php b/admin/models/components_config.php index 81e03d419..e100e49c2 100644 --- a/admin/models/components_config.php +++ b/admin/models/components_config.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_config extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_config extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_config')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_config extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_config'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_custom_admin_menus.php b/admin/models/components_custom_admin_menus.php index c1ac0ed32..a05d26f6b 100644 --- a/admin/models/components_custom_admin_menus.php +++ b/admin/models/components_custom_admin_menus.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_custom_admin_menus')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_custom_admin_menus'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_custom_admin_views.php b/admin/models/components_custom_admin_views.php index 34617a0b8..38f60715a 100644 --- a/admin/models/components_custom_admin_views.php +++ b/admin/models/components_custom_admin_views.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_custom_admin_views')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_custom_admin_views'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_dashboard.php b/admin/models/components_dashboard.php index a79fa23d6..473551471 100644 --- a/admin/models/components_dashboard.php +++ b/admin/models/components_dashboard.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_dashboard extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_dashboard')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_dashboard'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_files_folders.php b/admin/models/components_files_folders.php index b7cadc84d..bd53f0406 100644 --- a/admin/models/components_files_folders.php +++ b/admin/models/components_files_folders.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_files_folders extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_files_folders')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_files_folders'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_modules.php b/admin/models/components_modules.php index 2112cb012..e035eb096 100644 --- a/admin/models/components_modules.php +++ b/admin/models/components_modules.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_modules extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_modules extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_modules')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_modules extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_modules'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_mysql_tweaks.php b/admin/models/components_mysql_tweaks.php index 55049c4cb..655fa1622 100644 --- a/admin/models/components_mysql_tweaks.php +++ b/admin/models/components_mysql_tweaks.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_mysql_tweaks')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_mysql_tweaks'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_placeholders.php b/admin/models/components_placeholders.php index 969cb62c8..98fdabbf6 100644 --- a/admin/models/components_placeholders.php +++ b/admin/models/components_placeholders.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_placeholders extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_placeholders')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_placeholders'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_plugins.php b/admin/models/components_plugins.php index ca59efe78..3bfafdba9 100644 --- a/admin/models/components_plugins.php +++ b/admin/models/components_plugins.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_plugins extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_plugins')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_plugins'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_site_views.php b/admin/models/components_site_views.php index 98a98b476..27426721d 100644 --- a/admin/models/components_site_views.php +++ b/admin/models/components_site_views.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_site_views extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_site_views')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_site_views'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/components_updates.php b/admin/models/components_updates.php index 4f481267c..caa6a7680 100644 --- a/admin/models/components_updates.php +++ b/admin/models/components_updates.php @@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_updates extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_updates extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_component_updates')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_updates extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_component_updates'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index 34f2a8d0b..b0b77d966 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -187,7 +187,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -672,17 +672,19 @@ class ComponentbuilderModelCustom_admin_views extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_custom_admin_view')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -697,7 +699,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_custom_admin_view'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index 160bb9b85..fbd8a0d5e 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -134,7 +134,7 @@ class ComponentbuilderModelCustom_codes extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -590,17 +590,19 @@ class ComponentbuilderModelCustom_codes extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_custom_code')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -615,7 +617,7 @@ class ComponentbuilderModelCustom_codes extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_custom_code'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index cbbf55d4d..a04f7cb53 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -118,7 +118,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -503,17 +503,19 @@ class ComponentbuilderModelDynamic_gets extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_dynamic_get')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -528,7 +530,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_dynamic_get'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/fields.php b/admin/models/fields.php index 756eb2e9a..dc32a6bbc 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -214,7 +214,7 @@ class ComponentbuilderModelFields extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -858,17 +858,19 @@ class ComponentbuilderModelFields extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_field')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -883,7 +885,7 @@ class ComponentbuilderModelFields extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_field'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index 29e633d43..e6129fb03 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -126,7 +126,7 @@ class ComponentbuilderModelFieldtypes extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items @@ -467,17 +467,19 @@ class ComponentbuilderModelFieldtypes extends JModelList // Get a db connection. $db = JFactory::getDbo(); - // reset query + // Reset query. $query = $db->getQuery(true); $query->select('*'); $query->from($db->quoteName('#__componentbuilder_fieldtype')); - $db->setQuery($query); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date + // Get Yesterdays date. $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -492,7 +494,7 @@ class ComponentbuilderModelFieldtypes extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table + // Check table. $query->update($db->quoteName('#__componentbuilder_fieldtype'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/forms/component_dashboard.xml b/admin/models/forms/component_dashboard.xml index 2ec57e443..78160c848 100644 --- a/admin/models/forms/component_dashboard.xml +++ b/admin/models/forms/component_dashboard.xml @@ -105,19 +105,19 @@ readonly="true" button="false" /> - + + + + +
    diff --git a/admin/models/forms/component_files_folders.xml b/admin/models/forms/component_files_folders.xml index 2bbe8c6b3..d12e64442 100644 --- a/admin/models/forms/component_files_folders.xml +++ b/admin/models/forms/component_files_folders.xml @@ -105,6 +105,19 @@ readonly="true" button="false" /> + + + + diff --git a/admin/models/forms/component_modules.xml b/admin/models/forms/component_modules.xml index 80f15ca94..1ba103160 100644 --- a/admin/models/forms/component_modules.xml +++ b/admin/models/forms/component_modules.xml @@ -105,6 +105,19 @@ readonly="true" button="false" /> + + + + + + + + + + + + + + + + + + + +