From 73190453dae6f66f2822d3807a24c537afd5c1e5 Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 22 Dec 2008 07:36:34 +0000 Subject: [PATCH 01/82] keyword_link.addon bug fix git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5154 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/keyword_link/keyword_link.addon.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/keyword_link/keyword_link.addon.php b/addons/keyword_link/keyword_link.addon.php index 8e5c7aac4..886ab4219 100644 --- a/addons/keyword_link/keyword_link.addon.php +++ b/addons/keyword_link/keyword_link.addon.php @@ -8,21 +8,23 @@ **/ if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC" && Context::getResponseMethod()!="JSON" ) { $json = array(); + $arg = array(); for($i=1;$i<=5;$i++){ + $arg = array(); $ii = sprintf("%02d",$i); $keyword = $addon_info->{"keyword".$ii}; $url = $addon_info->{"url".$ii}; if($keyword && $url){ - $arg->url = $url; + $arg['url'] = $url; $keyword = explode(",",$keyword); for($j=0,$c=count($keyword);$j<$c;$j++){ if(trim($keyword[$j]) == "") continue; - $arg->keyword = trim($keyword[$j]); + $arg['keyword'] = trim($keyword[$j]); $json[] = $arg; } } } - +debugPrint($json); if(count($json) > 0){ $addon_keyword_link = json_encode2($json); Context::addHtmlHeader(""); From 524d0dcbbbb3049cb3a622eaafd942e1ef82aba2 Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 22 Dec 2008 07:37:10 +0000 Subject: [PATCH 02/82] keyword_link.addon bug fix git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5155 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/keyword_link/keyword_link.addon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/keyword_link/keyword_link.addon.php b/addons/keyword_link/keyword_link.addon.php index 886ab4219..8be78f139 100644 --- a/addons/keyword_link/keyword_link.addon.php +++ b/addons/keyword_link/keyword_link.addon.php @@ -24,7 +24,7 @@ } } } -debugPrint($json); + if(count($json) > 0){ $addon_keyword_link = json_encode2($json); Context::addHtmlHeader(""); From 7e7f52713e70ceeb02bd5a09abaeff3f37a0ab0b Mon Sep 17 00:00:00 2001 From: haneul Date: Mon, 22 Dec 2008 16:48:01 +0000 Subject: [PATCH 03/82] #17492798 : displaying timeline even if changeset is empty. (or without svn) git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5156 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/issuetracker.model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/issuetracker/issuetracker.model.php b/modules/issuetracker/issuetracker.model.php index 0139f803f..36913a7c0 100644 --- a/modules/issuetracker/issuetracker.model.php +++ b/modules/issuetracker/issuetracker.model.php @@ -379,7 +379,7 @@ $args->startdate = date("Ymd", ztime($enddate)-24*60*60*$limit); $args->module_srl = $module_srl; $output = executeQueryArray("issuetracker.getChangesets", $args); - if(!$output->toBool() || !$output->data) + if(!$output->toBool()) { debugPrint($output); return array(); From 49cb4395d466388fd46678118ee757fec6d7448e Mon Sep 17 00:00:00 2001 From: haneul Date: Mon, 22 Dec 2008 18:06:42 +0000 Subject: [PATCH 04/82] 17569286 : displaying new issues in timeline git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5157 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/issuetracker.model.php | 16 +++++++++++++++- modules/issuetracker/lang/en.lang.php | 5 +++++ modules/issuetracker/lang/ko.lang.php | 4 ++++ .../skins/xe_issuetracker/timeline.html | 6 +++--- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/modules/issuetracker/issuetracker.model.php b/modules/issuetracker/issuetracker.model.php index 36913a7c0..5b9e0161d 100644 --- a/modules/issuetracker/issuetracker.model.php +++ b/modules/issuetracker/issuetracker.model.php @@ -407,13 +407,27 @@ } $obj = null; $obj->date = $history->regdate; - $obj->type = "i"; + $obj->type = "changed"; $obj->message = $res; $obj->target_srl = $history->target_srl; $obj->author = $history->nick_name; $output->data[] = $obj; } } + + $output2 = executeQueryArray("issuetracker.getDocumentListForChangeset", $args); + if(count($output2->data)) { + foreach($output2->data as $history) + { + $obj = null; + $obj->date = $history->regdate; + $obj->type = "created"; + $obj->author = $history->nick_name; + $obj->target_srl = $history->document_srl; + $output->data[] = $obj; + } + } + usort($output->data, _compare); return $output->data; diff --git a/modules/issuetracker/lang/en.lang.php b/modules/issuetracker/lang/en.lang.php index 4ab07c8d3..c2bf85fac 100644 --- a/modules/issuetracker/lang/en.lang.php +++ b/modules/issuetracker/lang/en.lang.php @@ -77,6 +77,7 @@ 'dispIssuetrackerViewIssue' => 'View Issue', 'dispIssuetrackerNewIssue' => 'New Issue', 'dispIssuetrackerViewMilestone' => 'Milestone', + 'dispIssuetrackerTimeline' => 'Timeline', 'dispIssuetrackerViewSource' => 'View Source', 'dispIssuetrackerDownload' => 'Download', 'dispIssuetrackerAdminProjectSetting' => 'Settings', @@ -89,4 +90,8 @@ $lang->cmd_document_do = 'You would...'; $lang->not_assigned = 'Unassigned'; $lang->not_assigned_description = 'List of unassigned issues.'; + $lang->timeline_msg = array( + 'changed' => 'changed', + 'created' => 'created' + ); ?> diff --git a/modules/issuetracker/lang/ko.lang.php b/modules/issuetracker/lang/ko.lang.php index 5b6fb0eef..bc2f6d016 100644 --- a/modules/issuetracker/lang/ko.lang.php +++ b/modules/issuetracker/lang/ko.lang.php @@ -90,4 +90,8 @@ $lang->cmd_document_do = '이 문제를.. '; $lang->not_assigned = '할당 안됨'; $lang->not_assigned_description = '할당 안된 문제들의 목록입니다.'; + $lang->timeline_msg = array( + 'changed' => '변경', + 'created' => '생성' + ); ?> diff --git a/modules/issuetracker/skins/xe_issuetracker/timeline.html b/modules/issuetracker/skins/xe_issuetracker/timeline.html index 5911bf58c..753a81fe2 100644 --- a/modules/issuetracker/skins/xe_issuetracker/timeline.html +++ b/modules/issuetracker/skins/xe_issuetracker/timeline.html @@ -13,14 +13,14 @@
{zdate($changeset->date,"H:i")} - + {@ $oIssue = $issues[$changeset->target_srl]; } - Issue #{$changeset->target_srl} ({htmlspecialchars($issues[$changeset->target_srl]->getTitleText(30))}) by {$changeset->author} + Issue #{$changeset->target_srl} ({htmlspecialchars($issues[$changeset->target_srl]->getTitleText(30))}) {$lang->timeline_msg[$changeset->type]} by {$changeset->author} Changeset [{$changeset->revision}] by {$changeset->author}
-

{$changeset->message}
{$issues[$changeset->target_srl]->getContentText(80)}{$changeset->message}

+

{$changeset->message}
{$issues[$changeset->target_srl]->getContentText(80)}{$changeset->message}

From 5cee5bb18837ffcd9b21273ba5afedfaecd17554 Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 23 Dec 2008 00:24:20 +0000 Subject: [PATCH 05/82] =?UTF-8?q?planet=20=EC=9D=B4=EC=A0=84/=20=EB=8B=A4?= =?UTF-8?q?=EC=9D=8C=20=EC=9D=BC=EC=9E=90=20=EA=B5=AC=ED=95=A0=EB=95=8C=20?= =?UTF-8?q?=EB=8B=A4=EB=A5=B8=20=EB=AA=A8=EB=93=88=EC=9D=98=20=EA=B8=80?= =?UTF-8?q?=EC=9D=B4=20=EC=82=AC=EC=9A=A9=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=BF=BC=EB=A6=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5158 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/queries/getNextDate.xml | 3 ++- modules/planet/queries/getPrevDate.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/planet/queries/getNextDate.xml b/modules/planet/queries/getNextDate.xml index ea9b89b68..4bbb5cad5 100644 --- a/modules/planet/queries/getNextDate.xml +++ b/modules/planet/queries/getNextDate.xml @@ -6,7 +6,8 @@ - + + diff --git a/modules/planet/queries/getPrevDate.xml b/modules/planet/queries/getPrevDate.xml index 39ad4dcff..fe8bc5d6a 100644 --- a/modules/planet/queries/getPrevDate.xml +++ b/modules/planet/queries/getPrevDate.xml @@ -6,7 +6,8 @@ - + + From 6f75713d1f3f12247dca6c4e03aa6221c82037ec Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 23 Dec 2008 00:26:48 +0000 Subject: [PATCH 06/82] =?UTF-8?q?planet=20=EC=9D=B4=EC=A0=84/=20=EB=8B=A4?= =?UTF-8?q?=EC=9D=8C=20=EC=9D=BC=EC=9E=90=20=EA=B5=AC=ED=95=A0=EB=95=8C=20?= =?UTF-8?q?=EB=8B=A4=EB=A5=B8=20=EB=AA=A8=EB=93=88=EC=9D=98=20=EA=B8=80?= =?UTF-8?q?=EC=9D=B4=20=EC=82=AC=EC=9A=A9=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD=ED=95=9C=20=EC=BF=BC?= =?UTF-8?q?=EB=A6=AC=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5159 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/queries/getNextDate.xml | 12 +++++++----- modules/planet/queries/getPrevDate.xml | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/modules/planet/queries/getNextDate.xml b/modules/planet/queries/getNextDate.xml index 4bbb5cad5..ea95fa355 100644 --- a/modules/planet/queries/getNextDate.xml +++ b/modules/planet/queries/getNextDate.xml @@ -1,13 +1,15 @@ - +
+
- + - - - + + + + diff --git a/modules/planet/queries/getPrevDate.xml b/modules/planet/queries/getPrevDate.xml index fe8bc5d6a..b676452eb 100644 --- a/modules/planet/queries/getPrevDate.xml +++ b/modules/planet/queries/getPrevDate.xml @@ -1,13 +1,15 @@ -
+
+
- + - - - + + + + From f997976c8a74f0b3fde87a1eb343478a6485afba Mon Sep 17 00:00:00 2001 From: haneul Date: Tue, 23 Dec 2008 01:31:27 +0000 Subject: [PATCH 07/82] added missed file git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5160 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../queries/getDocumentListForChangeset.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/issuetracker/queries/getDocumentListForChangeset.xml diff --git a/modules/issuetracker/queries/getDocumentListForChangeset.xml b/modules/issuetracker/queries/getDocumentListForChangeset.xml new file mode 100644 index 000000000..a43c3efa3 --- /dev/null +++ b/modules/issuetracker/queries/getDocumentListForChangeset.xml @@ -0,0 +1,17 @@ + + +
+ + + + + + + + + + + + + + From 313f109c9ca1e6ec75dd47060a5814806d55e5b9 Mon Sep 17 00:00:00 2001 From: ngleader Date: Tue, 23 Dec 2008 01:46:04 +0000 Subject: [PATCH 08/82] =?UTF-8?q?=ED=82=A4=EC=9B=8C=EB=93=9C=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EC=95=A0=EB=93=9C=EC=98=A8=20cssquery=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5161 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/keyword_link/keyword_link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/keyword_link/keyword_link.js b/addons/keyword_link/keyword_link.js index f788ae825..ba111e215 100644 --- a/addons/keyword_link/keyword_link.js +++ b/addons/keyword_link/keyword_link.js @@ -1,7 +1,7 @@ (function($){ $(function(){ if(addon_keyword_link.length > 0){ - if(!addon_keyword_link_cssquery) addon_keyword_link_cssquery= 'div.contentBody > div, div.replyContent > div'; + if(!addon_keyword_link_cssquery) addon_keyword_link_cssquery= '.xe_content'; $(addon_keyword_link_cssquery).each(function(){ var content = $(this).html(); for(var i=0,c=addon_keyword_link.length;i Date: Tue, 23 Dec 2008 01:46:38 +0000 Subject: [PATCH 09/82] =?UTF-8?q?jquery=20=20packed=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B0=94=EA=BF=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5162 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/jquery.js | 3561 +------------------------------------------ 1 file changed, 22 insertions(+), 3539 deletions(-) diff --git a/common/js/jquery.js b/common/js/jquery.js index 88e661eec..82b98e1d7 100644 --- a/common/js/jquery.js +++ b/common/js/jquery.js @@ -1,4 +1,3 @@ -(function(){ /* * jQuery 1.2.6 - New Wave Javascript * @@ -9,3541 +8,25 @@ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ * $Rev: 5685 $ */ - -// Map over jQuery in case of overwrite -var _jQuery = window.jQuery, -// Map over the $ in case of overwrite - _$ = window.$; - -var jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); -}; - -// A simple way to check for HTML strings or ID strings -// (both of which we optimize for) -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, - -// Is it a simple selector - isSimple = /^.[^:#\[\.]*$/, - -// Will speed up references to undefined, and allows munging its name. - undefined; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - return this; - } - // Handle HTML strings - if ( typeof selector == "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Make sure an element was located - if ( elem ){ - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - return jQuery( elem ); - } - selector = []; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); - - return this.setArray(jQuery.makeArray(selector)); - }, - - // The current version of jQuery being used - jquery: "1.2.6", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // The number of elements contained in the matched element set - length: 0, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == undefined ? - - // Return a 'clean' array - jQuery.makeArray( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - var ret = -1; - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( name.constructor == String ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text != "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) - // The elements to wrap the target around - jQuery( html, this[0].ownerDocument ) - .clone() - .insertBefore( this[0] ) - .map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }) - .append(this); - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, false, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, true, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - find: function( selector ) { - var elems = jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - }); - - return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? - jQuery.unique( elems ) : - elems ); - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var clone = this.cloneNode(true), - container = document.createElement("div"); - container.appendChild(clone); - return jQuery.clean([container.innerHTML])[0]; - } else - return this.cloneNode(true); - }); - - // Need to set the expando to null on the cloned set if it exists - // removeData doesn't work here, IE removes it from the original as well - // this is primarily for IE but the data expando shouldn't be copied over in any browser - var clone = ret.find("*").andSelf().each(function(){ - if ( this[ expando ] != undefined ) - this[ expando ] = null; - }); - - // Copy the events from the original to the clone - if ( events === true ) - this.find("*").andSelf().each(function(i){ - if (this.nodeType == 3) - return; - var events = jQuery.data( this, "events" ); - - for ( var type in events ) - for ( var handler in events[ type ] ) - jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); - }); - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, this ) ); - }, - - not: function( selector ) { - if ( selector.constructor == String ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ) ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector == 'string' ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return this.is( "." + selector ); - }, - - val: function( value ) { - if ( value == undefined ) { - - if ( this.length ) { - var elem = this[0]; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - - // Everything else, we just grab the value - } else - return (this[0].value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if( value.constructor == Number ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value == undefined ? - (this[0] ? - this[0].innerHTML : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - data: function( key, value ){ - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - if ( data === undefined && this.length ) - data = jQuery.data( this[0], key ); - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } else - return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ - jQuery.data( this, key, value ); - }); - }, - - removeData: function( key ){ - return this.each(function(){ - jQuery.removeData( this, key ); - }); - }, - - domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; - - return this.each(function(){ - if ( !elems ) { - elems = jQuery.clean( args, this.ownerDocument ); - - if ( reverse ) - elems.reverse(); - } - - var obj = this; - - if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) - obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); - - var scripts = jQuery( [] ); - - jQuery.each(elems, function(){ - var elem = clone ? - jQuery( this ).clone( true )[0] : - this; - - // execute all scripts after the elements have been injected - if ( jQuery.nodeName( elem, "script" ) ) - scripts = scripts.add( elem ); - else { - // Remove any inner scripts for later evaluation - if ( elem.nodeType == 1 ) - scripts = scripts.add( jQuery( "script", elem ).remove() ); - - // Inject the elements into the document - callback.call( obj, elem ); - } - }); - - scripts.each( evalScript ); - }); - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( target.constructor == Boolean ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target != "object" && typeof target != "function" ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy == "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -var expando = "jQuery" + now(), uuid = 0, windowData = {}, - // exclude the following css properties to add px - exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning this function. - isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && - fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.documentElement && !elem.body || - elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - data = jQuery.trim( data ); - - if ( data ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.browser.msie ) - script.text = data; - else - script.appendChild( document.createTextNode( data ) ); - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - cache: {}, - - data: function( elem, name, data ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // Compute a unique ID for the element - if ( !id ) - id = elem[ expando ] = ++uuid; - - // Only generate the data cache if we're - // trying to access or manipulate it - if ( name && !jQuery.cache[ id ] ) - jQuery.cache[ id ] = {}; - - // Prevent overriding the named cache with undefined values - if ( data !== undefined ) - jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element - return name ? - jQuery.cache[ id ][ name ] : - id; - }, - - removeData: function( elem, name ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // If we want to remove a specific section of the element's data - if ( name ) { - if ( jQuery.cache[ id ] ) { - // Remove the section of cache data - delete jQuery.cache[ id ][ name ]; - - // If we've removed all the data, remove the element's cache - name = ""; - - for ( name in jQuery.cache[ id ] ) - break; - - if ( !name ) - jQuery.removeData( elem ); - } - - // Otherwise, we want to remove all of the element's data - } else { - // Clean up the element expando - try { - delete elem[ expando ]; - } catch(e){ - // IE has trouble directly removing the expando - // but it's ok with using removeAttribute - if ( elem.removeAttribute ) - elem.removeAttribute( expando ); - } - - // Completely remove the data cache - delete jQuery.cache[ id ]; - } - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length == undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length == undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames != undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - var padding = 0, border = 0; - jQuery.each( which, function() { - padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - val -= Math.round(padding + border); - } - - if ( jQuery(elem).is(":visible") ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, val); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // A helper method for determining if an element's values are broken - function color( elem ) { - if ( !jQuery.browser.safari ) - return false; - - // defaultView is cached - var ret = defaultView.getComputedStyle( elem, null ); - return !ret || ret.getPropertyValue("color") == ""; - } - - // We need to handle opacity special in IE - if ( name == "opacity" && jQuery.browser.msie ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - // Opera sometimes will give the wrong display answer, this fixes it, see #2037 - if ( jQuery.browser.opera && name == "display" ) { - var save = style.outline; - style.outline = "0 solid black"; - style.outline = save; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle && !color( elem ) ) - ret = computedStyle.getPropertyValue( name ); - - // If the element isn't reporting its values properly in Safari - // then some display: none elements are involved - else { - var swap = [], stack = [], a = elem, i = 0; - - // Locate all of the parent display: none elements - for ( ; a && color(a); a = a.parentNode ) - stack.unshift(a); - - // Go through and make them visible, but in reverse - // (It would be better if we knew the exact display type that they had) - for ( ; i < stack.length; i++ ) - if ( color( stack[ i ] ) ) { - swap[ i ] = stack[ i ].style.display; - stack[ i ].style.display = "block"; - } - - // Since we flip the display style, we have to handle that - // one special, otherwise get the value - ret = name == "display" && swap[ stack.length - 1 ] != null ? - "none" : - ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; - - // Finally, revert the display styles back - for ( i = 0; i < swap.length; i++ ) - if ( swap[ i ] != null ) - stack[ i ].style.display = swap[ i ]; - } - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context ) { - var ret = []; - context = context || document; - // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - jQuery.each(elems, function(i, elem){ - if ( !elem ) - return; - - if ( elem.constructor == Number ) - elem += ''; - - // Convert html string into DOM nodes - if ( typeof elem == "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "
", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and diff --git a/modules/board/tpl/js/board_admin.js b/modules/board/tpl/js/board_admin.js index 80e45da0c..0f38ecb1f 100644 --- a/modules/board/tpl/js/board_admin.js +++ b/modules/board/tpl/js/board_admin.js @@ -5,191 +5,6 @@ **/ -function Tree(url){ - // clear tree; - jQuery('#menu > ul > li > ul').remove(); - if(jQuery("ul.simpleTree > li > a").size() ==0)jQuery('').bind("click",function(e){addNode(0,e);}).appendTo("ul.simpleTree > li"); - - //ajax get data and transeform ul il - jQuery.get(url,function(data){ - jQuery(data).find("node").each(function(i){ - var text = jQuery(this).attr("text"); - var node_srl = jQuery(this).attr("node_srl"); - var parent_srl = jQuery(this).attr("parent_srl"); - var color = jQuery(this).attr("color"); - var url = jQuery(this).attr("url"); - - // node - - var node = ''; - if(color){ - node = jQuery('
  • '+text+'
  • '); - }else{ - node = jQuery('
  • '+text+'
  • '); - } - - - - // button - jQuery('').bind("click",function(e){ - jQuery("#tree_"+node_srl+" > span").click(); - addNode(node_srl,e); - return false; - }).appendTo(node); - - jQuery('').bind("click",function(e){ - jQuery("#tree_"+node_srl+" > span").click(); - modifyNode(node_srl,e); - return false; - }).appendTo(node); - - jQuery('').bind("click",function(e){ - deleteNode(node_srl); - return false; - }).appendTo(node); - - // insert parent child - if(parent_srl>0){ - if(jQuery('#tree_'+parent_srl+'>ul').length==0) jQuery('#tree_'+parent_srl).append(jQuery('
      ')); - jQuery('#tree_'+parent_srl+'> ul').append(node); - }else{ - if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("
        ").appendTo('#menu ul.simpleTree > li'); - jQuery('#menu ul.simpleTree > li > ul').append(node); - } - - }); - - //button show hide - jQuery("#menu li").each(function(){ - if(jQuery(this).parents('ul').size() > max_menu_depth) jQuery("a.add",this).hide(); - if(jQuery(">ul",this).size()>0) jQuery(">a.delete",this).hide(); - }); - - - // draw tree - simpleTreeCollection = jQuery('.simpleTree').simpleTree({ - autoclose: false, - afterClick:function(node){ - jQuery('#category_info').html(""); - //alert("text-"+jQuery('span:first',node).text()); - }, - afterDblClick:function(node){ - //alert("text-"+jQuery('span:first',node).text()); - }, - afterMove:function(destination, source, pos){ - if(destination.size() == 0){ - Tree(xml_url); - return; - } - var module_srl = jQuery("#fo_category input[name=module_srl]").val(); - var parent_srl = destination.attr('id').replace(/.*_/g,''); - var source_srl = source.attr('id').replace(/.*_/g,''); - - var target = source.prevAll("li:not([class^=line])"); - var target_srl = 0; - if(target.length >0){ - target_srl = source.prevAll("li:not([class^=line])").get(0).id.replace(/.*_/g,''); - parent_srl = 0; - } - - jQuery.exec_json("board.procBoardAdminMoveCategory",{ "module_srl":module_srl,"parent_srl":parent_srl,"target_srl":target_srl,"source_srl":source_srl}, - function(data){ - jQuery('#category_info').html(''); - if(data.error > 0) Tree(xml_url); - }); - - }, - - // i want you !! made by sol - beforeMovedToLine : function(destination, source, pos){ - return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth); - }, - - // i want you !! made by sol - beforeMovedToFolder : function(destination, source, pos){ - return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth-1); - }, - afterAjax:function() - { - //alert('Loaded'); - }, - animate:true - ,docToFolderConvert:true - }); - - - - // open all node - nodeToggleAll(); - },"xml"); -} -function addNode(node,e){ - var params ={ - "category_srl":0 - ,"parent_srl":node - ,"module_srl":jQuery("#fo_category [name=module_srl]").val() - }; - - jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ - jQuery('#category_info').html(data.tpl); - }); -} - -function modifyNode(node,e){ - var params ={ - "category_srl":node - ,"parent_srl":0 - ,"module_srl":jQuery("#fo_category [name=module_srl]").val() - }; - - jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ - jQuery('#category_info').html(data.tpl); - }); -} - - -function nodeToggleAll(){ - jQuery("[class*=close]", simpleTreeCollection[0]).each(function(){ - simpleTreeCollection[0].nodeToggle(this); - }); -} - -function deleteNode(node){ - if(confirm(lang_confirm_delete)){ - jQuery('#category_info').html(""); - var params ={ - "category_srl":node - ,"parent_srl":0 - ,"module_srl":jQuery("#fo_category [name=module_srl]").val() - }; - - jQuery.exec_json('board.procBoardAdminDeleteCategory', params, function(data){ - if(data.error==0) Tree(xml_url); - }); - } -} - -/* 카테고리 아이템 입력후 */ -function completeInsertCategory(ret_obj) { - jQuery('#category_info').html(""); - Tree(xml_url); -} - -function hideCategoryInfo() { - jQuery('#category_info').html(""); -} - - - - - - - - - - - - /* 모듈 생성 후 */ function completeInsertBoard(ret_obj) { var error = ret_obj['error']; @@ -278,103 +93,4 @@ function doCartSetup(act_type) { var url = current_url.setQuery('act',act_type).setQuery('module_srl','').setQuery('module_srls',module_srl.join(',')); location.href = url; -} - -/** - * 카테고리 관리 - **/ - - - - - -/* 서버로부터 받아온 카테고리 정보를 출력 */ -xAddEventListener(document,'mousedown',checkMousePosition); -var _xPos = 0; -var _yPos = 0; -function checkMousePosition(e) { - var evt = new xEvent(e); - _xPos = evt.pageX; - _yPos = evt.pageY; -} - - - -function completeGetCategoryTplInfo(ret_obj, response_tags) { - var obj = xGetElementById('category_info'); - if(xScrollTop()>200) { - obj.style.marginTop = ( xScrollTop() - 210 )+'px'; - } else { - obj.style.marginTop = '0px'; - } - - var tpl = ret_obj['tpl']; - xInnerHtml(obj, tpl); - obj.style.display = 'block'; - - var fo_obj = xGetElementById("fo_category"); - fo_obj.category_title.focus(); -} - - - - -/* 카테고리를 드래그하여 이동한 후 실행할 함수 , 이동하는 category_srl과 대상 category_srl을 받음 */ -function doMoveTree(category_id, source_category_srl, target_category_srl) { - source_category_srl = source_category_srl.replace(/menu_category_/,''); - target_category_srl = target_category_srl.replace(/menu_category_/,''); - var p_fo_obj = xGetElementById("fo_category"); - - var fo_obj = xGetElementById("fo_move_category"); - fo_obj.source_category_srl.value = source_category_srl; - fo_obj.target_category_srl.value = target_category_srl; - fo_obj.module_srl.value = p_fo_obj.module_srl.value; - - // 이동 취소를 선택하였을 경우 다시 그림;; - if(!procFilter(fo_obj, move_category)) { - var params = new Array(); - params["xml_file"] = xGetElementById('fo_category').xml_file.value; - params["source_category_srl"] = source_category_srl; - completeMoveCategory(params); - } -} - -function completeMoveCategory(ret_obj) { - var source_category_srl = ret_obj['source_category_srl']; - var xml_file = ret_obj['xml_file']; - - loadTreeMenu(xml_file, 'category', "zone_category", category_title, '', doGetCategoryInfo, source_category_srl, doMoveTree); -} - -/* 카테고리 목록 갱신 */ -function doReloadTreeCategory(module_srl) { - var params = new Array(); - params["module_srl"] = module_srl; - - // 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다. - var response_tags = new Array('error','message', 'xml_file'); - exec_xml('board', 'procBoardAdminMakeXmlFile', params, completeInsertCategory, response_tags, params); -} - -/* 카테고리 삭제 */ -function doDeleteCategory(category_srl) { - var fo_obj = xGetElementById("fo_category"); - if(!fo_obj) return; - - procFilter(fo_obj, delete_category); -} - -/* 카테고리 아이템 삭제 후 */ -function completeDeleteCategory(ret_obj) { - var module_srl = ret_obj['module_srl']; - var category_srl = ret_obj['category_srl']; - var xml_file = ret_obj['xml_file']; - alert(ret_obj['message']); - - loadTreeMenu(xml_file, 'category', 'zone_category', category_title, '', doGetCategoryInfo, category_srl, doMoveTree); - - var obj = xGetElementById('category_info'); - xInnerHtml(obj, ""); - obj.style.display = 'none'; -} - +} \ No newline at end of file diff --git a/modules/board/tpl/js/board_category.js b/modules/board/tpl/js/board_category.js new file mode 100644 index 000000000..06e601f6d --- /dev/null +++ b/modules/board/tpl/js/board_category.js @@ -0,0 +1,186 @@ +/** + * @file modules/board/tpl/js/board_category.js + * @author sol (sol@ngleader.com) + * @brief board 모듈의 category tree javascript + **/ + +function Tree(url){ + // clear tree; + jQuery('#menu > ul > li > ul').remove(); + if(jQuery("ul.simpleTree > li > a").size() ==0)jQuery('').bind("click",function(e){addNode(0,e);}).appendTo("ul.simpleTree > li"); + + //ajax get data and transeform ul il + jQuery.get(url,function(data){ + jQuery(data).find("node").each(function(i){ + var text = jQuery(this).attr("text"); + var node_srl = jQuery(this).attr("node_srl"); + var parent_srl = jQuery(this).attr("parent_srl"); + var color = jQuery(this).attr("color"); + var url = jQuery(this).attr("url"); + + // node + var node = ''; + if(color){ + node = jQuery('
      • '+text+'
      • '); + }else{ + node = jQuery('
      • '+text+'
      • '); + } + + // button + jQuery('').bind("click",function(e){ + jQuery("#tree_"+node_srl+" > span").click(); + addNode(node_srl,e); + return false; + }).appendTo(node); + + jQuery('').bind("click",function(e){ + jQuery("#tree_"+node_srl+" > span").click(); + modifyNode(node_srl,e); + return false; + }).appendTo(node); + + jQuery('').bind("click",function(e){ + deleteNode(node_srl); + return false; + }).appendTo(node); + + // insert parent child + if(parent_srl>0){ + if(jQuery('#tree_'+parent_srl+'>ul').length==0) jQuery('#tree_'+parent_srl).append(jQuery('
          ')); + jQuery('#tree_'+parent_srl+'> ul').append(node); + }else{ + if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("
            ").appendTo('#menu ul.simpleTree > li'); + jQuery('#menu ul.simpleTree > li > ul').append(node); + } + + }); + + //button show hide + jQuery("#menu li").each(function(){ + if(jQuery(this).parents('ul').size() > max_menu_depth) jQuery("a.add",this).hide(); + if(jQuery(">ul",this).size()>0) jQuery(">a.delete",this).hide(); + }); + + + // draw tree + simpleTreeCollection = jQuery('.simpleTree').simpleTree({ + autoclose: false, + afterClick:function(node){ + jQuery('#category_info').html(""); + //alert("text-"+jQuery('span:first',node).text()); + }, + afterDblClick:function(node){ + //alert("text-"+jQuery('span:first',node).text()); + }, + afterMove:function(destination, source, pos){ + if(destination.size() == 0){ + Tree(xml_url); + return; + } + var module_srl = jQuery("#fo_category input[name=module_srl]").val(); + var parent_srl = destination.attr('id').replace(/.*_/g,''); + var source_srl = source.attr('id').replace(/.*_/g,''); + + var target = source.prevAll("li:not([class^=line])"); + var target_srl = 0; + if(target.length >0){ + target_srl = source.prevAll("li:not([class^=line])").get(0).id.replace(/.*_/g,''); + parent_srl = 0; + } + + jQuery.exec_json("board.procBoardAdminMoveCategory",{ "module_srl":module_srl,"parent_srl":parent_srl,"target_srl":target_srl,"source_srl":source_srl}, + function(data){ + jQuery('#category_info').html(''); + if(data.error > 0) Tree(xml_url); + }); + + }, + + // i want you !! made by sol + beforeMovedToLine : function(destination, source, pos){ + return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth); + }, + + // i want you !! made by sol + beforeMovedToFolder : function(destination, source, pos){ + return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth-1); + }, + afterAjax:function() + { + //alert('Loaded'); + }, + animate:true + ,docToFolderConvert:true + }); + + + + // open all node + nodeToggleAll(); + },"xml"); +} +function addNode(node,e){ + var params ={ + "category_srl":0 + ,"parent_srl":node + ,"module_srl":jQuery("#fo_category [name=module_srl]").val() + }; + + jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ + jQuery('#category_info').html(data.tpl); + }); +} + +function modifyNode(node,e){ + var params ={ + "category_srl":node + ,"parent_srl":0 + ,"module_srl":jQuery("#fo_category [name=module_srl]").val() + }; + + jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ + jQuery('#category_info').html(data.tpl); + }); +} + + +function nodeToggleAll(){ + jQuery("[class*=close]", simpleTreeCollection[0]).each(function(){ + simpleTreeCollection[0].nodeToggle(this); + }); +} + +function deleteNode(node){ + if(confirm(lang_confirm_delete)){ + jQuery('#category_info').html(""); + var params ={ + "category_srl":node + ,"parent_srl":0 + ,"module_srl":jQuery("#fo_category [name=module_srl]").val() + }; + + jQuery.exec_json('board.procBoardAdminDeleteCategory', params, function(data){ + if(data.error==0) Tree(xml_url); + }); + } +} + +/* 카테고리 아이템 입력후 */ +function completeInsertCategory(ret_obj) { + jQuery('#category_info').html(""); + Tree(xml_url); +} + +function hideCategoryInfo() { + jQuery('#category_info').html(""); +} + +/* 카테고리 목록 갱신 */ +function doReloadTreeCategory(module_srl) { + var params = new Array(); + params["module_srl"] = module_srl; + + // 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다. + var response_tags = new Array('error','message', 'xml_file'); + exec_xml('board', 'procBoardAdminMakeXmlFile', params, completeInsertCategory, response_tags, params); +} \ No newline at end of file From 75c211f98ee8af7e89b0a93c54d2ab2200348be0 Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 23 Dec 2008 03:24:06 +0000 Subject: [PATCH 11/82] =?UTF-8?q?17523934=20*=20modules/a*=20~=20d*=20x.js?= =?UTF-8?q?=20=EA=B5=90=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5164 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/addon/tpl/addon_info.html | 6 ++-- modules/addon/tpl/addon_list.html | 2 +- modules/addon/tpl/js/addon.js | 10 +------ modules/addon/tpl/setup_addon.html | 4 +-- modules/admin/tpl/config.html | 12 ++++---- modules/admin/tpl/index.html | 22 +++++++------- modules/admin/tpl/js/admin.js | 14 ++++----- modules/board/skins/xe_board/js/board.js | 4 +-- modules/board/skins/xe_default/js/board.js | 4 +-- modules/board/skins/xe_guestbook/js/board.js | 4 +-- modules/board/tpl/category_info.html | 4 +-- modules/board/tpl/index.html | 2 +- modules/board/tpl/js/board_admin.js | 12 +++----- modules/board/tpl/skin_info.html | 10 +++---- modules/comment/tpl/comment_list.html | 2 +- .../comment/tpl/comment_module_config.html | 2 +- modules/comment/tpl/declared_list.html | 2 +- modules/comment/tpl/js/comment_admin.js | 27 ++++------------- .../skins/default/js/communication.js | 29 +++++++------------ modules/communication/tpl/index.html | 6 ++-- .../tpl/js/communication_admin.js | 4 +-- modules/counter/tpl/js/counter_admin.js | 2 +- modules/document/tpl/checked_list.html | 2 +- modules/document/tpl/declared_list.html | 4 +-- modules/document/tpl/document_config.html | 6 ++-- modules/document/tpl/document_list.html | 2 +- modules/document/tpl/js/document_admin.js | 25 ++++------------ modules/document/tpl/print_page.html | 2 +- 28 files changed, 83 insertions(+), 142 deletions(-) diff --git a/modules/addon/tpl/addon_info.html b/modules/addon/tpl/addon_info.html index e07960da2..fd25975a1 100644 --- a/modules/addon/tpl/addon_info.html +++ b/modules/addon/tpl/addon_info.html @@ -5,7 +5,7 @@
            - + @@ -17,7 +17,7 @@ - + @@ -25,7 +25,7 @@ - + - +
            {$lang->title}
            {$addon_info->title} ver. {$addon_info->version}
            {$lang->homepage}
            {$addon_info->homepage}
            {$lang->regdate}
            {zdate($addon_info->date, 'Y-m-d')}
            {$lang->addon_license}
            {nl2br(trim($addon_info->license))} diff --git a/modules/addon/tpl/addon_list.html b/modules/addon/tpl/addon_list.html index 9986bb717..225a8650c 100644 --- a/modules/addon/tpl/addon_list.html +++ b/modules/addon/tpl/addon_list.html @@ -24,7 +24,7 @@
            {$val->title}
            diff --git a/modules/addon/tpl/js/addon.js b/modules/addon/tpl/js/addon.js index 2189cfaff..3ff4dad01 100644 --- a/modules/addon/tpl/js/addon.js +++ b/modules/addon/tpl/js/addon.js @@ -3,15 +3,7 @@ * fo_addon이라는 id를 가지는 form에 인자로 주어진 addon값을 세팅후 실행 **/ function doToggleAddon(addon) { - var fo_obj = xGetElementById('fo_addon'); + var fo_obj = jQuery('#fo_addon').get(0); fo_obj.addon.value = addon; procFilter(fo_obj, toggle_activate_addon); } - -function toggleSectionCheckBox(obj, id) { - var box_list = xGetElementsByTagName('input', xGetElementById(id)); - if(typeof(box_list.length)=='undefined') return; - for(var i in box_list) { - box_list[i].checked = obj.checked; - } -} diff --git a/modules/addon/tpl/setup_addon.html b/modules/addon/tpl/setup_addon.html index 40dffe86f..0fccb37dd 100644 --- a/modules/addon/tpl/setup_addon.html +++ b/modules/addon/tpl/setup_addon.html @@ -11,7 +11,7 @@
            - + @@ -23,7 +23,7 @@ - + diff --git a/modules/admin/tpl/config.html b/modules/admin/tpl/config.html index 81c1b2c8e..754115b74 100644 --- a/modules/admin/tpl/config.html +++ b/modules/admin/tpl/config.html @@ -17,7 +17,7 @@

            {$lang->about_rewrite}

            - + - + - + - + @@ -121,7 +121,7 @@

            {$lang->about_cmd_lang_select}

            - + @@ -136,7 +136,7 @@

            {$lang->about_recompile_cache}

            - + diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index fcbeed1e3..b1ed97bfc 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -9,7 +9,7 @@
            {$addon_info->title} ver. {$addon_info->version} ({zdate($addon_info->date, 'Y-m-d')})
            {$addon_info->homepage} 
            {$lang->use_optimizer}
            checked="checked" /> @@ -35,7 +35,7 @@

            {$lang->about_lang_env}

            {$lang->time_zone}
            {$lang->use_ssl}
            - + @@ -17,7 +17,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -53,7 +53,7 @@ - + - + - + @@ -136,7 +136,7 @@ - + @@ -148,7 +148,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -179,7 +179,7 @@ - + diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index a1353e981..706b0b047 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -4,13 +4,13 @@ * @brief admin 모듈의 javascript **/ -xAddEventListener(document,'click',showXESubMenu); +jQuery(document).click(showXESubMenu); var openedSubMenus = null; + function showXESubMenu(evt) { - var e = new xEvent(evt); - if(e.target && /^adminMainMenu/.test(e.target.id)) { - var key = e.target.id.split('_')[1]; - var obj = xGetElementById('adminSubMenu'+key); + if(evt.target && /^adminMainMenu/.test(evt.target.id)) { + var key = evt.target.id.split('_')[1]; + var obj = jQuery('#adminSubMenu'+key).get(0); if(!obj) return; if(openedSubMenus) openedSubMenus.style.visibility = 'hidden'; if(openedSubMenus == obj) { @@ -31,8 +31,8 @@ function showXESubMenu(evt) { // open/close Main Navigator function toggleXEMainNavigator() { - var obj = xGetElementsByClassName('xeAdmin')[0]; - var btnObj = xGetElementById('btnFolder'); + var obj = jQuery('.xeAdmin').get(0); + var btnObj = jQuery('#btnFolder').get(0); if(!obj) return; if(obj.style.display == 'none') { obj.style.display = 'block'; diff --git a/modules/board/skins/xe_board/js/board.js b/modules/board/skins/xe_board/js/board.js index 0c33797dd..afade30cd 100644 --- a/modules/board/skins/xe_board/js/board.js +++ b/modules/board/skins/xe_board/js/board.js @@ -104,9 +104,7 @@ function completeDeleteTrackback(ret_obj) { /* 카테고리 이동 */ function doChangeCategory() { - var sel_obj = xGetElementById("board_category"); - var sel_idx = sel_obj.selectedIndex; - var category_srl = sel_obj.options[sel_idx].value; + var category_srl = jQuery('#board_category option:selected').val(); location.href = decodeURI(current_url).setQuery('category',category_srl); } diff --git a/modules/board/skins/xe_default/js/board.js b/modules/board/skins/xe_default/js/board.js index 0c33797dd..afade30cd 100644 --- a/modules/board/skins/xe_default/js/board.js +++ b/modules/board/skins/xe_default/js/board.js @@ -104,9 +104,7 @@ function completeDeleteTrackback(ret_obj) { /* 카테고리 이동 */ function doChangeCategory() { - var sel_obj = xGetElementById("board_category"); - var sel_idx = sel_obj.selectedIndex; - var category_srl = sel_obj.options[sel_idx].value; + var category_srl = jQuery('#board_category option:selected').val(); location.href = decodeURI(current_url).setQuery('category',category_srl); } diff --git a/modules/board/skins/xe_guestbook/js/board.js b/modules/board/skins/xe_guestbook/js/board.js index 751fa4948..4cb59078e 100644 --- a/modules/board/skins/xe_guestbook/js/board.js +++ b/modules/board/skins/xe_guestbook/js/board.js @@ -104,9 +104,7 @@ function completeDeleteTrackback(ret_obj) { /* 카테고리 이동 */ function doChangeCategory() { - var sel_obj = xGetElementById("board_category"); - var sel_idx = sel_obj.selectedIndex; - var category_srl = sel_obj.options[sel_idx].value; + var category_srl = jQuery('#board_category option:selected').val(); location.href = decodeURI(current_url).setQuery('category',category_srl); } diff --git a/modules/board/tpl/category_info.html b/modules/board/tpl/category_info.html index 5fc1e4341..e679da5e1 100644 --- a/modules/board/tpl/category_info.html +++ b/modules/board/tpl/category_info.html @@ -3,7 +3,7 @@
            {$lang->env_information}
            {$lang->current_version}
            {$current_version}
            {$lang->current_path}
            {$installed_path}/
            {$lang->time_zone}
            {$val}
            {$lang->use_rewrite}
            {$lang->use}{$lang->notuse}
            {$lang->use_optimizer}
            {$lang->use}{$lang->notuse}
            Language
            {$val}
            {$lang->qmail_compatibility}
            {$lang->use}{$lang->notuse}
            {$val->title} ({$val->module}) {$lang->module_info} @@ -102,7 +102,7 @@
            {$lang->newest_news}
            {$val->title} {zdate($val->date,"Y-m-d")} @@ -124,7 +124,7 @@
            {$lang->member} {number_format($status->member->yesterday)} {number_format($status->member->today)}{number_format($status->document->today)} {number_format($status->document->total)}
            {$lang->comment} {number_format($status->comment->yesterday)} {number_format($status->comment->today)}{number_format($status->trackback->today)} {number_format($status->trackback->total)}
            {$lang->file} {number_format($status->file->yesterday)} {number_format($status->file->today)}{number_format($status->documentDeclared->today)} {number_format($status->documentDeclared->total)}
            {$lang->comment.' '.$lang->cmd_declare} {number_format($status->commentDeclared->yesterday)} {number_format($status->commentDeclared->today)}
            {$val->title}
            - + @@ -32,7 +32,7 @@

            {$lang->about_category_group_srls}

            - + - + - + - + @@ -39,7 +39,7 @@   - + @@ -79,7 +79,7 @@ - +
            {$lang->parent_category_title}
            {$category_info->parent_category_title}
            diff --git a/modules/board/tpl/index.html b/modules/board/tpl/index.html index 6f0323789..810c93f96 100644 --- a/modules/board/tpl/index.html +++ b/modules/board/tpl/index.html @@ -37,7 +37,7 @@
            {$no} diff --git a/modules/board/tpl/js/board_admin.js b/modules/board/tpl/js/board_admin.js index 0f38ecb1f..b3d33fb2f 100644 --- a/modules/board/tpl/js/board_admin.js +++ b/modules/board/tpl/js/board_admin.js @@ -80,15 +80,11 @@ function doChangeCategory(fo_obj) { /* 일괄 설정 */ function doCartSetup(act_type) { - var fo_obj = xGetElementById('fo_list'); var module_srl = new Array(); - if(typeof(fo_obj.cart.length)=='undefined') { - if(fo_obj.cart.checked) module_srl[module_srl.length] = fo_obj.cart.value; - } else { - for(var i=0;i
            {$lang->skin}
            {$skin_info->title}
            {$lang->skin_author}
            @@ -25,7 +25,7 @@
            {$lang->homepage}
            {$skin_info->homepage}
            {$lang->date}
            {zdate($skin_info->date, 'Y-m-d')} 
            {$lang->description}
            {nl2br(trim($skin_info->description))}
            {$group}
            {$val->title}
            @@ -135,7 +135,7 @@ - + diff --git a/modules/comment/tpl/comment_list.html b/modules/comment/tpl/comment_list.html index b2a45f9f5..2245ff497 100644 --- a/modules/comment/tpl/comment_list.html +++ b/modules/comment/tpl/comment_list.html @@ -35,7 +35,7 @@ - + diff --git a/modules/comment/tpl/comment_module_config.html b/modules/comment/tpl/comment_module_config.html index 6db771a78..6b88410e6 100644 --- a/modules/comment/tpl/comment_module_config.html +++ b/modules/comment/tpl/comment_module_config.html @@ -12,7 +12,7 @@

            {$lang->about_comment_count}

            - + diff --git a/modules/comment/tpl/declared_list.html b/modules/comment/tpl/declared_list.html index 1196f17f1..4fc17ae10 100644 --- a/modules/comment/tpl/declared_list.html +++ b/modules/comment/tpl/declared_list.html @@ -24,7 +24,7 @@ - + diff --git a/modules/comment/tpl/js/comment_admin.js b/modules/comment/tpl/js/comment_admin.js index a4093b0fc..57b99158c 100644 --- a/modules/comment/tpl/js/comment_admin.js +++ b/modules/comment/tpl/js/comment_admin.js @@ -1,31 +1,14 @@ -function doCheckAll(bToggle) { - var fo_obj = xGetElementById('fo_list'); - if(typeof(bToggle) == "undefined") bToggle = false; - for(var i=0;i
            {$no} {htmlspecialchars($module_list[$val->module_srl]->browser_title)}  {htmlspecialchars($val->nick_name)}
            {$no} {$oComment->getSummary(100)} {$oComment->getNickName()}
            - + - + @@ -50,5 +50,5 @@ diff --git a/modules/communication/tpl/js/communication_admin.js b/modules/communication/tpl/js/communication_admin.js index 7b888cd66..f98c745ac 100644 --- a/modules/communication/tpl/js/communication_admin.js +++ b/modules/communication/tpl/js/communication_admin.js @@ -9,8 +9,6 @@ function doGetSkinColorset(skin) { function doDisplaySkinColorset(ret_obj) { var tpl = ret_obj["tpl"]; - var old_height = xHeight("communication_colorset"); - xInnerHtml("communication_colorset", tpl); - var new_height = xHeight("communication_colorset"); + jQuery('#communication_colorset').html(tpl); } diff --git a/modules/counter/tpl/js/counter_admin.js b/modules/counter/tpl/js/counter_admin.js index 5ae0adfd1..ee8a5fd8e 100644 --- a/modules/counter/tpl/js/counter_admin.js +++ b/modules/counter/tpl/js/counter_admin.js @@ -1,6 +1,6 @@ // 관리자 페이지에서 날짜 이동 function changeSelectedDate(selected_date) { - var fo_obj = xGetElementById('fo_counter'); + var fo_obj = jQuery('#fo_counter').get(0); fo_obj.selected_date.value = selected_date; fo_obj.submit(); } diff --git a/modules/document/tpl/checked_list.html b/modules/document/tpl/checked_list.html index a851af496..3d3699b4c 100644 --- a/modules/document/tpl/checked_list.html +++ b/modules/document/tpl/checked_list.html @@ -74,7 +74,7 @@ diff --git a/modules/document/tpl/declared_list.html b/modules/document/tpl/declared_list.html index a932424f6..cb2518f01 100644 --- a/modules/document/tpl/declared_list.html +++ b/modules/document/tpl/declared_list.html @@ -27,7 +27,7 @@ - + - + - + diff --git a/modules/document/tpl/js/document_admin.js b/modules/document/tpl/js/document_admin.js index 55006658e..442f0a5ce 100644 --- a/modules/document/tpl/js/document_admin.js +++ b/modules/document/tpl/js/document_admin.js @@ -1,12 +1,3 @@ -function doCheckAll(bToggle) { - var fo_obj = xGetElementById('fo_list'); - if(typeof(bToggle) == "undefined") bToggle = false; - for(var i=0;i \ No newline at end of file From f78806405059646463660f586b2f1680dec11f7e Mon Sep 17 00:00:00 2001 From: haneul Date: Tue, 23 Dec 2008 06:30:56 +0000 Subject: [PATCH 12/82] #17569922 : added link to issue and changeset git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5165 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/classes/svn.class.php | 4 ++-- .../issuetracker/issuetracker.controller.php | 2 +- modules/issuetracker/issuetracker.model.php | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/modules/issuetracker/classes/svn.class.php b/modules/issuetracker/classes/svn.class.php index adba14c52..f4466d962 100644 --- a/modules/issuetracker/classes/svn.class.php +++ b/modules/issuetracker/classes/svn.class.php @@ -245,7 +245,7 @@ return $output; } - function getLog($path, $erev=null, $brev=null, $quiet = false, $limit = 2) { + function getLog($path, $erev=null, $brev=null, $quiet = false, $limit = 2, $link = true) { if(strpos($path,'..')!==false) return; $command = sprintf( @@ -287,7 +287,7 @@ $obj->paths[] = $tmp_obj; } - $obj->msg = $this->linkXE($tmp->msg->body); + $obj->msg = $link?$this->linkXE($tmp->msg->body):$tmp->msg->body; $output[] = $obj; } return $output; diff --git a/modules/issuetracker/issuetracker.controller.php b/modules/issuetracker/issuetracker.controller.php index c2e083ba0..a4e77cb0a 100644 --- a/modules/issuetracker/issuetracker.controller.php +++ b/modules/issuetracker/issuetracker.controller.php @@ -396,7 +396,7 @@ $oController = &getController('issuetracker'); if($latestRevision < $status->revision) { - $logs = $oSvn->getLog("/", $latestRevision+1, $status->revision, false, $status->revision-$latestRevision); + $logs = $oSvn->getLog("/", $latestRevision+1, $status->revision, false, $status->revision-$latestRevision, false); foreach($logs as $log) { $obj = null; diff --git a/modules/issuetracker/issuetracker.model.php b/modules/issuetracker/issuetracker.model.php index 5b9e0161d..6112b94d9 100644 --- a/modules/issuetracker/issuetracker.model.php +++ b/modules/issuetracker/issuetracker.model.php @@ -190,6 +190,10 @@ for($k=0;$kcontent = str_replace('r'.$mat[1][$k], sprintf('%s',getUrl('','mid',Context::get('mid'),'act','dispIssuetrackerViewSource','type','compare','erev',$mat[1][$k],'brev',''), 'r'.$mat[1][$k]), $histories[$i]->content); } + preg_match_all('/\[([0-9]+)\]/',$histories[$i]->content, $mat); + for($k=0;$kcontent = str_replace('['.$mat[1][$k].']', sprintf('%s',getUrl('','mid',Context::get('mid'),'act','dispIssuetrackerViewSource','type','compare','erev',$mat[1][$k],'brev',''), '['.$mat[1][$k].']'), $histories[$i]->content); + } } return $histories; } @@ -368,6 +372,16 @@ else return 0; } + function _linkDocument($matches) { + $document_srl = $matches[1]; + return sprintf('#%d', getUrl('','document_srl',$document_srl), $document_srl); + } + + function _linkXE($message) + { + return preg_replace_callback('/^\#?([0-9]+)( |\:)/', array($this, '_linkDocument'), $message); + } + function getChangesets($module_srl, $enddate = null, $limit = 10) { @@ -384,6 +398,10 @@ debugPrint($output); return array(); } + foreach($output->data as $key => $changeset) + { + $changeset->message = $this->_linkXE($changeset->message); + } $solvedHistory = array(); $output2 = executeQueryArray("issuetracker.getHistories", $args); From c40ea62b34917958d1aa80589207c76be0896855 Mon Sep 17 00:00:00 2001 From: ngleader Date: Tue, 23 Dec 2008 09:06:48 +0000 Subject: [PATCH 13/82] =?UTF-8?q?board=20api=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5166 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/board.api.php | 87 +++++++++++++++++++++++++++++++ modules/board/board.view.php | 74 ++++++++++++++++++++------ modules/board/conf/module.xml | 37 +++++++------ modules/board/lang/en.lang.php | 1 + modules/board/lang/es.lang.php | 1 + modules/board/lang/fr.lang.php | 1 + modules/board/lang/jp.lang.php | 1 + modules/board/lang/ko.lang.php | 1 + modules/board/lang/ru.lang.php | 1 + modules/board/lang/zh-CN.lang.php | 1 + modules/board/lang/zh-TW.lang.php | 1 + 11 files changed, 175 insertions(+), 31 deletions(-) create mode 100644 modules/board/board.api.php diff --git a/modules/board/board.api.php b/modules/board/board.api.php new file mode 100644 index 000000000..f717cfa27 --- /dev/null +++ b/modules/board/board.api.php @@ -0,0 +1,87 @@ +add('notice_list',$this->arrangeContentList(Context::get('notice_list'))); + } + + + /** + * @brief 컨텐츠 목록 + **/ + function dispBoardContentList(&$oModule) { + $oModule->add('document_list',$this->arrangeContentList(Context::get('document_list'))); + $oModule->add('page_navigation',Context::get('page_navigation')); + } + + + /** + * @brief 카테고리(분류) 목록 + **/ + function dispBoardCatogoryList(&$oModule) { + $oModule->add('category_list',Context::get('category_list')); + } + + /** + * @brief 게시물 보기 + **/ + function dispBoardContentView(&$oModule) { + $oModule->add('oDocument',$this->arrangeContent(Context::get('oDocument'))); + } + + /** + * @brief 태그 목록 + **/ + function dispBoardTagList(&$oModule) { + $oModule->add('tag_list',Context::get('tag_list')); + } + + + function dispBoardConentCommentList(&$oModule) { + $oModule->add('comment_list',$this->arrangeComment(Context::get('comment_list'))); + } + + function arrangeContentList($content_list) { + $output = array(); + if(count($content_list)) { + foreach($content_list as $key => $val) $output[] = $this->arrangeContent($val); + } + return $output; + } + + + function arrangeContent($content) { + $output = null; + if($content){ + $output= $content->gets('document_srl','category_srl','is_secret','nick_name','user_id','user_name','title','content','tags','voted_count','blamed_count','comment_count','regdate','last_update','extra_vars1','extra_vars2','extra_vars3','extra_vars4','extra_vars5','extra_vars6','extra_vars7','extra_vars8','extra_vars9','extra_vars10','extra_vars11','extra_vars12','extra_vars13','extra_vars14','extra_vars15','extra_vars16','extra_vars17','extra_vars18','extra_vars19','extra_vars20'); + } + return $output; + } + + function arrangeComment($comment_list) { + $output = array(); + if(count($comment_list)) { + foreach($comment_list as $key => $val){ + $item = null; + $item = $val->gets('comment_srl','parent_srl','depth','is_secret','content','voted_count','blamed_count','user_id','user_name','nick_name','email_address','homepage','regdate','last_update'); + $output[] = $item; + } + } + return $output; + } + } +?> diff --git a/modules/board/board.view.php b/modules/board/board.view.php index c33af23c3..e67a6d353 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -67,10 +67,8 @@ /** * 카테고리를 사용하는지 확인후 사용시 카테고리 목록을 구해와서 Context에 세팅 **/ - if($this->module_info->use_category=='Y') { - $oDocumentModel = &getModel('document'); - Context::set('category_list', $oDocumentModel->getCategoryList($this->module_srl)); - } + $this->dispBoardCatogoryList(); + /** * 목록이 노출될때 같이 나오는 검색 옵션을 정리하여 스킨에서 쓸 수 있도록 context set @@ -82,14 +80,34 @@ for($i=1;$i<=20;$i++) { $ex_name = trim($this->module_info->extra_vars[$i]->name); if(!$ex_name) continue; - if($this->module_info->extra_vars[$i]->search == 'Y') $search_option['extra_vars'.$i] = $ex_name; } Context::set('search_option', $search_option); - /** - * 게시글 목록을 추출함 - **/ + + // 게시글을 가져옴 + $this->dispBoardContentView(); + + // 공지사항 목록을 구해서 context set (공지사항을 매페이지 제일 상단에 위치하기 위해서) + $this->dispBoardNoticeList(); + + // 목록 + $this->dispBoardContentList(); + + // template_file을 list.html로 지정 + $this->setTemplateFile('list'); + } + + function dispBoardCatogoryList(){ + if($this->module_info->use_category=='Y') { + $oDocumentModel = &getModel('document'); + Context::set('category_list', $oDocumentModel->getCategoryList($this->module_srl)); + } + } + + function dispBoardContentView(){ + $oDocumentModel = &getModel('document'); + $args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl // 목록 구현에 필요한 변수들을 가져온다 $document_srl = Context::get('document_srl'); @@ -135,9 +153,7 @@ if(!$this->grant->view && !$oDocument->isGranted()) { $oDocument = null; $oDocument = $oDocumentModel->getDocument(0); - Context::set('document_srl','',true); - $this->alertMessage('msg_not_permitted'); } else { // 브라우저 타이틀에 글의 제목을 추가 @@ -145,21 +161,49 @@ // 조회수 증가 (비밀글일 경우 권한 체크) if(!$oDocument->isSecret() || $oDocument->isGranted()) $oDocument->updateReadedCount(); + + // 비밀글일때 컨텐츠를 보여주지 말자. + if($oDocument->isSecret() && !$oDocument->isGranted()){ + $oDocument->add('content',Context::getLang('thisissecret')); + $obj = null; + for($i=1;$i<=20;$i++) $obj->{"extra_vars".$i} = ''; + $oDocument->adds($obj); + } } } } // 스킨에서 사용하기 위해 context set Context::set('oDocument', $oDocument); + } - // 공지사항 목록을 구해서 context set (공지사항을 매페이지 제일 상단에 위치하기 위해서) + function dispBoardContentCommentList(){ + $oDocumentModel = &getModel('document'); + $document_srl = Context::get('document_srl'); + $oDocument = $oDocumentModel->getDocument($document_srl); + $comment_list = $oDocument->getComments(); + + // 비밀글일때 컨텐츠를 보여주지 말자. + foreach($comment_list as $key => $val){ + if(!$val->isAccessible()){ + $val->add('content',Context::getLang('thisissecret')); + } + } + Context::set('comment_list',$comment_list); + } + + function dispBoardNoticeList(){ + $oDocumentModel = &getModel('document'); $args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl - $notice_output = $oDocumentModel->getNoticeList($args); Context::set('notice_list', $notice_output->data); + } + function dispBoardContentList(){ + $oDocumentModel = &getModel('document'); + $args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl // 목록을 구하기 위한 대상 모듈/ 페이지 수/ 목록 수/ 페이지 목록 수에 대한 옵션 설정 - $args->page = $page; ///< 페이지 + $args->page = Context::get('page');; ///< 페이지 $args->list_count = $this->list_count; ///< 한페이지에 보여줄 글 수 $args->page_count = $this->page_count; ///< 페이지 네비게이션에 나타날 페이지의 수 @@ -199,11 +243,9 @@ Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('page_navigation', $output->page_navigation); - - // template_file을 list.html로 지정 - $this->setTemplateFile('list'); } + /** * @brief 태그 목록 모두 보기 **/ diff --git a/modules/board/conf/module.xml b/modules/board/conf/module.xml index 4bb4ce943..65b1b6517 100644 --- a/modules/board/conf/module.xml +++ b/modules/board/conf/module.xml @@ -3,43 +3,43 @@ 목록 - 目录 + 目录 リスト list - Lista - 列表 + Lista + 列表 열람 - 查看 + 查看 閲覧 view - Opinión - 檢視 + Opinión + 檢視 글 작성 - 发表新主题 + 发表新主题 書き込み作成 write document - Escribir el documento - 發表主題 + Escribir el documento + 發表主題 댓글 작성 - 发表评论 + 发表评论 コメント作成 write comment - Escribir comentario - 發表評論 + Escribir comentario + 發表評論 관리 - 管理 + 管理 管理 manager - Administrador - 管理 + Administrador + 管理 @@ -81,6 +81,13 @@ + + + + + + + diff --git a/modules/board/lang/en.lang.php b/modules/board/lang/en.lang.php index f870bc280..cdcdd847c 100644 --- a/modules/board/lang/en.lang.php +++ b/modules/board/lang/en.lang.php @@ -22,6 +22,7 @@ $lang->search_result = 'Search Result'; $lang->consultation = 'Consultation'; $lang->secret = 'Secret'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = "Administrator's Mail"; // words used in button diff --git a/modules/board/lang/es.lang.php b/modules/board/lang/es.lang.php index 92b14d299..6779b2bba 100644 --- a/modules/board/lang/es.lang.php +++ b/modules/board/lang/es.lang.php @@ -24,6 +24,7 @@ $lang->search_result = 'Resultado de la búsqueda'; $lang->consultation = '상담 기능'; $lang->secret = '비밀글 기능'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = '관리자 메일'; // Palabras utilizadas en los botones diff --git a/modules/board/lang/fr.lang.php b/modules/board/lang/fr.lang.php index ae1a26acf..fa6ef81f9 100644 --- a/modules/board/lang/fr.lang.php +++ b/modules/board/lang/fr.lang.php @@ -21,6 +21,7 @@ $lang->search_result = 'Résultat de la Recherche'; $lang->consultation = 'Consultation'; $lang->secret = '비밀글 기능'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = 'Mél de l\'administrateur'; // Mots utilisés en bouton diff --git a/modules/board/lang/jp.lang.php b/modules/board/lang/jp.lang.php index ce7843b83..10ee67f4d 100644 --- a/modules/board/lang/jp.lang.php +++ b/modules/board/lang/jp.lang.php @@ -23,6 +23,7 @@ $lang->search_result = '検索結果'; $lang->consultation = '相談機能'; $lang->secret = '秘密文機能'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = '管理者メールアドレス'; diff --git a/modules/board/lang/ko.lang.php b/modules/board/lang/ko.lang.php index 1a0a3050f..2259f5d73 100644 --- a/modules/board/lang/ko.lang.php +++ b/modules/board/lang/ko.lang.php @@ -23,6 +23,7 @@ $lang->search_result = '검색결과'; $lang->consultation = '상담 기능'; $lang->secret = '비밀글 기능'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = '관리자 메일'; diff --git a/modules/board/lang/ru.lang.php b/modules/board/lang/ru.lang.php index b30e73b34..4d980ad65 100644 --- a/modules/board/lang/ru.lang.php +++ b/modules/board/lang/ru.lang.php @@ -26,6 +26,7 @@ $lang->search_result = 'Результат поиска'; $lang->consultation = '상담 기능'; $lang->secret = '비밀글 기능'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = '관리자 메일'; // слова, использованные в кнопке diff --git a/modules/board/lang/zh-CN.lang.php b/modules/board/lang/zh-CN.lang.php index 91774c441..52a805458 100644 --- a/modules/board/lang/zh-CN.lang.php +++ b/modules/board/lang/zh-CN.lang.php @@ -25,6 +25,7 @@ $lang->search_result = '搜索结果'; $lang->consultation = '咨询功能'; $lang->secret = '密帖'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = '管理员电子邮件'; // 按钮语言 diff --git a/modules/board/lang/zh-TW.lang.php b/modules/board/lang/zh-TW.lang.php index 4ebb1d874..001155981 100644 --- a/modules/board/lang/zh-TW.lang.php +++ b/modules/board/lang/zh-TW.lang.php @@ -22,6 +22,7 @@ $lang->search_result = '搜尋結果'; $lang->consultation = '咨詢功能'; $lang->secret = '秘密'; + $lang->thisissecret = '비밀글입니다.'; $lang->admin_mail = '管理員電子郵件'; // 按鈕語言 From 3ec3f87a120f10b553e50ba88566874718b472a7 Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 23 Dec 2008 09:43:36 +0000 Subject: [PATCH 14/82] =?UTF-8?q?board=EB=AA=A8=EB=93=88=EC=9D=98=20dispBo?= =?UTF-8?q?ardContentList=EC=97=90=EC=84=9C=20=EB=88=84=EB=9D=BD=EB=90=9C?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5167 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/board.view.php | 2 ++ modules/tccommentnotify/tccommentnotify.controller.php | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/board/board.view.php b/modules/board/board.view.php index e67a6d353..4bbfd4d7b 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -220,6 +220,8 @@ if(!in_array($args->sort_index, $this->order_target)) $args->sort_index = $this->module_info->order_target?$this->module_info->order_target:'list_order'; if(!in_array($args->order_type, array('asc','desc'))) $args->order_type = $this->module_info->order_type?$this->module_info->order_type:'asc'; + $oDocument = $oDocumentModel->getDocument(Context::get('document_srl')); + // 특정 문서의 permalink로 직접 접속할 경우 page값을 직접 구함 if(count($_GET)==1 && isset($_GET['document_srl']) && $oDocument->isExists() && !$oDocument->isNotice()) { $page = $oDocumentModel->getDocumentPage($oDocument, $args); diff --git a/modules/tccommentnotify/tccommentnotify.controller.php b/modules/tccommentnotify/tccommentnotify.controller.php index a4a919fb4..582380839 100644 --- a/modules/tccommentnotify/tccommentnotify.controller.php +++ b/modules/tccommentnotify/tccommentnotify.controller.php @@ -97,8 +97,10 @@ { foreach($output->data as $data) { + debugPrint("start"); $this->deleteFromQueue($data->comment_srl); $this->sendCommentNotify($data->comment_srl); + debugPrint("end"); } } FileHandler::removeFile($lockFilePath); @@ -177,7 +179,6 @@ return; } - $parentHomepage = $oParent->getHomepageUrl(); $oMemberModel = &getModel('member'); if(!$parentHomepage) @@ -191,7 +192,6 @@ return; } - $childHomepage = $oChild->getHomepageUrl(); if(!$childHomepage) { @@ -262,8 +262,11 @@ $oReq->addPostData('r2_body', strip_tags($oChild->get('content'))); + debugPrint($target); $oReq->sendRequest(false); + debugPrint("ok"); $code = $oReq->getResponseCode(); + debugPrint($code); return $code; } From 22a5981cceb9006a22fefef5f2ee2767fddbb6ab Mon Sep 17 00:00:00 2001 From: haneul Date: Tue, 23 Dec 2008 13:20:38 +0000 Subject: [PATCH 15/82] added link to title to make easy to get permalink git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5168 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/skins/xe_issuetracker/css/common.css | 1 + modules/issuetracker/skins/xe_issuetracker/view_issue.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/issuetracker/skins/xe_issuetracker/css/common.css b/modules/issuetracker/skins/xe_issuetracker/css/common.css index 495956b10..3ada2b3ea 100644 --- a/modules/issuetracker/skins/xe_issuetracker/css/common.css +++ b/modules/issuetracker/skins/xe_issuetracker/css/common.css @@ -129,6 +129,7 @@ div.editor table { width:95%; } .viewIssue table { border-spacing:0; overflow:hidden; width:100%; border:1px solid #AAAAAA; background-color:#FFFFF6; table-layout:fixed;} .viewIssue table tr th { text-align:right; border-bottom:1px solid #EEEEEE; padding:8px 10px 5px 10px; vertical-align:top; color:#898700; font-weight:normal;} .viewIssue table tr th.title { color:#444444; font-size:13pt; text-align:left; font-weight:bold; } +.viewIssue table tr th.title a { text-decoration: none; color:#444444; font-size:13pt; text-align:left; font-weight:bold; } .viewIssue table tr th.title span { font-size:9pt; color:#4F86B0;} .viewIssue table tr td { border-bottom:1px solid #EEEEEE; padding:5px 0 5px 0; color:#3B3A00; } .viewIssue table tr td.description { color:#444444; text-align:left; padding:20px; overflow:hidden;} diff --git a/modules/issuetracker/skins/xe_issuetracker/view_issue.html b/modules/issuetracker/skins/xe_issuetracker/view_issue.html index 2fa2e9e32..7e9f566ed 100644 --- a/modules/issuetracker/skins/xe_issuetracker/view_issue.html +++ b/modules/issuetracker/skins/xe_issuetracker/view_issue.html @@ -6,7 +6,7 @@ - + From 3b4eb75c2d5d5bf3b7e0da2841edcaa5547e57f2 Mon Sep 17 00:00:00 2001 From: haneul Date: Tue, 23 Dec 2008 15:58:47 +0000 Subject: [PATCH 16/82] #17572245 : displaying the number of duplicated issues in dispMilestone git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5169 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/issuetracker.view.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/issuetracker/issuetracker.view.php b/modules/issuetracker/issuetracker.view.php index 30fd7d65d..03ae8d529 100644 --- a/modules/issuetracker/issuetracker.view.php +++ b/modules/issuetracker/issuetracker.view.php @@ -128,6 +128,7 @@ $issues['reopen'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'reopen'); $issues['postponed'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'postponed'); $issues['invalid'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'invalid'); + $issues['duplicated'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'duplicated'); $issues['total'] = $issues['new']+$issues['assign']+$issues['resolve']+$issues['reopen']+$issues['reviewing']; $milestone->issues = $issues; $milestones[$milestone->milestone_srl] = $milestone; From df36ec4ccde3f063bb0fc37190bfb7bc9d0c56f4 Mon Sep 17 00:00:00 2001 From: haneul Date: Tue, 23 Dec 2008 16:23:25 +0000 Subject: [PATCH 17/82] #17154543 : restrict users to write an article if the user does not have enough point git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5170 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/board.view.php | 19 +++++++++++++++++++ modules/board/lang/en.lang.php | 4 +++- modules/board/lang/es.lang.php | 4 ++-- modules/board/lang/fr.lang.php | 5 ++++- modules/board/lang/jp.lang.php | 3 ++- modules/board/lang/ko.lang.php | 4 +++- modules/board/lang/ru.lang.php | 4 ++-- modules/board/lang/zh-CN.lang.php | 3 ++- modules/board/lang/zh-TW.lang.php | 3 ++- 9 files changed, 39 insertions(+), 10 deletions(-) diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 4bbfd4d7b..ec7f1f964 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -328,6 +328,25 @@ // 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로 if($oDocument->isExists()&&!$oDocument->isGranted()) return $this->setTemplateFile('input_password_form'); + if(!$oDocument->isExists()) + { + $oModuleModel = &getModel('module'); + $point_config = $oModuleModel->getModulePartConfig('point',$this->module_srl); + $logged_info = Context::get('logged_info'); + $oPointModel = &getModel('point'); + $pointForInsert = $point_config["insert_document"]; + if($pointForInsert < 0) + { + if( !$logged_info ) + { + return $this->dispBoardMessage('msg_not_permitted'); + } + else if (($oPointModel->getPoint($logged_info->member_srl) + $pointForInsert )< 0 ) + { + return $this->dispBoardMessage('msg_not_enough_point'); + } + } + } Context::set('document_srl',$document_srl); Context::set('oDocument', $oDocument); diff --git a/modules/board/lang/en.lang.php b/modules/board/lang/en.lang.php index cdcdd847c..fe1d4a717 100644 --- a/modules/board/lang/en.lang.php +++ b/modules/board/lang/en.lang.php @@ -43,4 +43,6 @@ $lang->about_admin_mail = 'A mail will be sent when an article or comment is submitted.
            Multiple mails can be sent with commas(,).'; $lang->about_category_color = 'You can set font color of category.'; -?> \ No newline at end of file + + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> diff --git a/modules/board/lang/es.lang.php b/modules/board/lang/es.lang.php index 6779b2bba..a6ff4ce58 100644 --- a/modules/board/lang/es.lang.php +++ b/modules/board/lang/es.lang.php @@ -45,5 +45,5 @@ $lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다
            ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.'; $lang->about_category_color = '분류 폰트색깔을 지정합니다.'; - -?> \ No newline at end of file + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> diff --git a/modules/board/lang/fr.lang.php b/modules/board/lang/fr.lang.php index fa6ef81f9..43d56d08c 100644 --- a/modules/board/lang/fr.lang.php +++ b/modules/board/lang/fr.lang.php @@ -40,4 +40,7 @@ $lang->about_consultation = "Les membres non-administratifs verront seulement les ariticles d\'eux-même.\nNon-membres ne pourraient pas écrire des articles quand la Consultation est appliqué."; $lang->about_secret = '게시판 및 댓글의 비밀글 사용할 수 있도록 합니다.'; $lang->about_admin_mail = 'Un message éléctronique sera envoyé à l\'adresse inscrite quand un article ou commentaire se soumet.
            On peut inscrire multiple adresses délimité par les virgules.'; -?> \ No newline at end of file + + $lang->about_category_color = 'You can set font color of category.'; + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> diff --git a/modules/board/lang/jp.lang.php b/modules/board/lang/jp.lang.php index 10ee67f4d..adb691f22 100644 --- a/modules/board/lang/jp.lang.php +++ b/modules/board/lang/jp.lang.php @@ -46,4 +46,5 @@ $lang->about_admin_mail = '書き込みやコメントが掲載される時、登録メールアドレス宛にメールが送信されます。
            複数のメールアドレスへ送信する場合は「,」(半額コンマ)区切りで登録して下さい。'; $lang->about_category_color = 'カテゴリのフォント色を設定します。'; -?> \ No newline at end of file + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> diff --git a/modules/board/lang/ko.lang.php b/modules/board/lang/ko.lang.php index 2259f5d73..61bb5eb66 100644 --- a/modules/board/lang/ko.lang.php +++ b/modules/board/lang/ko.lang.php @@ -46,4 +46,6 @@ $lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다
            ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.'; $lang->about_category_color = '분류 폰트색깔을 지정합니다.'; -?> \ No newline at end of file + + $lang->msg_not_enough_point = '포인트가 부족합니다'; +?> diff --git a/modules/board/lang/ru.lang.php b/modules/board/lang/ru.lang.php index 4d980ad65..d1a243fff 100644 --- a/modules/board/lang/ru.lang.php +++ b/modules/board/lang/ru.lang.php @@ -47,5 +47,5 @@ $lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다
            ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.'; $lang->about_category_color = '분류 폰트색깔을 지정합니다.'; - -?> \ No newline at end of file + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> diff --git a/modules/board/lang/zh-CN.lang.php b/modules/board/lang/zh-CN.lang.php index 52a805458..ce15b76c7 100644 --- a/modules/board/lang/zh-CN.lang.php +++ b/modules/board/lang/zh-CN.lang.php @@ -46,4 +46,5 @@ $lang->about_secret = '设置主题及评论当中使用密帖与否。'; $lang->about_admin_mail = '有新的主题或评论时,将自动发电子邮件来通知管理员。
            多数电子邮件由逗号(,)来分隔。'; $lang->about_category_color = '请指定分类颜色(必须带#符号)。ex)#ff0000'; -?> \ No newline at end of file + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> diff --git a/modules/board/lang/zh-TW.lang.php b/modules/board/lang/zh-TW.lang.php index 001155981..b7a8e6bc6 100644 --- a/modules/board/lang/zh-TW.lang.php +++ b/modules/board/lang/zh-TW.lang.php @@ -42,4 +42,5 @@ $lang->about_secret = '可用於討論板或回覆時選擇是否使用。'; $lang->about_admin_mail = '有新的主題或評論時,將自動發電子郵件來通知管理員。
            多數電子郵件由逗號(,)區隔。'; $lang->about_category_color = '設定分類顏色。'; -?> \ No newline at end of file + $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; +?> From 0aa6b88143794ddae1b2c1a5003c42fd2044a75b Mon Sep 17 00:00:00 2001 From: heemin Date: Wed, 24 Dec 2008 00:41:23 +0000 Subject: [PATCH 18/82] =?UTF-8?q?issuetracker=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EB=B6=80=EB=B6=84=20=EB=B2=88=EC=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5171 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/lang/jp.lang.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/issuetracker/lang/jp.lang.php b/modules/issuetracker/lang/jp.lang.php index ef9c3e578..b3a3e6afb 100644 --- a/modules/issuetracker/lang/jp.lang.php +++ b/modules/issuetracker/lang/jp.lang.php @@ -90,4 +90,8 @@ $lang->cmd_document_do = 'このイシューを・・・ '; $lang->not_assigned = 'アサイン無し'; $lang->not_assigned_description = 'アサインされてないイシューのリストです。'; + $lang->timeline_msg = array( + 'changed' => '変更', + 'created' => '作成' + ); ?> From 2486044777c80fbde5e4d17903bf8973842cb8e4 Mon Sep 17 00:00:00 2001 From: heemin Date: Wed, 24 Dec 2008 00:48:46 +0000 Subject: [PATCH 19/82] =?UTF-8?q?modules/board=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B6=80=EB=B6=84=20=EB=B2=88=EC=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5172 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/lang/jp.lang.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/board/lang/jp.lang.php b/modules/board/lang/jp.lang.php index adb691f22..21696a236 100644 --- a/modules/board/lang/jp.lang.php +++ b/modules/board/lang/jp.lang.php @@ -23,7 +23,7 @@ $lang->search_result = '検索結果'; $lang->consultation = '相談機能'; $lang->secret = '秘密文機能'; - $lang->thisissecret = '비밀글입니다.'; + $lang->thisissecret = '秘密文です。'; $lang->admin_mail = '管理者メールアドレス'; @@ -46,5 +46,6 @@ $lang->about_admin_mail = '書き込みやコメントが掲載される時、登録メールアドレス宛にメールが送信されます。
            複数のメールアドレスへ送信する場合は「,」(半額コンマ)区切りで登録して下さい。'; $lang->about_category_color = 'カテゴリのフォント色を設定します。'; - $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; + + $lang->msg_not_enough_point = '書き込みするためのポイントが足りません。'; ?> From 5bb59ae1704522b0cbb77c763def745a6d3dbdf7 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 01:39:53 +0000 Subject: [PATCH 20/82] =?UTF-8?q?planet=20=EB=AA=A8=EB=93=88=EC=97=90=20?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=BD=94=EB=93=9C=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5173 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/tpl/board_insert.html | 2 +- modules/planet/planet.admin.controller.php | 1 + modules/planet/planet.admin.view.php | 5 +++++ modules/planet/planet.view.php | 2 +- modules/planet/tpl/filter/insert_config.xml | 1 + modules/planet/tpl/setup.html | 14 +++++++++++++- 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index 4bef5990a..81909b4d4 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -245,4 +245,4 @@ - \ No newline at end of file + diff --git a/modules/planet/planet.admin.controller.php b/modules/planet/planet.admin.controller.php index b0c6ef926..41190c14b 100644 --- a/modules/planet/planet.admin.controller.php +++ b/modules/planet/planet.admin.controller.php @@ -31,6 +31,7 @@ $args->browser_title = Context::get('browser_title'); $args->is_default = Context::get('is_default'); $args->skin = Context::get('planet_default_skin'); + $args->layout_srl = Context::get('layout_srl'); $args->module = 'planet'; $args->module_srl = $is_registed?$config->module_srl:getNextSequence(); diff --git a/modules/planet/planet.admin.view.php b/modules/planet/planet.admin.view.php index b41aa6c64..0c96a05c8 100644 --- a/modules/planet/planet.admin.view.php +++ b/modules/planet/planet.admin.view.php @@ -37,6 +37,11 @@ if(is_array($this->config->tagtab_after)) Context::set('tagtab_after', join(',',$this->config->tagtab_after)); if(is_array($this->config->smstag)) Context::set('smstag', join(',',$this->config->smstag)); + // 레이아웃 목록을 구해옴 + $oLayoutMode = &getModel('layout'); + $layout_list = $oLayoutMode->getLayoutList(); + Context::set('layout_list', $layout_list); + $this->setTemplateFile('setup'); } diff --git a/modules/planet/planet.view.php b/modules/planet/planet.view.php index aa642687e..6abae37df 100644 --- a/modules/planet/planet.view.php +++ b/modules/planet/planet.view.php @@ -42,7 +42,7 @@ $this->grant->create = $oPlanetModel->isCreateGranted(); // 플래닛은 별도 레이아웃 동작하지 않도록 변경 - Context::set('layout', 'none'); + //Context::set('layout', 'none'); if(!Context::get('mid')) Context::set('mid', $this->config->mid, true); } diff --git a/modules/planet/tpl/filter/insert_config.xml b/modules/planet/tpl/filter/insert_config.xml index e477e1a97..0c997fa5a 100644 --- a/modules/planet/tpl/filter/insert_config.xml +++ b/modules/planet/tpl/filter/insert_config.xml @@ -11,6 +11,7 @@ + diff --git a/modules/planet/tpl/setup.html b/modules/planet/tpl/setup.html index 5a5b2c587..e23d260a2 100644 --- a/modules/planet/tpl/setup.html +++ b/modules/planet/tpl/setup.html @@ -17,13 +17,25 @@ -
            + + + + +
            {$lang->editor_skin}
            {$lang->colorset}
            {$no} isCarted())-->checked="checked"/> @@ -48,7 +48,7 @@ {$oDocument->getRegdate("Y-m-d")}
            {$lang->cmd_cancel_declare} {$lang->cmd_manage_document} diff --git a/modules/document/tpl/document_config.html b/modules/document/tpl/document_config.html index 216323389..3b9fbe2ed 100644 --- a/modules/document/tpl/document_config.html +++ b/modules/document/tpl/document_config.html @@ -3,7 +3,7 @@
            - + @@ -12,13 +12,13 @@ thumbnail_type == 'ratio')-->checked="checked"/> {$lang->thumbnail_ratio} - +
            {$lang->thumbnail_type}
            - +
            diff --git a/modules/document/tpl/document_list.html b/modules/document/tpl/document_list.html index 420bbef4f..97284813d 100644 --- a/modules/document/tpl/document_list.html +++ b/modules/document/tpl/document_list.html @@ -36,7 +36,7 @@
            {$no} {htmlspecialchars($module_list[$oDocument->get('module_srl')]->browser_title)}- {$oDocument->getNickName()}
            {$oIssue->getTitle()} - {$oIssue->getStatus()}{$oIssue->getTitle()}- {$oIssue->getStatus()} {$oIssue->getNickName()}
            {$lang->browser_title}

            {$lang->browser_title}

            {$lang->layout}
            + +

            {$lang->about_layout}

            +
            {$lang->planet_default_skin}
            From 730edcb33a22fbf5f4c390e7e08496647aabcb44 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 01:41:44 +0000 Subject: [PATCH 21/82] =?UTF-8?q?=ED=94=8C=EB=9E=98=EB=8B=9B=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=EC=9D=98=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=EC=8B=9C=20=EC=84=A4=EC=A0=95=EB=90=9C=20?= =?UTF-8?q?=EA=B0=92=EC=9D=B4=20=EB=82=98=EC=98=A4=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5174 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/planet.model.php | 1 + modules/planet/tpl/setup.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/planet/planet.model.php b/modules/planet/planet.model.php index 15cf1099d..516d57150 100644 --- a/modules/planet/planet.model.php +++ b/modules/planet/planet.model.php @@ -29,6 +29,7 @@ $config->is_default = $dummy->is_default; $config->module_srl = $dummy->module_srl; $config->browser_title = $dummy->browser_title; + $config->layout_srl = $dummy->layout_srl; if($config->logo_image) $config->logo_image = context::getFixUrl($config->logo_image); } return $config; diff --git a/modules/planet/tpl/setup.html b/modules/planet/tpl/setup.html index e23d260a2..977e3d7f7 100644 --- a/modules/planet/tpl/setup.html +++ b/modules/planet/tpl/setup.html @@ -30,7 +30,7 @@

            {$lang->about_layout}

            From 13238f50f2c7d05e22a65e620ab910e70f26cc01 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 06:23:12 +0000 Subject: [PATCH 22/82] =?UTF-8?q?=ED=94=8C=EB=9E=98=EB=8B=9B=EC=97=90=20?= =?UTF-8?q?=EC=A7=80=EC=A0=95=EB=90=9C=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=EC=9D=84=20=EA=B0=81=20=EA=B0=9C=EB=B3=84=20=ED=94=8C?= =?UTF-8?q?=EB=9E=98=EB=8B=9B=EC=97=90=EC=84=9C=EB=8F=84=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95.=20=EC=99=B8=EB=B6=80=20action=20forward=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5175 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/planet.view.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/planet/planet.view.php b/modules/planet/planet.view.php index 6abae37df..b7c20d064 100644 --- a/modules/planet/planet.view.php +++ b/modules/planet/planet.view.php @@ -11,11 +11,14 @@ * @brief 초기화 **/ function init() { + + if(!preg_match('/planet/i', $this->act)) return; /** * @brief 플래닛 모듈의 기본 설정은 view에서는 언제든지 사용하도록 load하여 Context setting **/ $oPlanetModel = &getModel('planet'); Context::set('config',$this->config = $oPlanetModel->getPlanetConfig()); + $this->module_info->layout_srl = $this->config->layout_srl; /** * 스킨이 없으면 플래닛 기본 설정의 스킨으로 설정 From 5eb6ca353cd24f51e2347d49eb1f4daf22ef7306 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 07:31:20 +0000 Subject: [PATCH 23/82] =?UTF-8?q?1.=20=ED=94=8C=EB=9E=98=EB=8B=9B=20?= =?UTF-8?q?=EA=B8=80=20=EC=9C=84=EC=A0=AF=20=EC=B6=94=EA=B0=80=202.=20?= =?UTF-8?q?=EC=B5=9C=EC=8B=A0=EA=B8=80=20=EC=9C=84=EC=A0=AF=20=EC=8A=A4?= =?UTF-8?q?=ED=82=A8=EC=97=90=20xe=5Fofficial=20=EC=8A=A4=ED=82=A8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5176 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../skins/xe_official/css/black.css | 16 ++++++ .../skins/xe_official/css/white.css | 16 ++++++ .../xe_official/images/black/bulletD0.gif | Bin 0 -> 44 bytes .../xe_official/images/black/lineNotice.gif | Bin 0 -> 139 bytes .../xe_official/images/white/bulletD0.gif | Bin 0 -> 44 bytes .../xe_official/images/white/lineNotice.gif | Bin 0 -> 139 bytes .../skins/xe_official/list.html | 26 ++++++++++ .../newest_comment/skins/xe_official/skin.xml | 42 +++++++++++++++ widgets/newest_document/conf/info.xml | 2 +- .../skins/xe_official/skin.xml | 2 +- widgets/planet_document/conf/info.xml | 48 ++++++++++++++++++ .../planet_document/planet_document.class.php | 44 ++++++++++++++++ .../skins/xe_official/css/white.css | 34 +++++++++++++ .../skins/xe_official/images/bgTag.gif | Bin 0 -> 152 bytes .../skins/xe_official/images/bgTag.png | Bin 0 -> 291 bytes .../skins/xe_official/list.html | 44 ++++++++++++++++ .../skins/xe_official/skin.xml | 23 +++++++++ 17 files changed, 295 insertions(+), 2 deletions(-) create mode 100644 widgets/newest_comment/skins/xe_official/css/black.css create mode 100644 widgets/newest_comment/skins/xe_official/css/white.css create mode 100644 widgets/newest_comment/skins/xe_official/images/black/bulletD0.gif create mode 100644 widgets/newest_comment/skins/xe_official/images/black/lineNotice.gif create mode 100644 widgets/newest_comment/skins/xe_official/images/white/bulletD0.gif create mode 100644 widgets/newest_comment/skins/xe_official/images/white/lineNotice.gif create mode 100644 widgets/newest_comment/skins/xe_official/list.html create mode 100644 widgets/newest_comment/skins/xe_official/skin.xml create mode 100644 widgets/planet_document/conf/info.xml create mode 100644 widgets/planet_document/planet_document.class.php create mode 100644 widgets/planet_document/skins/xe_official/css/white.css create mode 100644 widgets/planet_document/skins/xe_official/images/bgTag.gif create mode 100644 widgets/planet_document/skins/xe_official/images/bgTag.png create mode 100644 widgets/planet_document/skins/xe_official/list.html create mode 100644 widgets/planet_document/skins/xe_official/skin.xml diff --git a/widgets/newest_comment/skins/xe_official/css/black.css b/widgets/newest_comment/skins/xe_official/css/black.css new file mode 100644 index 000000000..8bacfe7f2 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/css/black.css @@ -0,0 +1,16 @@ +.latest_comment_black { width:100%; padding-bottom:15px; overflow:hidden; position:relative;} +.latest_comment_black h2 { margin:0; display:block; height:21px; padding:9px 0 0 9px; margin-bottom:12px; color:#ffffff; background:url(../images/black/lineNotice.gif) no-repeat left bottom; font-size:1em;} + +.latest_comment_black ul { margin:0; padding:0; } +.latest_comment_black ul li { height:20px; background:url(../images/black/bulletD0.gif) no-repeat left 5px; padding-left:10px; overflow:hidden; list-style:none; white-space:nowrap;} + +.latest_comment_black ul li .title a { color:#818181; text-decoration:none; } +.latest_comment_black ul li .title a:hover { text-decoration:underline; } +.latest_comment_black ul li .title span.comment { color:#FE6700; font:.9em Tahoma; } +.latest_comment_black ul li .title span.comment a { color:#FE6700; font:.9em Tahoma; } + +.latest_comment_black ul li .date { color:#999999; font:.8em Tahoma; white-space:nowrap; margin-right:5px;} + +.latest_comment_black .more { position:absolute; top:12px; right:11px; color:#54564b; font:.8em Tahoma;} +.latest_comment_black a.more { text-decoration:none;} +.latest_comment_black a.more:hover { text-decoration:underline;} diff --git a/widgets/newest_comment/skins/xe_official/css/white.css b/widgets/newest_comment/skins/xe_official/css/white.css new file mode 100644 index 000000000..c814ff014 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/css/white.css @@ -0,0 +1,16 @@ +.latest_comment_white { width:100%; padding-bottom:15px; overflow:hidden; position:relative;} +.latest_comment_white h2 { margin:0; display:block; height:21px; padding:9px 0 0 9px; margin-bottom:12px; color:#000000; background:url(../images/white/lineNotice.gif) no-repeat left bottom; font-size:1em;} + +.latest_comment_white ul { margin:0; padding:0; } +.latest_comment_white ul li { height:20px; background:url(../images/white/bulletD0.gif) no-repeat left 5px; padding-left:10px; overflow:hidden; list-style:none; white-space:nowrap;} + +.latest_comment_white ul li .title a { color:#555555; text-decoration:none; } +.latest_comment_white ul li .title a:hover { text-decoration:underline; } +.latest_comment_white ul li .title span.comment { color:#FE6700; font:.9em Tahoma; } +.latest_comment_white ul li .title span.comment a { color:#FE6700; font:.9em Tahoma; } + +.latest_comment_white ul li .date { color:#999999; font:.8em Tahoma; white-space:nowrap; margin-right:5px;} + +.latest_comment_white .more { position:absolute; top:12px; right:11px; color:#54564b; font:.8em Tahoma;} +.latest_comment_white a.more { text-decoration:none;} +.latest_comment_white a.more:hover { text-decoration:underline;} diff --git a/widgets/newest_comment/skins/xe_official/images/black/bulletD0.gif b/widgets/newest_comment/skins/xe_official/images/black/bulletD0.gif new file mode 100644 index 0000000000000000000000000000000000000000..e8e17d4c63d93ac478a0a54a3abc39ad94eed969 GIT binary patch literal 44 tcmZ?wbhEHbWM*JyXkcKtaNz<21B2pE79h#MpaUX6G7L=2E%mGn)&RoU2R8r! literal 0 HcmV?d00001 diff --git a/widgets/newest_comment/skins/xe_official/images/black/lineNotice.gif b/widgets/newest_comment/skins/xe_official/images/black/lineNotice.gif new file mode 100644 index 0000000000000000000000000000000000000000..dbf2c8220a7eb9d2b007167e9e0efe70cec5b33c GIT binary patch literal 139 zcmV;60CfLHNk%w1VF(8T0DuAj{x%eRe0(AP6+?1mVRU6=Aa`kWXdqN*WgtgMO;7+V z000002nPZH00L2jkEzS;52Ku++KaQ^y!#J^;z*X}iKgnxw(bkZ@=VwEjpzE#_x=wI t3Wvm^@rX<+mrU2>35`mpl&1BH&1$#YuJ;QLi^t@$`HW7h*KAJ#06We2KUn|( literal 0 HcmV?d00001 diff --git a/widgets/newest_comment/skins/xe_official/images/white/bulletD0.gif b/widgets/newest_comment/skins/xe_official/images/white/bulletD0.gif new file mode 100644 index 0000000000000000000000000000000000000000..e8e17d4c63d93ac478a0a54a3abc39ad94eed969 GIT binary patch literal 44 tcmZ?wbhEHbWM*JyXkcKtaNz<21B2pE79h#MpaUX6G7L=2E%mGn)&RoU2R8r! literal 0 HcmV?d00001 diff --git a/widgets/newest_comment/skins/xe_official/images/white/lineNotice.gif b/widgets/newest_comment/skins/xe_official/images/white/lineNotice.gif new file mode 100644 index 0000000000000000000000000000000000000000..dbf2c8220a7eb9d2b007167e9e0efe70cec5b33c GIT binary patch literal 139 zcmV;60CfLHNk%w1VF(8T0DuAj{x%eRe0(AP6+?1mVRU6=Aa`kWXdqN*WgtgMO;7+V z000002nPZH00L2jkEzS;52Ku++KaQ^y!#J^;z*X}iKgnxw(bkZ@=VwEjpzE#_x=wI t3Wvm^@rX<+mrU2>35`mpl&1BH&1$#YuJ;QLi^t@$`HW7h*KAJ#06We2KUn|( literal 0 HcmV?d00001 diff --git a/widgets/newest_comment/skins/xe_official/list.html b/widgets/newest_comment/skins/xe_official/list.html new file mode 100644 index 000000000..1f3bfeadc --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/list.html @@ -0,0 +1,26 @@ + + + + + + {@ $colorset = "white" } + + +
            + +

            {$widget_info->title}

            + + + + more + +
            diff --git a/widgets/newest_comment/skins/xe_official/skin.xml b/widgets/newest_comment/skins/xe_official/skin.xml new file mode 100644 index 000000000..4e9d6abe4 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/skin.xml @@ -0,0 +1,42 @@ + + + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + 댓글을 출력합니다 + 댓글을 출력합니다 + 댓글을 출력합니다 + 댓글을 출력합니다 + 댓글을 출력합니다 + 0.1 + 2007-02-28 + http://www.zeroboard.com + + + 제로 + Zero + zero + zero + zero + + + + + 흰색 바탕용 + 白い背景用 + 白色背景 + White Background + 白色背景 + + + 어두운 바탕용 + 暗い背景用 + 暗色背景 + Dark Background + 暗色背景 + + + + diff --git a/widgets/newest_document/conf/info.xml b/widgets/newest_document/conf/info.xml index 48e3fe3a6..ba467f5e2 100644 --- a/widgets/newest_document/conf/info.xml +++ b/widgets/newest_document/conf/info.xml @@ -186,4 +186,4 @@ 把所選擇的模組作為目標。 - \ No newline at end of file + diff --git a/widgets/newest_document/skins/xe_official/skin.xml b/widgets/newest_document/skins/xe_official/skin.xml index e6b4a507b..b6820dbb5 100644 --- a/widgets/newest_document/skins/xe_official/skin.xml +++ b/widgets/newest_document/skins/xe_official/skin.xml @@ -63,4 +63,4 @@ 暗色背景 - \ No newline at end of file + diff --git a/widgets/planet_document/conf/info.xml b/widgets/planet_document/conf/info.xml new file mode 100644 index 000000000..fd28b0b95 --- /dev/null +++ b/widgets/planet_document/conf/info.xml @@ -0,0 +1,48 @@ + + + 플래닛 최근 글 출력 + 플래닛의 글들만 출력하는 위젯입니다 . + 0.1 + 2008-12-24 + + + zero + + + + + text + 제목 + 栏目名 + タイトル + Title + Título + Заголовок + 標題 + 최근 게시물의 제목으로 출력됩니다. + 显示为最新主题列表的标题。 + 最新の書き込みのタイトルとして表示されます。 + It will be the title of the newest articles. + Este será el título de los documentos recientes. + Это будет заголовком последних статей. + 顯示最新主題列表的標題。 + + + text + 목록수 + 目录数 + リスト数 + The number of list + Número de la lista + Число списка + 目錄數 + 출력될 목록의 수를 정하실 수 있습니다. (기본 5개) + 可设置要显示的目录数。 (默认为5个) + 出力されるリストの数を指定することができます。(デフォルト5個) + You can set the number of articles to be displayed. (default is 5) + Usted puede definir el número de los documentos a mostrar. (predefinido: 5) + Вы можете выбрать число списка статей для отображения. (стандарт: 5) + 設置要顯示的目錄數。(預設是5個) + + + diff --git a/widgets/planet_document/planet_document.class.php b/widgets/planet_document/planet_document.class.php new file mode 100644 index 000000000..3a43f3780 --- /dev/null +++ b/widgets/planet_document/planet_document.class.php @@ -0,0 +1,44 @@ +title; + + // 출력된 목록 수 + $list_count = (int)$args->list_count; + if(!$list_count) $list_count = 5; + + // 플래닛 글 목록 구함 + $oPlanetModel = &getModel('planet'); + Context::set('planet', $planet = $oPlanetModel->getPlanet()); + $output = $oPlanetModel->getNewestContentList(null, $planet->getContentLastDay(), $page, $list_count, 'documents.list_order', 'asc', null); + Context::set('planet_list', $output->data); + + // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) + $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); + Context::set('colorset', $args->colorset); + + // 템플릿 파일을 지정 + $tpl_file = 'list'; + + // 템플릿 컴파일 + $oTemplate = &TemplateHandler::getInstance(); + $output = $oTemplate->compile($tpl_path, $tpl_file); + return $output; + } + } +?> diff --git a/widgets/planet_document/skins/xe_official/css/white.css b/widgets/planet_document/skins/xe_official/css/white.css new file mode 100644 index 000000000..18179eef9 --- /dev/null +++ b/widgets/planet_document/skins/xe_official/css/white.css @@ -0,0 +1,34 @@ +@charset "utf-8"; + +.commentBody.myPlanet .comment .tongue{ margin:0 !important;} +.commentBody.myPlanet .comment .tongue .post, +.commentBody.myPlanet .comment .tongue .postScript, +.commentBody.myPlanet .comment .tongue .postExtra{ *zoom:1;} + +/* Comment Body */ +.commentBody{ margin:0 0 10px 0; *zoom:1; clear:both; overflow:hidden; width:100%; } + +.commentBody .comment{ margin:0 1px 0 0; padding:0; clear:both; *zoom:1; overflow:hidden;} + +.commentBody .comment .identity{ width:98px; height:98px; padding:0; float:left; margin:0 -98px 0 0; background:none; *zoom:1;} +.commentBody .comment .identity a{ position:relative; display:block; text-align:center; color:#fff !important; font-weight:bold; text-decoration:none; } +.commentBody .comment .identity a img{ display:block; border:1px solid #000;} +.commentBody .comment .identity a em{ position:absolute; width:96px; text-align:center; left:1px; bottom:1px; display:block; padding:5px 0; font-style:normal; background:#000; opacity:.6; filter:alpha(opacity=60); line-height:normal;} + +.commentBody .comment .tongue{ position:relative; margin-left:113px; *zoom:1;} +.commentBody .comment .tongue .post{ margin:0 0 7px 0; } +.commentBody .comment .tongue .post a { color:#06C;} +.commentBody .comment .tongue .post strong{ background:#f7b100; color:#000;} + +.commentBody .comment .tongue .postScript{ margin:0 0 5px 0; color:#999;} +.commentBody .comment .tongue .postScript strong{ letter-spacing:-1px; margin-right:5px;} + +.commentBody .comment .tongue .postExtra{ overflow:hidden; padding-top:5px; border-top:1px dotted #ccc; *zoom:1;} +.commentBody .comment .tongue .postExtra *{ margin:0; padding:0;} +.commentBody .comment .tongue .postExtra .tag { float:left;} +.commentBody .comment .tongue .postExtra .tag .time{ display:inline; margin-right:5px; color:#999; } +.commentBody .comment .tongue .postExtra .tag dl{ display:inline;} +.commentBody .comment .tongue .postExtra .tag dt{ text-align:center; padding:0 7px; margin-right:5px; display:inline; background:url(../images/bgTag.gif) no-repeat center; font:bold 8pt Tahoma; color:#fff;} +.commentBody .comment .tongue .postExtra .tag dd{ display:inline; position:relative;} +.commentBody .comment .tongue .postExtra .tag dd.tagRead a{ position:relative; margin-right:2px; color:#999; text-decoration:none;} +.commentBody .comment .tongue .postExtra .tag dd.tagRead a strong{ background:#f7b100; color:#fff;} diff --git a/widgets/planet_document/skins/xe_official/images/bgTag.gif b/widgets/planet_document/skins/xe_official/images/bgTag.gif new file mode 100644 index 0000000000000000000000000000000000000000..4d3f187fa8502d448043b9193d94d1855580ce33 GIT binary patch literal 152 zcmV;J0B8S4Nk%w1VI%+z0J8u9!NI}M(9qG*(Y(C8?(XjW{r%R~*75Q2z`(%T+S>B+ z^3>GS-QC^({{H{}|GK)mA^8LV00000EC2ui03-kn000C<&`A}*yEyBOK~R!ZFau|v z*}ycCfxfTd5O94Gf~{+Uwf}(9Z#VD_ZGha-CZH{A1jpj}T8I)_)Hp*Vo7)Ob!1>zf5M!#>m`scS>hT| z5}cn_Ql40p%HWuipOmWLnVXoN8kCxtQdxL1)dr|&tEY=&NX4xro8o6Y%t9PYk2)Q6 zIFFp+*}_`i_`_1*IrB%W84AKvo-sbU>##?xBlX1t3APooMgi82Wt$bPUuX#IHsFzA zxLGUpY=Mr#wPcA3h9YON6OK!Hn%So`$*5R&$f%rlS#S3j3^P6 + + + + + + +
            + +
            + +

            {htmlspecialchars($item->nick_name)}{htmlspecialchars($item->get('nick_name'))}

            + +
            +
            + {$item->getContent()} +
            + +

            {$lang->planet_postscript} {htmlspecialchars($item->getPostScript())}

            + +
            +
            + + {@ $regdate = $item->get('regdate') } +

            {getTimeGap($item->get('regdate'), sprintf('y/m/d a H%s i%s', $lang->unit_hour,$lang->unit_min))}

            +
            +
            TAG
            +
            + + {htmlspecialchars($tag[$i])} + + +
            +
            +
            +
            +
            +
            + + +
            + diff --git a/widgets/planet_document/skins/xe_official/skin.xml b/widgets/planet_document/skins/xe_official/skin.xml new file mode 100644 index 000000000..cea7c958e --- /dev/null +++ b/widgets/planet_document/skins/xe_official/skin.xml @@ -0,0 +1,23 @@ + + + XE 공식 레이아웃용 플래닛 글 스킨 + + 플래닛 글들을 출력하는 위젯 스킨입니다. + + 0.1 + 2008-12-24 + http://www.zeroboard.com + + + zero + + + + 흰색 바탕용 + 白い背景用 + 白色背景 + White Background + 白色背景 + + + From d14798b9b33d422347257a9eda30955f5bf0b1ad Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 07:48:50 +0000 Subject: [PATCH 24/82] =?UTF-8?q?rss=20=EC=9C=84=EC=A0=AF=EC=97=90=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=20=EC=9E=90=EB=A5=B4=EA=B8=B0=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5177 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/rss_reader/conf/info.xml | 19 ++++++++++++++++++- widgets/rss_reader/rss_reader.class.php | 1 + .../rss_reader/skins/xe_official/list.html | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/widgets/rss_reader/conf/info.xml b/widgets/rss_reader/conf/info.xml index 201daf9ac..bb48dcbec 100644 --- a/widgets/rss_reader/conf/info.xml +++ b/widgets/rss_reader/conf/info.xml @@ -39,6 +39,23 @@ Это будет заголовком виджета. 顯示標題名稱。 + + text + 제목 글자수 + タイトルの文字数 + 标题字数 + Length of Subject + Número de letras del título + Длина темы + 標題字數 + 제목 글자수를 지정할 수 있습니다. (0또는 비워주시면 자르지 않습니다) + タイトルの文字数が指定できます(「0」または空欄の場合は、文字数を制限しません)。 + 可以设置标题的字数。(0或留空为不限) + Length of Subject can be assigned. (0 or blank value will not restrict the length) + El largo del título puede ser asignado. (valor 0 o en blanco no restringe el largo) + Длина темы может быть присвоена. (0 или пустое значение не будут ограничивать длину) + 可設置標題的字數。(0或留白為不限制) + text RSS URL @@ -100,4 +117,4 @@ 選擇面板時的高度。(預設是200px) - \ No newline at end of file + diff --git a/widgets/rss_reader/rss_reader.class.php b/widgets/rss_reader/rss_reader.class.php index 81e4aa0ca..539e49d59 100644 --- a/widgets/rss_reader/rss_reader.class.php +++ b/widgets/rss_reader/rss_reader.class.php @@ -90,6 +90,7 @@ $widget_info->rss_list = $rss_list; $widget_info->title = $title; $widget_info->rss_height = $args->rss_height ? $args->rss_height : 200; + $widget_info->subject_cut_size = $args->subject_cut_size; Context::set('widget_info', $widget_info); diff --git a/widgets/rss_reader/skins/xe_official/list.html b/widgets/rss_reader/skins/xe_official/list.html index 4c967bf77..381240b0e 100644 --- a/widgets/rss_reader/skins/xe_official/list.html +++ b/widgets/rss_reader/skins/xe_official/list.html @@ -13,7 +13,7 @@
          • {$item->date} - {htmlspecialchars($item->title)} + {htmlspecialchars(cut_str($item->title, $widget_info->subject_cut_size))}
          • From d988c93de830b3b9407534f8170644455810971f Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 07:59:17 +0000 Subject: [PATCH 25/82] =?UTF-8?q?=ED=94=8C=EB=9E=98=EB=8B=9B=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=EC=9D=98=20=ED=83=9C=EA=B7=B8=20=EC=97=B0=EA=B2=B0?= =?UTF-8?q?=EC=9D=84=20=EC=A0=95=EC=83=81=EC=A0=81=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5178 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/planet_document/skins/xe_official/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html index 47f1ff879..7536e72bf 100644 --- a/widgets/planet_document/skins/xe_official/list.html +++ b/widgets/planet_document/skins/xe_official/list.html @@ -29,7 +29,7 @@
            TAG
            - {htmlspecialchars($tag[$i])} + {htmlspecialchars($tag[$i])}
            From c9b6ba93381747a2561e03fa497a295214385ee8 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 09:26:58 +0000 Subject: [PATCH 26/82] git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5179 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/planet_document/skins/xe_official/css/white.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/planet_document/skins/xe_official/css/white.css b/widgets/planet_document/skins/xe_official/css/white.css index 18179eef9..e6ee3cb2b 100644 --- a/widgets/planet_document/skins/xe_official/css/white.css +++ b/widgets/planet_document/skins/xe_official/css/white.css @@ -11,7 +11,7 @@ .commentBody .comment{ margin:0 1px 0 0; padding:0; clear:both; *zoom:1; overflow:hidden;} .commentBody .comment .identity{ width:98px; height:98px; padding:0; float:left; margin:0 -98px 0 0; background:none; *zoom:1;} -.commentBody .comment .identity a{ position:relative; display:block; text-align:center; color:#fff !important; font-weight:bold; text-decoration:none; } +.commentBody .comment .identity a{ position:relative; font-size:12px; display:block; text-align:center; color:#fff !important; font-weight:bold; text-decoration:none; } .commentBody .comment .identity a img{ display:block; border:1px solid #000;} .commentBody .comment .identity a em{ position:absolute; width:96px; text-align:center; left:1px; bottom:1px; display:block; padding:5px 0; font-style:normal; background:#000; opacity:.6; filter:alpha(opacity=60); line-height:normal;} From ac70118473ec5a648c228a9b1e9d51fed30d76e9 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 24 Dec 2008 19:44:04 +0000 Subject: [PATCH 27/82] =?UTF-8?q?=ED=94=8C=EB=9E=98=EB=8B=9B=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=EC=9D=B4=20=EB=82=A0=EC=A7=9C=EC=97=90=20=EC=9D=98?= =?UTF-8?q?=ED=95=B4=20=EC=BB=A8=ED=85=90=EC=B8=A0=EB=A5=BC=20=EA=B0=80?= =?UTF-8?q?=EC=A0=B8=EC=98=A4=EB=8A=94=20=EA=B2=83=EC=9D=84=20=EC=B5=9C?= =?UTF-8?q?=EC=8B=A0=20=EA=B8=80=EC=9D=84=20=EA=B0=80=EC=A0=B8=EC=98=A4?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5180 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/planet_document/planet_document.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/planet_document/planet_document.class.php b/widgets/planet_document/planet_document.class.php index 3a43f3780..398dbf548 100644 --- a/widgets/planet_document/planet_document.class.php +++ b/widgets/planet_document/planet_document.class.php @@ -25,7 +25,7 @@ // 플래닛 글 목록 구함 $oPlanetModel = &getModel('planet'); Context::set('planet', $planet = $oPlanetModel->getPlanet()); - $output = $oPlanetModel->getNewestContentList(null, $planet->getContentLastDay(), $page, $list_count, 'documents.list_order', 'asc', null); + $output = $oPlanetModel->getContentList(null, 'content', '', 1, $list_count); Context::set('planet_list', $output->data); // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) From a8b20c5df9282079c0b2b9746ef78cabac38c0b2 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 03:19:16 +0000 Subject: [PATCH 28/82] =?UTF-8?q?=ED=94=8C=EB=9E=98=EB=8B=9B=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=B6=94=EA=B0=80.?= =?UTF-8?q?=20=ED=94=8C=EB=9E=98=EB=8B=9B=20=EC=82=AC=EC=A7=84=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EB=B0=9B=EC=95=84=EC=98=AC=EB=95=8C=20wid?= =?UTF-8?q?th/height=EC=A7=80=EC=A0=95=ED=95=A0=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5181 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/planet.info.php | 4 +- modules/planet/planet.item.php | 4 +- modules/planet/planet.model.php | 20 +++++--- .../skins/xe_official/css/white.css | 46 ++++++------------ .../skins/xe_official/images/tooltip.gif | Bin 0 -> 119 bytes .../skins/xe_official/list.html | 45 +++++------------ 6 files changed, 45 insertions(+), 74 deletions(-) create mode 100644 widgets/planet_document/skins/xe_official/images/tooltip.gif diff --git a/modules/planet/planet.info.php b/modules/planet/planet.info.php index f7c4ac44e..81a9f4639 100644 --- a/modules/planet/planet.info.php +++ b/modules/planet/planet.info.php @@ -67,10 +67,10 @@ return $this->get('planet_title'); } - function getPhotoSrc() { + function getPhotoSrc($width=96,$height=96) { if(!$this->isExists()) return; $oPlanetModel = &getModel('planet'); - return $oPlanetModel->getPlanetPhotoSrc($this->planet_srl); + return $oPlanetModel->getPlanetPhotoSrc($this->planet_srl, $width, $height); } function getMid() { diff --git a/modules/planet/planet.item.php b/modules/planet/planet.item.php index 85875be21..5e0950435 100644 --- a/modules/planet/planet.item.php +++ b/modules/planet/planet.item.php @@ -40,9 +40,9 @@ } } - function getPlanetPhotoSrc() { + function getPlanetPhotoSrc($width=96,$height=96) { $oPlanetModel = &getModel('planet'); - return $oPlanetModel->getPlanetPhotoSrc($this->get('module_srl')); + return $oPlanetModel->getPlanetPhotoSrc($this->get('module_srl'), $width, $height); } function getPlanetMid() { diff --git a/modules/planet/planet.model.php b/modules/planet/planet.model.php index 516d57150..982fb5150 100644 --- a/modules/planet/planet.model.php +++ b/modules/planet/planet.model.php @@ -502,13 +502,21 @@ /** * @brief 플래닛 이미지 유무 체크후 경로 return **/ - function getPlanetPhotoSrc($module_srl) { + function getPlanetPhotoSrc($module_srl, $width=96,$height=96) { $path = $this->getPlanetPhotoPath($module_srl); - if(!is_dir($path)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif'); - $filename = sprintf('%s/%d.jpg', $path, $module_srl); - if(!file_exists($filename)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif'); - $src = Context::getRequestUri().$filename."?rnd=".filemtime($filename); - return $src; + $source_filename = sprintf('%s/%d.jpg', $path, $module_srl); + + if(!is_dir($path) || !file_exists($source_filename)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif'); + + if($width!=96&&$height!=96) { + $filename = sprintf('%s%d.%d.%d.jpg', $path, $module_srl, $width, $height); + if(!file_exists($filename) && FileHandler::createImageFile($source_filename, $filename, $width, $height)) { + $source_filename = $filename; + } + } else { + $filename = $source_filename; + } + return Context::getRequestUri().$filename."?rnd=".filemtime($filename); } /** diff --git a/widgets/planet_document/skins/xe_official/css/white.css b/widgets/planet_document/skins/xe_official/css/white.css index e6ee3cb2b..21ff62798 100644 --- a/widgets/planet_document/skins/xe_official/css/white.css +++ b/widgets/planet_document/skins/xe_official/css/white.css @@ -1,34 +1,18 @@ @charset "utf-8"; -.commentBody.myPlanet .comment .tongue{ margin:0 !important;} -.commentBody.myPlanet .comment .tongue .post, -.commentBody.myPlanet .comment .tongue .postScript, -.commentBody.myPlanet .comment .tongue .postExtra{ *zoom:1;} +.planetDocument { overflow:hidden; margin-bottom:5px; *zoom:1;} +.planetDocument .identity { width:52px; height:52px; padding:0; float:left; margin:3px 10px 3px 3px; background:none; *zoom:1; overflow:hidden;} +.planetDocument .identity a img{ display:block; border:1px solid #545554;} -/* Comment Body */ -.commentBody{ margin:0 0 10px 0; *zoom:1; clear:both; overflow:hidden; width:100%; } - -.commentBody .comment{ margin:0 1px 0 0; padding:0; clear:both; *zoom:1; overflow:hidden;} - -.commentBody .comment .identity{ width:98px; height:98px; padding:0; float:left; margin:0 -98px 0 0; background:none; *zoom:1;} -.commentBody .comment .identity a{ position:relative; font-size:12px; display:block; text-align:center; color:#fff !important; font-weight:bold; text-decoration:none; } -.commentBody .comment .identity a img{ display:block; border:1px solid #000;} -.commentBody .comment .identity a em{ position:absolute; width:96px; text-align:center; left:1px; bottom:1px; display:block; padding:5px 0; font-style:normal; background:#000; opacity:.6; filter:alpha(opacity=60); line-height:normal;} - -.commentBody .comment .tongue{ position:relative; margin-left:113px; *zoom:1;} -.commentBody .comment .tongue .post{ margin:0 0 7px 0; } -.commentBody .comment .tongue .post a { color:#06C;} -.commentBody .comment .tongue .post strong{ background:#f7b100; color:#000;} - -.commentBody .comment .tongue .postScript{ margin:0 0 5px 0; color:#999;} -.commentBody .comment .tongue .postScript strong{ letter-spacing:-1px; margin-right:5px;} - -.commentBody .comment .tongue .postExtra{ overflow:hidden; padding-top:5px; border-top:1px dotted #ccc; *zoom:1;} -.commentBody .comment .tongue .postExtra *{ margin:0; padding:0;} -.commentBody .comment .tongue .postExtra .tag { float:left;} -.commentBody .comment .tongue .postExtra .tag .time{ display:inline; margin-right:5px; color:#999; } -.commentBody .comment .tongue .postExtra .tag dl{ display:inline;} -.commentBody .comment .tongue .postExtra .tag dt{ text-align:center; padding:0 7px; margin-right:5px; display:inline; background:url(../images/bgTag.gif) no-repeat center; font:bold 8pt Tahoma; color:#fff;} -.commentBody .comment .tongue .postExtra .tag dd{ display:inline; position:relative;} -.commentBody .comment .tongue .postExtra .tag dd.tagRead a{ position:relative; margin-right:2px; color:#999; text-decoration:none;} -.commentBody .comment .tongue .postExtra .tag dd.tagRead a strong{ background:#f7b100; color:#fff;} +.planetDocument .article { position:relative; overflow:hidden; *zoom:1; margin-top:3px; } +.planetDocument .article .tooltipLT, +.planetDocument .article .tooltipRT, +.planetDocument .article .tooltipLB, +.planetDocument .article .tooltipRB { position:absolute; background:url("../images/tooltip.gif") no-repeat; display:block; width:10px; height:10px; z-index:10; background-color:#FFFFFF; overflow:hidden; } +.planetDocument .article .tooltipArrow { position:absolute; background:url("../images/tooltip.gif") no-repeat left -20px; width:7px; height:4px; left:0; top:10px; z-index:10;} +.planetDocument .article .tooltipLT { left:4px; top:0px; background-position:0 0; } +.planetDocument .article .tooltipRT { right:0px; _right:-1px; top:0px; background-position:-10px 0; } +.planetDocument .article .tooltipLB { left:4px; bottom:0px; background-position:left -10px; } +.planetDocument .article .tooltipRB { right:0px; _right:-1px; bottom:0px; background-position:-10px -10px; } +.planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; height:30px; } +.planetDocument .article .content div { line-height:1.4; } diff --git a/widgets/planet_document/skins/xe_official/images/tooltip.gif b/widgets/planet_document/skins/xe_official/images/tooltip.gif new file mode 100644 index 0000000000000000000000000000000000000000..fdac70738f393ebf9dfb9ed446042baaf07ff094 GIT binary patch literal 119 zcmZ?wbhEHb6k(8Jn8?Hs5*qR!3>X*~6o0ZXGB7YP=m6OaAbAERk16^Kx@)Btg}ggy zt$o0zVO!~)^p-~v^X{gvl6caWD|7IR$>ncvRcqcqp4hZ8@l@)TIg>hKdtXKvXz{NS TP3oPsX%_EvuD@OUtPIuwJAW{N literal 0 HcmV?d00001 diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html index 7536e72bf..62ccfd982 100644 --- a/widgets/planet_document/skins/xe_official/list.html +++ b/widgets/planet_document/skins/xe_official/list.html @@ -7,38 +7,17 @@ -
            - -
            - -

            {htmlspecialchars($item->nick_name)}{htmlspecialchars($item->get('nick_name'))}

            - -
            -
            - {$item->getContent()} -
            - -

            {$lang->planet_postscript} {htmlspecialchars($item->getPostScript())}

            - -
            -
            - - {@ $regdate = $item->get('regdate') } -

            {getTimeGap($item->get('regdate'), sprintf('y/m/d a H%s i%s', $lang->unit_hour,$lang->unit_min))}

            -
            -
            TAG
            -
            - - {htmlspecialchars($tag[$i])} - - -
            -
            -
            -
            -
            -
            - - +
            + +

            {htmlspecialchars($item->nick_name)}

            + +
            + {$item->getContent()} + + + + + +
            From 67480e6e2c62b053027a44e497b37668b090b269 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 05:12:02 +0000 Subject: [PATCH 29/82] =?UTF-8?q?planet=20=EB=AC=B8=EC=84=9C=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=20css/=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC=ED=95=98=EA=B3=A0=20black=20=EB=B0=94=ED=83=95?= =?UTF-8?q?=EC=9A=A9=20=EC=BB=AC=EB=9F=AC=EC=85=8B=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5182 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/page/tpl/css/page.css | 2 +- modules/planet/planet.model.php | 2 +- .../skins/xe_official/images/bgTag.gif | Bin 152 -> 0 bytes .../skins/xe_official/images/bgTag.png | Bin 291 -> 0 bytes .../skins/xe_official/images/tooltip.gif | Bin 119 -> 0 bytes .../skins/xe_official/list.html | 10 ++------- .../skins/xe_official/skin.xml | 7 ++++++ .../xe_official/{css/white.css => style.css} | 20 ++++++++++++++---- .../skins/xe_official/tooltip.gif | Bin 0 -> 229 bytes 9 files changed, 27 insertions(+), 14 deletions(-) delete mode 100644 widgets/planet_document/skins/xe_official/images/bgTag.gif delete mode 100644 widgets/planet_document/skins/xe_official/images/bgTag.png delete mode 100644 widgets/planet_document/skins/xe_official/images/tooltip.gif rename widgets/planet_document/skins/xe_official/{css/white.css => style.css} (51%) create mode 100755 widgets/planet_document/skins/xe_official/tooltip.gif diff --git a/modules/page/tpl/css/page.css b/modules/page/tpl/css/page.css index 3e654f17a..411c16a66 100644 --- a/modules/page/tpl/css/page.css +++ b/modules/page/tpl/css/page.css @@ -1,7 +1,7 @@ @charset "utf-8"; h3 { margin:0 10px 0 10px; } -.adminLayer { margin-top:30px; } +.adminLayer { margin-top:30px; background-color:#fff;} .buttonBox { border:2px solid #EEEEEE; padding:5px; overflow:hidden; *zoom:1;} .buttonBox .fr { height:28px; } diff --git a/modules/planet/planet.model.php b/modules/planet/planet.model.php index 982fb5150..28a2c2a46 100644 --- a/modules/planet/planet.model.php +++ b/modules/planet/planet.model.php @@ -154,7 +154,7 @@ /** * @brief 플래닛 개별 정보 return **/ - function getPlanet($module_srl) { + function getPlanet($module_srl=0) { return new PlanetInfo($module_srl); } diff --git a/widgets/planet_document/skins/xe_official/images/bgTag.gif b/widgets/planet_document/skins/xe_official/images/bgTag.gif deleted file mode 100644 index 4d3f187fa8502d448043b9193d94d1855580ce33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 152 zcmV;J0B8S4Nk%w1VI%+z0J8u9!NI}M(9qG*(Y(C8?(XjW{r%R~*75Q2z`(%T+S>B+ z^3>GS-QC^({{H{}|GK)mA^8LV00000EC2ui03-kn000C<&`A}*yEyBOK~R!ZFau|v z*}ycCfxfTd5O94Gf~{+Uwf}(9Z#VD_ZGha-CZH{A1jpj}T8I)_)Hp*Vo7)Ob!1>zf5M!#>m`scS>hT| z5}cn_Ql40p%HWuipOmWLnVXoN8kCxtQdxL1)dr|&tEY=&NX4xro8o6Y%t9PYk2)Q6 zIFFp+*}_`i_`_1*IrB%W84AKvo-sbU>##?xBlX1t3APooMgi82Wt$bPUuX#IHsFzA zxLGUpY=Mr#wPcA3h9YON6OK!Hn%So`$*5R&$f%rlS#S3j3^P6X*~6o0ZXGB7YP=m6OaAbAERk16^Kx@)Btg}ggy zt$o0zVO!~)^p-~v^X{gvl6caWD|7IR$>ncvRcqcqp4hZ8@l@)TIg>hKdtXKvXz{NS TP3oPsX%_EvuD@OUtPIuwJAW{N diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html index 62ccfd982..152f05820 100644 --- a/widgets/planet_document/skins/xe_official/list.html +++ b/widgets/planet_document/skins/xe_official/list.html @@ -1,13 +1,7 @@ -{@ $colorset = "white"} - - - - - - + -
            +

            {htmlspecialchars($item->nick_name)}

            diff --git a/widgets/planet_document/skins/xe_official/skin.xml b/widgets/planet_document/skins/xe_official/skin.xml index cea7c958e..c24f5b8bb 100644 --- a/widgets/planet_document/skins/xe_official/skin.xml +++ b/widgets/planet_document/skins/xe_official/skin.xml @@ -19,5 +19,12 @@ White Background 白色背景 + + 어두운 바탕용 + 暗い背景用 + 暗色背景 + Dark Background + 暗色背景 + diff --git a/widgets/planet_document/skins/xe_official/css/white.css b/widgets/planet_document/skins/xe_official/style.css similarity index 51% rename from widgets/planet_document/skins/xe_official/css/white.css rename to widgets/planet_document/skins/xe_official/style.css index 21ff62798..24df035f8 100644 --- a/widgets/planet_document/skins/xe_official/css/white.css +++ b/widgets/planet_document/skins/xe_official/style.css @@ -8,11 +8,23 @@ .planetDocument .article .tooltipLT, .planetDocument .article .tooltipRT, .planetDocument .article .tooltipLB, -.planetDocument .article .tooltipRB { position:absolute; background:url("../images/tooltip.gif") no-repeat; display:block; width:10px; height:10px; z-index:10; background-color:#FFFFFF; overflow:hidden; } -.planetDocument .article .tooltipArrow { position:absolute; background:url("../images/tooltip.gif") no-repeat left -20px; width:7px; height:4px; left:0; top:10px; z-index:10;} +.planetDocument .article .tooltipRB { position:absolute; background:url("./tooltip.gif") no-repeat; display:block; width:10px; height:10px; z-index:10; background-color:#FFFFFF; overflow:hidden; } +.planetDocument .article .tooltipArrow { position:absolute; background:url("./tooltip.gif") no-repeat left -20px; width:7px; height:4px; left:0; top:10px; z-index:10;} .planetDocument .article .tooltipLT { left:4px; top:0px; background-position:0 0; } .planetDocument .article .tooltipRT { right:0px; _right:-1px; top:0px; background-position:-10px 0; } -.planetDocument .article .tooltipLB { left:4px; bottom:0px; background-position:left -10px; } +.planetDocument .article .tooltipLB { left:4px; bottom:0px; background-position:0 -10px; } .planetDocument .article .tooltipRB { right:0px; _right:-1px; bottom:0px; background-position:-10px -10px; } -.planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; height:30px; } +.planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; } .planetDocument .article .content div { line-height:1.4; } + +.planetDocument .article .tooltipLT, +.planetDocument .article .tooltipRT, +.planetDocument .article .tooltipLB, +.planetDocument .article .tooltipRB { background-color:#000; } +.planetDocument.black .article .tooltipLT { background-position:0 -25px; } +.planetDocument.black .article .tooltipRT { top:0px; background-position:-10px -25px; } +.planetDocument.black .article .tooltipLB { background-position:0 -35px; } +.planetDocument.black .article .tooltipRB { bottom:0px; background-position:-10px -35px; } +.planetDocument.black .article .tooltipArrow { background-position:left -45px; } +.planetDocument.black .article .content { border:1px solid #ABAAAB; } +.planetDocument.black .article .content div { color:#aaa;} diff --git a/widgets/planet_document/skins/xe_official/tooltip.gif b/widgets/planet_document/skins/xe_official/tooltip.gif new file mode 100755 index 0000000000000000000000000000000000000000..1692e4740d92c786ae7516c8f4f94a493b521cdd GIT binary patch literal 229 zcmZ?wbhEHb6k#x8Sj5f{5*iW;0wF-Kdev$M28RD&p!k!8k%57oK?f+p08-1qysBcC zxsfuDo4ABpcKGxQ53VI9S{lZ$WSaL%>dnM`3l%QwwX8lDXSYuvLCl1Q!Bucm1(yo5 z?)+ZIMRPSmuWnKP8EegT&_LlvQ}P2ogV>9yHx~2DAT)nJjh9^|DPZ z9V{a49i7}gy?yKxCN_6XnL2I8%-WhcowMi6n?Gww%k*V)xfV|BTD@#t|NM Date: Fri, 26 Dec 2008 05:13:07 +0000 Subject: [PATCH 30/82] =?UTF-8?q?planet=20document=20=EC=9C=84=EC=A0=AF=20?= =?UTF-8?q?css=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5183 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/planet_document/skins/xe_official/style.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/planet_document/skins/xe_official/style.css b/widgets/planet_document/skins/xe_official/style.css index 24df035f8..3611f9a40 100644 --- a/widgets/planet_document/skins/xe_official/style.css +++ b/widgets/planet_document/skins/xe_official/style.css @@ -17,10 +17,10 @@ .planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; } .planetDocument .article .content div { line-height:1.4; } -.planetDocument .article .tooltipLT, -.planetDocument .article .tooltipRT, -.planetDocument .article .tooltipLB, -.planetDocument .article .tooltipRB { background-color:#000; } +.planetDocument.black .article .tooltipLT, +.planetDocument.black .article .tooltipRT, +.planetDocument.black .article .tooltipLB, +.planetDocument.black .article .tooltipRB { background-color:#000; } .planetDocument.black .article .tooltipLT { background-position:0 -25px; } .planetDocument.black .article .tooltipRT { top:0px; background-position:-10px -25px; } .planetDocument.black .article .tooltipLB { background-position:0 -35px; } From 9903396d8384ab3425203b2b978b4e5e0860910a Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 05:21:46 +0000 Subject: [PATCH 31/82] =?UTF-8?q?planet=20document=20=EC=9C=84=EC=A0=AF=20?= =?UTF-8?q?css=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5184 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../planet_document/skins/xe_official/list.html | 12 ++++++------ .../planet_document/skins/xe_official/style.css | 15 ++++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html index 152f05820..6e0db9eb2 100644 --- a/widgets/planet_document/skins/xe_official/list.html +++ b/widgets/planet_document/skins/xe_official/list.html @@ -6,12 +6,12 @@

            {htmlspecialchars($item->nick_name)}

            - {$item->getContent()} - - - - - + + + + + + {$item->getContent()}
            diff --git a/widgets/planet_document/skins/xe_official/style.css b/widgets/planet_document/skins/xe_official/style.css index 3611f9a40..e1e68a7fe 100644 --- a/widgets/planet_document/skins/xe_official/style.css +++ b/widgets/planet_document/skins/xe_official/style.css @@ -4,18 +4,18 @@ .planetDocument .identity { width:52px; height:52px; padding:0; float:left; margin:3px 10px 3px 3px; background:none; *zoom:1; overflow:hidden;} .planetDocument .identity a img{ display:block; border:1px solid #545554;} -.planetDocument .article { position:relative; overflow:hidden; *zoom:1; margin-top:3px; } +.planetDocument .article { position:relative; overflow:hidden; *zoom:1; margin:3px 0 0 0; padding:0; } .planetDocument .article .tooltipLT, .planetDocument .article .tooltipRT, .planetDocument .article .tooltipLB, -.planetDocument .article .tooltipRB { position:absolute; background:url("./tooltip.gif") no-repeat; display:block; width:10px; height:10px; z-index:10; background-color:#FFFFFF; overflow:hidden; } -.planetDocument .article .tooltipArrow { position:absolute; background:url("./tooltip.gif") no-repeat left -20px; width:7px; height:4px; left:0; top:10px; z-index:10;} +.planetDocument .article .tooltipRB { position:absolute; background:url("./tooltip.gif") no-repeat; display:block; width:10px; height:10px; z-index:10; background-color:#FFFFFF; overflow:hidden; padding:0; margin:0;} +.planetDocument .article .tooltipArrow { position:absolute; background:url("./tooltip.gif") no-repeat left -20px; width:7px; height:4px; left:0; top:10px; z-index:10; overflow:hidden; } .planetDocument .article .tooltipLT { left:4px; top:0px; background-position:0 0; } -.planetDocument .article .tooltipRT { right:0px; _right:-1px; top:0px; background-position:-10px 0; } +.planetDocument .article .tooltipRT { right:0px; top:0px; _right:-1px; background-position:-10px 0; } .planetDocument .article .tooltipLB { left:4px; bottom:0px; background-position:0 -10px; } -.planetDocument .article .tooltipRB { right:0px; _right:-1px; bottom:0px; background-position:-10px -10px; } -.planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; } -.planetDocument .article .content div { line-height:1.4; } +.planetDocument .article .tooltipRB { right:0px; bottom:0px; _right:-1px; background-position:-10px -10px; } +.planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; line-height:100%;} +.planetDocument .article .content div { line-height:1.3; } .planetDocument.black .article .tooltipLT, .planetDocument.black .article .tooltipRT, @@ -28,3 +28,4 @@ .planetDocument.black .article .tooltipArrow { background-position:left -45px; } .planetDocument.black .article .content { border:1px solid #ABAAAB; } .planetDocument.black .article .content div { color:#aaa;} +.planetDocument.black .article .content div a { color:#aaa;} From 66a8118e54211c972060d2652a84b3924ea6b267 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 05:48:25 +0000 Subject: [PATCH 32/82] =?UTF-8?q?=EC=BB=A8=ED=85=90=EC=B8=A0=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=ED=95=98=EC=9C=84=20=ED=98=B8=ED=99=98=EB=95=8C?= =?UTF-8?q?=EB=AC=B8=EC=97=90=20=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EB=A7=8E=EC=9D=80=20=EC=88=98=EC=9D=98=20=EB=82=B4=EC=9A=A9?= =?UTF-8?q?=EC=9D=B4=20=EB=93=B1=EB=A1=9D=EC=95=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5185 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/widget/tpl/js/widget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/widget/tpl/js/widget.js b/modules/widget/tpl/js/widget.js index 754290313..ca42e4092 100644 --- a/modules/widget/tpl/js/widget.js +++ b/modules/widget/tpl/js/widget.js @@ -126,6 +126,7 @@ function getContentWidgetCode(childObj, widget) { if(cobj.nodeName == "DIV" && cobj.className == "widgetContent") { var body = xInnerHtml(cobj); var document_srl = childObj.getAttribute('document_srl'); + if(document_srl>0) body = ''; return ''; } cobj = cobj.nextSibling; From e577680a3a1520e8c686c4f51116be786cb8e542 Mon Sep 17 00:00:00 2001 From: haneul Date: Fri, 26 Dec 2008 06:32:13 +0000 Subject: [PATCH 33/82] #17579220 : fixed the error occurred when changeset was empty git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5186 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/issuetracker.model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/issuetracker/issuetracker.model.php b/modules/issuetracker/issuetracker.model.php index 6112b94d9..5c46fd151 100644 --- a/modules/issuetracker/issuetracker.model.php +++ b/modules/issuetracker/issuetracker.model.php @@ -398,6 +398,10 @@ debugPrint($output); return array(); } + if(!$output->data) + { + $output->data = array(); + } foreach($output->data as $key => $changeset) { $changeset->message = $this->_linkXE($changeset->message); From b492cbd2e64e3a8229d5d530a0ebf86423566d78 Mon Sep 17 00:00:00 2001 From: haneul Date: Fri, 26 Dec 2008 06:44:33 +0000 Subject: [PATCH 34/82] #17579294 : change to sync by 500 items git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5187 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/issuetracker.controller.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/issuetracker/issuetracker.controller.php b/modules/issuetracker/issuetracker.controller.php index a4e77cb0a..c6f5cb0fa 100644 --- a/modules/issuetracker/issuetracker.controller.php +++ b/modules/issuetracker/issuetracker.controller.php @@ -391,12 +391,15 @@ $oSvn = new Svn($module_info->svn_url, $module_info->svn_cmd, $module_info->diff_cmd); $oModel = &getModel('issuetracker'); $status = $oSvn->getStatus(); + if(!$status || !$status->revision) return; $latestRevision = $oModel->getLatestRevision($module_info->module_srl); $oController = &getController('issuetracker'); - if($latestRevision < $status->revision) + while($latestRevision < $status->revision) { - $logs = $oSvn->getLog("/", $latestRevision+1, $status->revision, false, $status->revision-$latestRevision, false); + $gap = $status->revision-$latestRevision; + if($gap > 500) $gap = 500; + $logs = $oSvn->getLog("/", $latestRevision+1, $status->revision, false, $gap, false); foreach($logs as $log) { $obj = null; @@ -407,6 +410,7 @@ $obj->module_srl = $module_info->module_srl; executeQuery("issuetracker.insertChangeset", $obj); } + $latestRevision = $oModel->getLatestRevision($module_info->module_srl); } } From 0d856c90d9832321c8e3cbb8da382c8950c3ba2d Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 07:58:50 +0000 Subject: [PATCH 35/82] =?UTF-8?q?1.=20=ED=94=8C=EB=9E=98=EB=8B=9B=20?= =?UTF-8?q?=EA=B8=80=20=EC=9C=84=EC=A0=AF=EC=97=90=20=ED=94=8C=EB=9E=98?= =?UTF-8?q?=EB=8B=9B=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B0=80=EB=A1=9C/?= =?UTF-8?q?=EC=84=B8=EB=A1=9C=20=ED=81=AC=EA=B8=B0=20=EC=A7=80=EC=A0=95?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EA=B8=B4?= =?UTF-8?q?=EC=A6=9D=20=EC=B6=94=EA=B0=80.=202.=20=EC=B5=9C=EA=B7=BC?= =?UTF-8?q?=EA=B8=80/=EC=B5=9C=EA=B7=BC=EB=8C=93=EA=B8=80=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=EC=9D=98=20xe=5Fofficial=20=EC=8A=A4=ED=82=A8?= =?UTF-8?q?=EC=97=90=20=EB=82=A0=EC=A7=9C=20=ED=91=9C=EC=8B=9C=20=EC=88=A8?= =?UTF-8?q?=EA=B8=B0=EA=B1=B0=EB=82=98=20=ED=91=9C=EC=8B=9C=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5188 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/newest_comment/conf/info.xml | 30 +++++++++++++++- .../newest_comment/newest_comment.class.php | 1 + .../skins/xe_official/list.html | 2 ++ widgets/newest_document/conf/info.xml | 28 +++++++++++++++ .../newest_document/newest_document.class.php | 1 + .../skins/xe_official/list.html | 2 ++ widgets/newest_images/conf/info.xml | 34 +++++++++---------- widgets/planet_document/conf/info.xml | 32 +++++++++++++++++ .../planet_document/planet_document.class.php | 6 ++++ .../skins/xe_official/list.html | 2 +- .../skins/xe_official/style.css | 2 +- 11 files changed, 120 insertions(+), 20 deletions(-) diff --git a/widgets/newest_comment/conf/info.xml b/widgets/newest_comment/conf/info.xml index ee3bd837c..6ee41af73 100644 --- a/widgets/newest_comment/conf/info.xml +++ b/widgets/newest_comment/conf/info.xml @@ -80,6 +80,34 @@ Длина темы может быть присвоена. (0 или пустое значение не будут ограничивать длину) 可設置標題的字數。(0或留白為不限制) + + select + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Display Registered Date + 顯示發表日期 + + Y + 출력 + display + 表示 + 显示 + display + 顯示 + + + N + 출력하지 않음 + not display + 非表示 + 不显示 + not display + 隱藏 + + + mid_list 대상 모듈 @@ -98,4 +126,4 @@ 將所選擇的模組作為目標。 - \ No newline at end of file + diff --git a/widgets/newest_comment/newest_comment.class.php b/widgets/newest_comment/newest_comment.class.php index cba7a30e6..7893c5c58 100644 --- a/widgets/newest_comment/newest_comment.class.php +++ b/widgets/newest_comment/newest_comment.class.php @@ -55,6 +55,7 @@ $widget_info->title = $title; $widget_info->comment_list = $output; $widget_info->subject_cut_size = $subject_cut_size; + $widget_info->display_regdate = $args->display_regdate=='N'?'N':'Y'; Context::set('widget_info', $widget_info); diff --git a/widgets/newest_comment/skins/xe_official/list.html b/widgets/newest_comment/skins/xe_official/list.html index 1f3bfeadc..a9abff741 100644 --- a/widgets/newest_comment/skins/xe_official/list.html +++ b/widgets/newest_comment/skins/xe_official/list.html @@ -13,7 +13,9 @@
            • + {$val->getRegdate("Y-m-d")} + {$val->getSummary($widget_info->subject_cut_size)} diff --git a/widgets/newest_document/conf/info.xml b/widgets/newest_document/conf/info.xml index ba467f5e2..c37a789af 100644 --- a/widgets/newest_document/conf/info.xml +++ b/widgets/newest_document/conf/info.xml @@ -168,6 +168,34 @@ Длина темы может быть присвоена. (0 или пустое значение не будут ограничивать длину) 可設置標題的字數。(0或留白為不限制) + + select + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Display Registered Date + 顯示發表日期 + + Y + 출력 + display + 表示 + 显示 + display + 顯示 + + + N + 출력하지 않음 + not display + 非表示 + 不显示 + not display + 隱藏 + + + mid_list 대상 모듈 diff --git a/widgets/newest_document/newest_document.class.php b/widgets/newest_document/newest_document.class.php index faf7b6eed..e7d48d0f6 100644 --- a/widgets/newest_document/newest_document.class.php +++ b/widgets/newest_document/newest_document.class.php @@ -96,6 +96,7 @@ $widget_info->document_list = $document_list; $widget_info->subject_cut_size = $subject_cut_size; $widget_info->duration_new = $duration_new * 60*60; + $widget_info->display_regdate = $args->display_regdate=='N'?'N':'Y'; Context::set('widget_info', $widget_info); diff --git a/widgets/newest_document/skins/xe_official/list.html b/widgets/newest_document/skins/xe_official/list.html index 55026623c..7ab25d6f7 100644 --- a/widgets/newest_document/skins/xe_official/list.html +++ b/widgets/newest_document/skins/xe_official/list.html @@ -12,7 +12,9 @@
              • + {$oDocument->getRegdate("Y-m-d")} + {$oDocument->getTitle($widget_info->subject_cut_size)} diff --git a/widgets/newest_images/conf/info.xml b/widgets/newest_images/conf/info.xml index cf467f2fc..86c8b097a 100644 --- a/widgets/newest_images/conf/info.xml +++ b/widgets/newest_images/conf/info.xml @@ -45,23 +45,6 @@ Это будет заголовком последних статей. 顯示最新主題列表的標題。 - - mid_list - 대상 모듈 - モジュール - 对象模块 - Target Module - Objetivo Módulo - Модуль назначения - 目標模組 - 선택하신 모듈에 등록된 글을 대상으로 합니다. - チェックされたコンテンツを対象とします。 - 把被选模块中的主题作为对象。 - Articles on chosen module will be the target. - Objetivo de los documentos será los del módulo seleccionado. - Статьи на выбранных модулях будут назначением. - 將所選擇的模組作為目標。 - text 글 제목 길이 @@ -302,5 +285,22 @@ 隱藏 + + mid_list + 대상 모듈 + モジュール + 对象模块 + Target Module + Objetivo Módulo + Модуль назначения + 目標模組 + 선택하신 모듈에 등록된 글을 대상으로 합니다. + チェックされたコンテンツを対象とします。 + 把被选模块中的主题作为对象。 + Articles on chosen module will be the target. + Objetivo de los documentos será los del módulo seleccionado. + Статьи на выбранных модулях будут назначением. + 將所選擇的模組作為目標。 + diff --git a/widgets/planet_document/conf/info.xml b/widgets/planet_document/conf/info.xml index fd28b0b95..062a3d021 100644 --- a/widgets/planet_document/conf/info.xml +++ b/widgets/planet_document/conf/info.xml @@ -44,5 +44,37 @@ Вы можете выбрать число списка статей для отображения. (стандарт: 5) 設置要顯示的目錄數。(預設是5個) + + text + 이미지 가로크기 + イメージ横幅 + 宽度 + Width of Image + Ancho de la imagen + Ширина изображения + 圖片寬度 + 출력될 이미지의 가로크기를 정하실 수 있습니다. (기본 50) + 表示されるイメージの横幅のサイズを指定することができます(デフォルト50)。 + 可以指定要显示的图片宽度。(默认为50) + You can set the width of image. (50 as default) + Usted puede definir el ancho de la imagen. (predefinido:50px) + Вы можете установить ширину изображения. (стандарт: 50px) + 指定顯示的圖片寬度。(預設是50) + + + text + 이미지 세로크기 + イメージ縦幅 + 高度 + Height of Image + Высота изображения + 圖片高度 + 이미지의 세로 크기를 지정할 수 있습니다. (기본 50px) + イメージの縦幅サイズを指定します(デフォルト 50px) + 可以指定图片高度。(默认为50px) + You can set the height of image. (50 as default) + Вы можете установить вытсоту изображения. (стандарт: 50px) + 指定圖片高度。(預設是50px) + diff --git a/widgets/planet_document/planet_document.class.php b/widgets/planet_document/planet_document.class.php index 398dbf548..afbb8904b 100644 --- a/widgets/planet_document/planet_document.class.php +++ b/widgets/planet_document/planet_document.class.php @@ -35,6 +35,12 @@ // 템플릿 파일을 지정 $tpl_file = 'list'; + if(!$args->thumbnail_width) $args->thumbnail_width = 50; + if(!$args->thumbnail_height) $args->thumbnail_height = 50; + $widget_info->thumbnail_width = $args->thumbnail_width; + $widget_info->thumbnail_height = $args->thumbnail_height; + Context::set('widget_info', $widget_info); + // 템플릿 컴파일 $oTemplate = &TemplateHandler::getInstance(); $output = $oTemplate->compile($tpl_path, $tpl_file); diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html index 6e0db9eb2..c36753aed 100644 --- a/widgets/planet_document/skins/xe_official/list.html +++ b/widgets/planet_document/skins/xe_official/list.html @@ -3,7 +3,7 @@
                -

                {htmlspecialchars($item->nick_name)}

                +

                {htmlspecialchars($item->nick_name)}

                diff --git a/widgets/planet_document/skins/xe_official/style.css b/widgets/planet_document/skins/xe_official/style.css index e1e68a7fe..7977fb80b 100644 --- a/widgets/planet_document/skins/xe_official/style.css +++ b/widgets/planet_document/skins/xe_official/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; .planetDocument { overflow:hidden; margin-bottom:5px; *zoom:1;} -.planetDocument .identity { width:52px; height:52px; padding:0; float:left; margin:3px 10px 3px 3px; background:none; *zoom:1; overflow:hidden;} +.planetDocument .identity { padding:0; float:left; margin:3px 10px 3px 3px; background:none; *zoom:1; overflow:hidden;} .planetDocument .identity a img{ display:block; border:1px solid #545554;} .planetDocument .article { position:relative; overflow:hidden; *zoom:1; margin:3px 0 0 0; padding:0; } From 2caa8b02ac18facad6fd9fac050b508d87ebb8fb Mon Sep 17 00:00:00 2001 From: haneul Date: Fri, 26 Dec 2008 08:39:12 +0000 Subject: [PATCH 36/82] #17579744 : change single quote to double quote git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5189 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/classes/svn.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/issuetracker/classes/svn.class.php b/modules/issuetracker/classes/svn.class.php index f4466d962..2f1edcd40 100644 --- a/modules/issuetracker/classes/svn.class.php +++ b/modules/issuetracker/classes/svn.class.php @@ -32,7 +32,7 @@ if(substr($path,0,1)=='/') $path = substr($path,1); if(strpos($path,'..')!==false) return; - $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 '%s%s'", $this->svn_cmd, $this->tmp_dir, $this->url, $path); + $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 \"%s%s\"", $this->svn_cmd, $this->tmp_dir, $this->url, $path); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); @@ -52,7 +52,7 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - "%s --non-interactive --config-dir %s list '%s%s'%s", + '%s --non-interactive --config-dir %s list "%s%s"%s', $this->svn_cmd, $this->tmp_dir, $this->url, @@ -94,7 +94,7 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - "%s --non-interactive --config-dir %s cat '%s%s'%s", + '%s --non-interactive --config-dir %s cat "%s%s"%s', $this->svn_cmd, $this->tmp_dir, $this->url, @@ -178,14 +178,14 @@ function getComp($path, $brev, $erev) { if(!$brev) { - $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 2 '%s%s@%d'", $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev); + $command = sprintf('%s --non-interactive --config-dir %s log --xml --limit 2 "%s%s@%d"', $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); $brev = $xmlDoc->log->logentry[1]->attrs->revision; if(!$brev) return; } - $command = sprintf("%s --non-interactive --config-dir %s diff '%s%s@%d' '%s%s@%d'", + $command = sprintf('%s --non-interactive --config-dir %s diff "%s%s@%d" "%s%s@%d"', $this->svn_cmd, $this->tmp_dir, $this->url, @@ -249,7 +249,7 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - "%s --non-interactive --config-dir %s log --xml %s %s %s '%s%s'", + '%s --non-interactive --config-dir %s log --xml %s %s %s "%s%s"', $this->svn_cmd, $this->tmp_dir, $quiet?'--quiet':'--verbose', From 4056eff5f6e4772167c8b93b6973fb5bcef4b9e7 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 08:51:31 +0000 Subject: [PATCH 37/82] =?UTF-8?q?ldap=20=EB=AA=A8=EB=93=88=20=EC=9D=B8?= =?UTF-8?q?=EC=A6=9D=EC=9D=84=20=EC=9C=84=ED=95=9C=20prefix=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=EB=A5=BC=20=EC=9E=85=EB=A0=A5=EB=B0=9B=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5190 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/ldap/lang/en.lang.php | 2 ++ modules/ldap/lang/jp.lang.php | 4 +++- modules/ldap/lang/ko.lang.php | 2 ++ modules/ldap/lang/zh-TW.lang.php | 2 ++ modules/ldap/ldap.admin.controller.php | 2 +- modules/ldap/ldap.controller.php | 2 +- modules/ldap/ldap.model.php | 6 ++---- modules/ldap/tpl/index.html | 13 ++++++++++--- 8 files changed, 23 insertions(+), 10 deletions(-) diff --git a/modules/ldap/lang/en.lang.php b/modules/ldap/lang/en.lang.php index d3abf931d..9e902a189 100644 --- a/modules/ldap/lang/en.lang.php +++ b/modules/ldap/lang/en.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = 'Use LDAP'; $lang->ldap_server = 'LDAP Server Address'; $lang->ldap_port = 'LDAP Server Port'; + $lang->ldap_userdn_prefix = 'UserDN prefix'; $lang->ldap_userdn_suffix = 'UserDN Suffix'; $lang->ldap_basedn = 'base DN'; @@ -20,6 +21,7 @@ $lang->about_use_ldap = 'Please input all necessary information first and then check this'; $lang->about_ldap_server = 'Please input LDAP server information for authirization and data request'; $lang->about_ldap_port = 'Please input port of LDAP server'; + $lang->about_ldap_userdn_prefix = 'Please input userdn prefux for authorization. ex) cn='; $lang->about_ldap_userdn_suffix = 'Please input userdn suffux for authorization. ex) @abc.com'; $lang->about_ldap_basedn = 'Please input base DN of directory. ex) dc=abc,dc=com'; diff --git a/modules/ldap/lang/jp.lang.php b/modules/ldap/lang/jp.lang.php index d6537456f..d00152296 100644 --- a/modules/ldap/lang/jp.lang.php +++ b/modules/ldap/lang/jp.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = 'LDAP認証連動を使用する'; $lang->ldap_server = 'LDAPサーバーアドレス'; $lang->ldap_port = 'LDAPサーバーポート番号'; + $lang->ldap_userdn_prefix = 'UserDN prefix'; $lang->ldap_userdn_suffix = 'ユーザーサフィックス'; $lang->ldap_basedn = 'ベースDN(suffix)'; @@ -20,8 +21,9 @@ $lang->about_use_ldap = 'LDAP認証連動のためには、下記のサーバー情報とともに上にチェックして下さい。'; $lang->about_ldap_server = 'LDAPサーバー情報を入力してください。'; $lang->about_ldap_port = 'LDAPサーバーのポート(port)番号情報を入力してください。'; + $lang->about_ldap_userdn_prefix = 'Please input userdn prefux for authorization. ex) cn='; $lang->about_ldap_userdn_suffix = '認証のためのユーザーサフィックスを入力してください。 (例: @abc.com)'; - $lang->about_ldap_basedn = 'ディレクトリの ベースDN(suffix)をログインして下さい。 (例: dc=abc,dc=com)'; + $lang->about_ldap_basedn = 'ディレクトリの ベースDN をログインして下さい。 (例: dc=abc,dc=com)'; $lang->about_ldap_email_entry = 'LDAP情報中、会員のメールアカウント情報として使うカラム名を入力してください。 (重複不可)'; $lang->about_ldap_username_entry = 'LDAP情報中、会員名情報として使うカラム名を入力してください。 (重複可能)'; diff --git a/modules/ldap/lang/ko.lang.php b/modules/ldap/lang/ko.lang.php index 862db2bf7..48194dbf6 100644 --- a/modules/ldap/lang/ko.lang.php +++ b/modules/ldap/lang/ko.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = 'LDAP 인증 사용'; $lang->ldap_server = 'LDAP 서버 주소'; $lang->ldap_port = 'LDAP 서버 포트번호'; + $lang->ldap_userdn_prefix = '사용자 접두사'; $lang->ldap_userdn_suffix = '사용자 접미사'; $lang->ldap_basedn = 'base DN'; @@ -20,6 +21,7 @@ $lang->about_use_ldap = 'LDAP 인증 연동을 위해서는 서버 정보등을 입력 후 사용에 체크를 하셔야 합니다'; $lang->about_ldap_server = '인증과 정보를 요청할 수 있는 LDAP 서버 정보를 입력해주세요'; $lang->about_ldap_port = 'LDAP 서버의 port 정보를 입력해주세요'; + $lang->about_ldap_userdn_prefix = '인증을 위한 사용자 접두사를 입력해주세요 (예: cn= )'; $lang->about_ldap_userdn_suffix = '인증을 위한 사용자 접미사를 입력해주세요. (예: @abc.com)'; $lang->about_ldap_basedn = '디렉토리의 base DN을 입력해주세요. (예: dc=abc,dc=com)'; diff --git a/modules/ldap/lang/zh-TW.lang.php b/modules/ldap/lang/zh-TW.lang.php index 9fc63d793..012bfff75 100644 --- a/modules/ldap/lang/zh-TW.lang.php +++ b/modules/ldap/lang/zh-TW.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = '使用 LDAP'; $lang->ldap_server = 'LDAP主機位置'; $lang->ldap_port = 'LDAP主機端口'; + $lang->ldap_userdn_prefix = 'UserDN prefix'; $lang->ldap_userdn_suffix = '後綴'; $lang->ldap_basedn = 'base DN'; @@ -20,6 +21,7 @@ $lang->about_use_ldap = '請輸入並檢查所有必填的資料。'; $lang->about_ldap_server = '請輸入已授權的 LDAP主機資料。'; $lang->about_ldap_port = '請輸入 LDAP主機端口。'; + $lang->about_ldap_userdn_prefix = 'Please input userdn prefux for authorization. ex) cn='; $lang->about_ldap_userdn_suffix = '請輸入已授權的 userdn後綴。例) @abc.com'; $lang->about_ldap_basedn = '請輸入 base DN資料夾。 例) dc=abc,dc=com'; diff --git a/modules/ldap/ldap.admin.controller.php b/modules/ldap/ldap.admin.controller.php index 121f3037e..b3c600306 100644 --- a/modules/ldap/ldap.admin.controller.php +++ b/modules/ldap/ldap.admin.controller.php @@ -18,7 +18,7 @@ **/ function procLdapAdminInsertConfig() { // 기본 정보를 받음 - $args = Context::gets('use_ldap','ldap_server','ldap_port','ldap_userdn_suffix','ldap_basedn','ldap_email_entry','ldap_nickname_entry','ldap_username_entry','ldap_group_entry'); + $args = Context::gets('use_ldap','ldap_server','ldap_port','ldap_userdn_prefix', 'ldap_userdn_suffix','ldap_basedn','ldap_email_entry','ldap_nickname_entry','ldap_username_entry','ldap_group_entry'); if($args->use_ldap !='Y') $args->use_ldap = 'N'; if(!$args->ldap_port) $args->ldap_port = 389; diff --git a/modules/ldap/ldap.controller.php b/modules/ldap/ldap.controller.php index 10e50b779..616f554d5 100644 --- a/modules/ldap/ldap.controller.php +++ b/modules/ldap/ldap.controller.php @@ -28,7 +28,7 @@ $password = $obj->password; // 인증 시도 - $output = $oLdapModel->ldap_conn($user_id, $password, $config->ldap_userdn_suffix, $config->ldap_basedn, $config->ldap_server, $config->ldap_port); + $output = $oLdapModel->ldap_conn($user_id, $password, $config->ldap_userdn_prefix, $config->ldap_userdn_suffix, $config->ldap_basedn, $config->ldap_server, $config->ldap_port); // 인증 실패시 아무 event없이 그냥 return하여 기존 인증을 계속 유지 if(!$output->toBool()) return new Object(); diff --git a/modules/ldap/ldap.model.php b/modules/ldap/ldap.model.php index 648ffdeec..40c14633c 100644 --- a/modules/ldap/ldap.model.php +++ b/modules/ldap/ldap.model.php @@ -31,8 +31,7 @@ /** * @brief LDAP 연동하여 정보를 return하는 method **/ - function ldap_conn($user_id, $password, $ldap_userdn_suffix, $base_dn, $ldap_server, $ldap_port = 389) { - + function ldap_conn($user_id, $password, $ldap_userdn_prefix, $ldap_userdn_suffix, $base_dn, $ldap_server, $ldap_port = 389) { if(!function_exists('ldap_connect')) return new Object(-1,'ldap module is not exists'); $ds = @ldap_connect($ldap_server, $ldap_port); @@ -40,8 +39,7 @@ if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) return new Object(-1,'fail to set option'); - $userdn = $user_id.$ldap_userdn_suffix; - + $userdn = $ldap_userdn_prefix.$user_id.$ldap_userdn_suffix; if(!@ldap_bind($ds, $userdn, $password)) return new Object(-1,'fail to bind'); $ldap_sr = @ldap_search($ds, $base_dn, '(cn='.$user_id.')', array ('*')); diff --git a/modules/ldap/tpl/index.html b/modules/ldap/tpl/index.html index 2297d8f77..1e2af02dc 100644 --- a/modules/ldap/tpl/index.html +++ b/modules/ldap/tpl/index.html @@ -5,27 +5,34 @@
                - + - + - + + + + + - + + + + + - - + + diff --git a/modules/issuetracker/tpl/project_insert.html b/modules/issuetracker/tpl/project_insert.html index 6a0bf4c6b..f90eff367 100644 --- a/modules/issuetracker/tpl/project_insert.html +++ b/modules/issuetracker/tpl/project_insert.html @@ -96,6 +96,20 @@

                {$lang->about_diff_cmd}

                + + + + + + + +
                {$lang->use_ldap}
                use_ldap == 'Y')-->checked="checked" />

                {$lang->about_use_ldap}

                {$lang->ldap_server}

                {$lang->about_ldap_server}

                {$lang->ldap_port}

                {$lang->about_ldap_port}

                {$lang->ldap_userdn_prefix}
                + +

                {$lang->about_ldap_userdn_prefix}

                +
                {$lang->ldap_userdn_suffix}
                From 90154c59f3d6ec537d41e0f927d5ee8b6e793cbd Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 26 Dec 2008 08:59:19 +0000 Subject: [PATCH 38/82] =?UTF-8?q?ldap=20=EC=84=9C=EB=B2=84=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=82=AC=EC=9A=A9=EC=9E=90=EC=9D=B4=EB=A6=84/=20?= =?UTF-8?q?=EB=8B=89=EB=84=A4=EC=9E=84=EC=9D=98=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=20=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5191 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/ldap/ldap.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ldap/ldap.controller.php b/modules/ldap/ldap.controller.php index 616f554d5..1e9cb42aa 100644 --- a/modules/ldap/ldap.controller.php +++ b/modules/ldap/ldap.controller.php @@ -48,11 +48,11 @@ $oMemberModel = &getModel('member'); $member = $oMemberModel->getMemberInfoByUserID($info->user_id); - // 이미 존재하면 메일주소/닉네임/사용자이름/그룹중에 변경된 것이 있는지 확인 + // 이미 존재하면 메일주소/그룹중에 변경된 것이 있는지 확인 if($member->user_id == $info->user_id) { $info->member_srl = $member->member_srl; - if($info->password != $member->password || $info->email_address != $member->email_address || $info->nick_name != $member->nick_name || $info->user_name != $member->user_name) { + if($info->password != $member->password || $info->email_address != $member->email_address) { $output = executeQuery('member.updateMember', $info); } else $output = new Object(); From ae1081df80a883d228d07f00bbc654d053eabaee Mon Sep 17 00:00:00 2001 From: haneul Date: Fri, 26 Dec 2008 09:05:44 +0000 Subject: [PATCH 39/82] #17579744 : if blank is included in svn_cmd quote svn_cmd with double quotation mark, and unquote for arguments git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5192 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/classes/svn.class.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/issuetracker/classes/svn.class.php b/modules/issuetracker/classes/svn.class.php index 2f1edcd40..97a35c977 100644 --- a/modules/issuetracker/classes/svn.class.php +++ b/modules/issuetracker/classes/svn.class.php @@ -19,7 +19,8 @@ if(substr($url,-1)!='/') $url .= '/'; $this->url = $url; - $this->svn_cmd = $svn_cmd; + if(strstr($svn_cmd, " ") != FALSE) $this->svn_cmd = '"'.$svn_cmd.'"' ; + else $this->svn_cmd = $svn_cmd; $this->diff_cmd = $diff_cmd; $this->tmp_dir = _XE_PATH_.'files/cache/tmp'; @@ -32,7 +33,7 @@ if(substr($path,0,1)=='/') $path = substr($path,1); if(strpos($path,'..')!==false) return; - $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 \"%s%s\"", $this->svn_cmd, $this->tmp_dir, $this->url, $path); + $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 %s%s", $this->svn_cmd, $this->tmp_dir, $this->url, $path); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); @@ -52,7 +53,7 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - '%s --non-interactive --config-dir %s list "%s%s"%s', + '%s --non-interactive --config-dir %s list %s%s%s', $this->svn_cmd, $this->tmp_dir, $this->url, @@ -94,7 +95,7 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - '%s --non-interactive --config-dir %s cat "%s%s"%s', + '%s --non-interactive --config-dir %s cat %s%s%s', $this->svn_cmd, $this->tmp_dir, $this->url, @@ -178,14 +179,14 @@ function getComp($path, $brev, $erev) { if(!$brev) { - $command = sprintf('%s --non-interactive --config-dir %s log --xml --limit 2 "%s%s@%d"', $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev); + $command = sprintf('%s --non-interactive --config-dir %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); $brev = $xmlDoc->log->logentry[1]->attrs->revision; if(!$brev) return; } - $command = sprintf('%s --non-interactive --config-dir %s diff "%s%s@%d" "%s%s@%d"', + $command = sprintf('%s --non-interactive --config-dir %s diff %s%s@%d %s%s@%d', $this->svn_cmd, $this->tmp_dir, $this->url, @@ -249,7 +250,7 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - '%s --non-interactive --config-dir %s log --xml %s %s %s "%s%s"', + '%s --non-interactive --config-dir %s log --xml %s %s %s %s%s', $this->svn_cmd, $this->tmp_dir, $quiet?'--quiet':'--verbose', From c02b4206139abd934f7596ceac953dace29a3996 Mon Sep 17 00:00:00 2001 From: haneul Date: Mon, 29 Dec 2008 16:42:27 +0000 Subject: [PATCH 40/82] #17588107 : added a feature setting user id and password for svn authentication git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5193 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/issuetracker/classes/svn.class.php | 35 +++++++++++++++---- .../issuetracker/issuetracker.controller.php | 2 +- modules/issuetracker/lang/en.lang.php | 4 +++ modules/issuetracker/lang/jp.lang.php | 4 +++ modules/issuetracker/lang/ko.lang.php | 4 +++ modules/issuetracker/lang/zh-CN.lang.php | 4 +++ modules/issuetracker/lang/zh-TW.lang.php | 4 +++ .../tpl/filter/insert_project.xml | 2 ++ modules/issuetracker/tpl/project_info.html | 10 ++++-- modules/issuetracker/tpl/project_insert.html | 14 ++++++++ 10 files changed, 72 insertions(+), 11 deletions(-) diff --git a/modules/issuetracker/classes/svn.class.php b/modules/issuetracker/classes/svn.class.php index 97a35c977..ec370b10e 100644 --- a/modules/issuetracker/classes/svn.class.php +++ b/modules/issuetracker/classes/svn.class.php @@ -14,8 +14,10 @@ var $tmp_dir = '/tmp'; var $oXml = null; + var $userid = null; + var $passwd = null; - function Svn($url, $svn_cmd='/usr/bin/svn', $diff_cmd='/usr/bin/diff') { + function Svn($url, $svn_cmd='/usr/bin/svn', $diff_cmd='/usr/bin/diff', $userid=null, $passwd=null) { if(substr($url,-1)!='/') $url .= '/'; $this->url = $url; @@ -26,14 +28,29 @@ $this->tmp_dir = _XE_PATH_.'files/cache/tmp'; if(!is_dir($this->tmp_dir)) FileHandler::makeDir($this->tmp_dir); + $this->userid = $userid; + $this->passwd = $passwd; + $this->oXml = new XmlParser(); } + function _getAuthInfo() + { + if($this->userid && $this->passwd) + { + return sprintf("--username %s --password %s", $this->userid, $this->passwd); + } + else + { + return ''; + } + } + function getStatus($path = '/') { if(substr($path,0,1)=='/') $path = substr($path,1); if(strpos($path,'..')!==false) return; - $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 %s%s", $this->svn_cmd, $this->tmp_dir, $this->url, $path); + $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 %s %s%s", $this->svn_cmd, $this->tmp_dir, $this->_getAuthInfo(), $this->url, $path); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); @@ -53,8 +70,9 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - '%s --non-interactive --config-dir %s list %s%s%s', + '%s --non-interactive %s --config-dir %s list %s%s%s', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, @@ -95,8 +113,9 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - '%s --non-interactive --config-dir %s cat %s%s%s', + '%s --non-interactive %s --config-dir %s cat %s%s%s', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, @@ -179,15 +198,16 @@ function getComp($path, $brev, $erev) { if(!$brev) { - $command = sprintf('%s --non-interactive --config-dir %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev); + $command = sprintf('%s --non-interactive %s --config-dir %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, $erev); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); $brev = $xmlDoc->log->logentry[1]->attrs->revision; if(!$brev) return; } - $command = sprintf('%s --non-interactive --config-dir %s diff %s%s@%d %s%s@%d', + $command = sprintf('%s --non-interactive %s --config-dir %s diff %s%s@%d %s%s@%d', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, @@ -250,8 +270,9 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - '%s --non-interactive --config-dir %s log --xml %s %s %s %s%s', + '%s --non-interactive %s --config-dir %s log --xml %s %s %s %s%s', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $quiet?'--quiet':'--verbose', $limit?'--limit '.$limit:'', diff --git a/modules/issuetracker/issuetracker.controller.php b/modules/issuetracker/issuetracker.controller.php index c6f5cb0fa..b8685ada2 100644 --- a/modules/issuetracker/issuetracker.controller.php +++ b/modules/issuetracker/issuetracker.controller.php @@ -388,7 +388,7 @@ function syncChangeset($module_info) { require_once($this->module_path.'classes/svn.class.php'); - $oSvn = new Svn($module_info->svn_url, $module_info->svn_cmd, $module_info->diff_cmd); + $oSvn = new Svn($module_info->svn_url, $module_info->svn_cmd, $module_info->diff_cmd, $module_info->svn_userid, $module_info->svn_passwd); $oModel = &getModel('issuetracker'); $status = $oSvn->getStatus(); if(!$status || !$status->revision) return; diff --git a/modules/issuetracker/lang/en.lang.php b/modules/issuetracker/lang/en.lang.php index c2bf85fac..89bb2f534 100644 --- a/modules/issuetracker/lang/en.lang.php +++ b/modules/issuetracker/lang/en.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = 'Please input the location of svn client to link with SVN. (ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF Command Location'; $lang->about_diff_cmd = 'Please input the location of diff to compare SVN revisions. (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = 'Issue'; $lang->total_issue = 'All Issues'; diff --git a/modules/issuetracker/lang/jp.lang.php b/modules/issuetracker/lang/jp.lang.php index b3a3e6afb..72b570827 100644 --- a/modules/issuetracker/lang/jp.lang.php +++ b/modules/issuetracker/lang/jp.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = 'SVN連動のためのsvn clientファイルのロケーションを入力して下さい。 (ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFFファイルのロケーション'; $lang->about_diff_cmd = 'SVN revision間の比較のためのdiffファイルのロケーションを入力して下さい。(ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = 'イシュー'; $lang->total_issue = 'イシュー全体'; diff --git a/modules/issuetracker/lang/ko.lang.php b/modules/issuetracker/lang/ko.lang.php index bc2f6d016..fbb2ce06f 100644 --- a/modules/issuetracker/lang/ko.lang.php +++ b/modules/issuetracker/lang/ko.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = 'SVN 연동을 위해 svn client 실행파일의 위치를 입력해주세요. (ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF 실행파일 위치'; $lang->about_diff_cmd = 'SVN revision들의 비교를 위한 diff 실행파일의 위치를 입력해주세요. (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN 인증 아이디'; + $lang->about_svn_userid = '인증이 필요한 경우 아이디를 입력해주세요'; + $lang->svn_passwd = 'SVN 인증 패스워드'; + $lang->about_svn_passwd = '인증이 필요한 경우 패스워드를 입력해주세요'; $lang->issue = '문제'; $lang->total_issue = '전체 문제'; diff --git a/modules/issuetracker/lang/zh-CN.lang.php b/modules/issuetracker/lang/zh-CN.lang.php index 9d0d81174..717a04459 100644 --- a/modules/issuetracker/lang/zh-CN.lang.php +++ b/modules/issuetracker/lang/zh-CN.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = '请输入svn clien应用程序位置。(ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIF应用程序位置'; $lang->about_diff_cmd = '为比较SVN revision,请输入diff应用程序位置。 (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = '问题'; $lang->total_issue = '全部问题'; diff --git a/modules/issuetracker/lang/zh-TW.lang.php b/modules/issuetracker/lang/zh-TW.lang.php index d767dc65d..95589f253 100644 --- a/modules/issuetracker/lang/zh-TW.lang.php +++ b/modules/issuetracker/lang/zh-TW.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = '請輸入 SVN Client應用程式位置。(ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF應用程式位置'; $lang->about_diff_cmd = '為了比較 SVN revisions,請輸入diff應用程式位置。 (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = '問題'; $lang->total_issue = '所有問題'; diff --git a/modules/issuetracker/tpl/filter/insert_project.xml b/modules/issuetracker/tpl/filter/insert_project.xml index e935038b2..757c44bbd 100644 --- a/modules/issuetracker/tpl/filter/insert_project.xml +++ b/modules/issuetracker/tpl/filter/insert_project.xml @@ -16,6 +16,8 @@ + + diff --git a/modules/issuetracker/tpl/project_info.html b/modules/issuetracker/tpl/project_info.html index 5b4a15675..74571a9e3 100644 --- a/modules/issuetracker/tpl/project_info.html +++ b/modules/issuetracker/tpl/project_info.html @@ -42,11 +42,15 @@ {$module_info->diff_cmd} 
                {$lang->description}
                {$lang->svn_userid}
                {$module_info->svn_userid} 
                {$lang->description}
                {nl2br(htmlspecialchars($module_info->description))} 
                {$lang->admin_id}
                {$lang->admin_id}
                {implode(",",$module_info->admin_id)} 
                {$lang->svn_userid}
                + +

                {$lang->about_svn_userid}

                +
                {$lang->svn_passwd}
                + +

                {$lang->about_svn_passwd}

                +
                {$lang->description}
                From 9bc92ee114a0d7a03a042374eacf1de9fb1892da Mon Sep 17 00:00:00 2001 From: haneul Date: Tue, 30 Dec 2008 09:45:23 +0000 Subject: [PATCH 41/82] #17343125 : fixed typo git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5194 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/file/file.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 5ee709220..f0fffde72 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -43,7 +43,7 @@ * @brief 첨부파일 다운로드 * 직접 요청을 받음 * file_srl : 파일의 sequence - * sid : db에 저장된 비교 값, 틀리면 다운로드 하지 낳음 + * sid : db에 저장된 비교 값, 틀리면 다운로드 하지 않음 **/ function procFileDownload() { $file_srl = Context::get('file_srl'); From 4d0ab4ad95c887b016f24c985e1abc9dd9cf9749 Mon Sep 17 00:00:00 2001 From: ngleader Date: Wed, 31 Dec 2008 08:27:14 +0000 Subject: [PATCH 42/82] =?UTF-8?q?planet=20=EC=9C=84=EC=A0=AF=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=A7=81=ED=81=AC=EB=A5=BC=20=ED=95=B4=EB=8B=B9=20?= =?UTF-8?q?=EA=B8=80=EB=82=A0=EC=A7=9C=20=ED=94=8C=EB=9E=98=EB=8B=9B?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EA=B0=80=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5195 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/planet_document/skins/xe_official/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html index c36753aed..f3774e496 100644 --- a/widgets/planet_document/skins/xe_official/list.html +++ b/widgets/planet_document/skins/xe_official/list.html @@ -3,7 +3,7 @@
                -

                {htmlspecialchars($item->nick_name)}

                +

                {htmlspecialchars($item->nick_name)}

                From 7ca60dcd765ec825e5961c7d9c77614cae850e96 Mon Sep 17 00:00:00 2001 From: royallin Date: Thu, 1 Jan 2009 09:14:15 +0000 Subject: [PATCH 43/82] git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5196 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/opage/conf/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/opage/conf/info.xml b/modules/opage/conf/info.xml index d3b6e4dc6..3a13e5d77 100644 --- a/modules/opage/conf/info.xml +++ b/modules/opage/conf/info.xml @@ -13,7 +13,7 @@ Module for inserting external pages into inside of Zeroboard XE. 외부페이지를 XE내부로 삽입시키는 모듈 Модуль для вставки внешних страниц внутрь Zeroboard XE. - 可將外部頁面插入到 Zeroboard XE裡面的模組。 + 可將外部頁面插入至XE裡面的模組。 0.1 2007-09-17 service From d2707f9152fedf0143b7e9250e46a3a526512469 Mon Sep 17 00:00:00 2001 From: royallin Date: Thu, 1 Jan 2009 10:31:44 +0000 Subject: [PATCH 44/82] Translation & Modified zh-TW language. git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5197 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/keyword_link/conf/info.xml | 24 +++++++++++++++++++ modules/board/lang/zh-TW.lang.php | 2 +- modules/issuetracker/lang/zh-TW.lang.php | 14 +++++------ modules/ldap/lang/zh-TW.lang.php | 24 +++++++++---------- widgets/planet_document/conf/info.xml | 3 +++ .../skins/xe_official/skin.xml | 5 ++++ 6 files changed, 52 insertions(+), 20 deletions(-) diff --git a/addons/keyword_link/conf/info.xml b/addons/keyword_link/conf/info.xml index 64735755d..285e83d16 100644 --- a/addons/keyword_link/conf/info.xml +++ b/addons/keyword_link/conf/info.xml @@ -1,11 +1,17 @@ 키워드 링크 애드온 + 關鍵字連結 게시글과 댓글의 내용중 등록된 키워드에 링크를 걸어주는 애드온입니다. 키워드는 콤마(,)로 구분하여 여러개 등록할 수 있습니다. 먼저 등록된 키워드가 우선순위를 갖습니다. + + 게시글과 댓글의 내용중 등록된 키워드에 링크를 걸어주는 애드온입니다. + 可用逗號(,)區隔多個關鍵字。 + 以第一關鍵字為主。 + 0.1 2008-12-20 @@ -21,51 +27,69 @@ cssquery + cssquery 치환할 부분의 jQuery cssquery입니다. xe_board 게시판 스킨이면 공백으로 두면 됩니다. + 치환할 부분의 jQuery cssquery입니다. + xe_board 게시판 스킨이면 공백으로 두면 됩니다. 링크 방법 + 連結方式 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다. + 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다. + 첫번째 키워드 + 第一關鍵字 모든 키워드 + 所有關鍵字 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 diff --git a/modules/board/lang/zh-TW.lang.php b/modules/board/lang/zh-TW.lang.php index b7a8e6bc6..23b49e40b 100644 --- a/modules/board/lang/zh-TW.lang.php +++ b/modules/board/lang/zh-TW.lang.php @@ -42,5 +42,5 @@ $lang->about_secret = '可用於討論板或回覆時選擇是否使用。'; $lang->about_admin_mail = '有新的主題或評論時,將自動發電子郵件來通知管理員。
                多數電子郵件由逗號(,)區隔。'; $lang->about_category_color = '設定分類顏色。'; - $lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.'; + $lang->msg_not_enough_point = '你的點數不夠在此討論板發表主題。'; ?> diff --git a/modules/issuetracker/lang/zh-TW.lang.php b/modules/issuetracker/lang/zh-TW.lang.php index 95589f253..0384bcfe8 100644 --- a/modules/issuetracker/lang/zh-TW.lang.php +++ b/modules/issuetracker/lang/zh-TW.lang.php @@ -22,15 +22,15 @@ $lang->cmd_accept = '接受'; $lang->svn_url = 'SVN位址'; - $lang->about_svn_url = '請輸入專案的 SVN位址。'; + $lang->about_svn_url = '請輸入專案的 SVN 位址。'; $lang->svn_cmd = 'SVN應用程式位置'; - $lang->about_svn_cmd = '請輸入 SVN Client應用程式位置。(ex: /usr/bin/svn)'; + $lang->about_svn_cmd = '請輸入 SVN Client 應用程式位置。(ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF應用程式位置'; - $lang->about_diff_cmd = '為了比較 SVN revisions,請輸入diff應用程式位置。 (ex: /usr/bin/diff)'; - $lang->svn_userid = 'SVN ID'; - $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; - $lang->svn_passwd = 'SVN password'; - $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; + $lang->about_diff_cmd = '為了比較 SVN 版本,請輸入 diff 應用程式位置。 (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN帳號'; + $lang->about_svn_userid = '必須要驗證時,請輸入帳號來登入 SVN 檔案庫'; + $lang->svn_passwd = 'SVN密碼'; + $lang->about_svn_passwd = '必須要驗證時,請輸入密碼來登入 SVN 檔案庫'; $lang->issue = '問題'; $lang->total_issue = '所有問題'; diff --git a/modules/ldap/lang/zh-TW.lang.php b/modules/ldap/lang/zh-TW.lang.php index 012bfff75..4a480df9d 100644 --- a/modules/ldap/lang/zh-TW.lang.php +++ b/modules/ldap/lang/zh-TW.lang.php @@ -7,9 +7,9 @@ $lang->ldap = 'LDAP'; $lang->use_ldap = '使用 LDAP'; - $lang->ldap_server = 'LDAP主機位置'; - $lang->ldap_port = 'LDAP主機端口'; - $lang->ldap_userdn_prefix = 'UserDN prefix'; + $lang->ldap_server = 'LDAP 主機位置'; + $lang->ldap_port = 'LDAP 主機埠口'; + $lang->ldap_userdn_prefix = '前置字元'; $lang->ldap_userdn_suffix = '後綴'; $lang->ldap_basedn = 'base DN'; @@ -19,15 +19,15 @@ $lang->ldap_group_entry = '請輸入群組'; $lang->about_use_ldap = '請輸入並檢查所有必填的資料。'; - $lang->about_ldap_server = '請輸入已授權的 LDAP主機資料。'; - $lang->about_ldap_port = '請輸入 LDAP主機端口。'; - $lang->about_ldap_userdn_prefix = 'Please input userdn prefux for authorization. ex) cn='; - $lang->about_ldap_userdn_suffix = '請輸入已授權的 userdn後綴。例) @abc.com'; - $lang->about_ldap_basedn = '請輸入 base DN資料夾。 例) dc=abc,dc=com'; + $lang->about_ldap_server = '請輸入已授權的 LDAP 主機資料。'; + $lang->about_ldap_port = '請輸入 LDAP 主機埠口。'; + $lang->about_ldap_userdn_prefix = '請輸入已授權的 userdn 前置字元。 例) cn='; + $lang->about_ldap_userdn_suffix = '請輸入已授權的 userdn 後綴。例) @abc.com'; + $lang->about_ldap_basedn = '請輸入 base DN 資料夾。 例) dc=abc,dc=com'; - $lang->about_ldap_email_entry = '請輸入 LDAP電子郵件資料。(禁止重複)'; - $lang->about_ldap_username_entry = '請輸入 LDAP使用者名稱。(允許重複)'; - $lang->about_ldap_nickname_entry = '請輸入 LDAP暱稱。(禁止重複)'; - $lang->about_ldap_group_entry = '請輸入 LDAP群組資料。'; + $lang->about_ldap_email_entry = '請輸入 LDAP 電子郵件資料。(禁止重複)'; + $lang->about_ldap_username_entry = '請輸入 LDAP 使用者名稱。(允許重複)'; + $lang->about_ldap_nickname_entry = '請輸入 LDAP 暱稱。(禁止重複)'; + $lang->about_ldap_group_entry = '請輸入 LDAP 群組資料。'; ?> diff --git a/widgets/planet_document/conf/info.xml b/widgets/planet_document/conf/info.xml index 062a3d021..fb5af5723 100644 --- a/widgets/planet_document/conf/info.xml +++ b/widgets/planet_document/conf/info.xml @@ -1,12 +1,15 @@ 플래닛 최근 글 출력 + 微型部落格主題輸出 플래닛의 글들만 출력하는 위젯입니다 . + 微型部落格主題輸出控件。 0.1 2008-12-24 zero + zero diff --git a/widgets/planet_document/skins/xe_official/skin.xml b/widgets/planet_document/skins/xe_official/skin.xml index c24f5b8bb..7093c9129 100644 --- a/widgets/planet_document/skins/xe_official/skin.xml +++ b/widgets/planet_document/skins/xe_official/skin.xml @@ -1,15 +1,20 @@ XE 공식 레이아웃용 플래닛 글 스킨 + XE 微型部落格版面 플래닛 글들을 출력하는 위젯 스킨입니다. + + 微型部落格主題輸出面板。 + 0.1 2008-12-24 http://www.zeroboard.com zero + zero From 56acdeca75f9da496a7be4fee5bb4e9c89f6df7a Mon Sep 17 00:00:00 2001 From: ngleader Date: Fri, 2 Jan 2009 05:09:43 +0000 Subject: [PATCH 45/82] document_categories.xml add column 'color' git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5198 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/schemas/document_categories.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/document/schemas/document_categories.xml b/modules/document/schemas/document_categories.xml index e98fbe1e9..cf6249d3a 100644 --- a/modules/document/schemas/document_categories.xml +++ b/modules/document/schemas/document_categories.xml @@ -9,4 +9,5 @@ +
                From 9a029e0f8d90c8959205a4b02c748dd80ca07d70 Mon Sep 17 00:00:00 2001 From: ngleader Date: Fri, 2 Jan 2009 06:47:42 +0000 Subject: [PATCH 46/82] =?UTF-8?q?left/right=20outer=20join=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5199 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DB.class.php | 48 +++- classes/db/DBCubrid.class.php | 69 +++-- classes/db/DBFirebird.class.php | 65 +++-- classes/db/DBMysql.class.php | 41 ++- classes/db/DBMysql_innodb.class.php | 41 ++- classes/db/DBPostgresql.class.php | 74 ++++-- classes/db/DBSqlite2.class.php | 43 +++- classes/db/DBSqlite3_pdo.class.php | 43 +++- classes/xml/XmlQueryParser.class.php | 366 +++++++++++++++++---------- 9 files changed, 530 insertions(+), 260 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 9db4126fc..345ab6894 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -129,7 +129,7 @@ } /** - * @brief 로그 남김 + * @brief 로그 남김 **/ function actStart($query) { $this->setError(0,'success'); @@ -149,7 +149,7 @@ // 에러 발생시 에러 로그를 남김 (__DEBUG_DB_OUTPUT__이 지정되어 있을경우) if($this->isError()) { - $str .= sprintf("\t Query Failed : %d\n\t\t\t %s\n", $this->errno, $this->errstr); + $str .= sprintf("\t Query Failed : %d\n\t\t\t %s\n", $this->errno, $this->errstr); if(__DEBUG_DB_OUTPUT__==1) { $debug_file = _XE_PATH_."files/_debug_db_query.php"; @@ -207,7 +207,7 @@ /** * @brief query xml 파일을 실행하여 결과를 return * - * query_id = module.queryname + * query_id = module.queryname * query_id에 해당하는 xml문(or 캐싱파일)을 찾아서 컴파일 후 실행 **/ function executeQuery($query_id, $args = NULL) { @@ -229,6 +229,20 @@ $xml_file = sprintf('%s%s/%s/queries/%s.xml', _XE_PATH_, $target, $module, $id); if(!file_exists($xml_file)) return new Object(-1, 'msg_invalid_queryid'); + // 캐쉬파일을 찾아 본다 + $cache_file = $this->checkQueryCacheFile($query_id,$xml_file); + + // 쿼리를 실행한다 + return $this->_executeQuery($cache_file, $args, $query_id); + } + + + /** + * @brief 캐쉬파일을 찾아 본다 + * + **/ + function checkQueryCacheFile($query_id,$xml_file){ + // 일단 cache 파일을 찾아본다 $cache_file = sprintf('%s%s%s.cache.php', _XE_PATH_, $this->cache_file, $query_id); if(file_exists($cache_file)) $cache_time = filemtime($cache_file); @@ -236,15 +250,14 @@ // 캐시 파일이 없거나 시간 비교하여 최근것이 아니면 원본 쿼리 xml파일을 찾아서 파싱을 한다 if($cache_timeparse($query_id, $xml_file, $cache_file); } - - // 쿼리를 실행한다 - return $this->_executeQuery($cache_file, $args, $query_id); + return $cache_file; } + /** * @brief 쿼리문을 실행하고 결과를 return한다 **/ @@ -258,6 +271,7 @@ $output = @include($cache_file); if( (is_a($output, 'Object')||is_subclass_of($output,'Object'))&&!$output->toBool()) return $output; + $output->_tables = ($output->_tables && is_array($output->_tables)) ? $output->_tables : array(); // action값에 따라서 쿼리 생성으로 돌입 @@ -349,13 +363,13 @@ $value = preg_replace('/(^\'|\'$){1}/','',$value); switch($operation) { - case 'like_prefix' : + case 'like_prefix' : $value = $value.'%'; break; - case 'like_tail' : + case 'like_tail' : $value = '%'.$value; break; - case 'like' : + case 'like' : $value = '%'.$value.'%'; break; case 'in' : @@ -454,7 +468,7 @@ if(!is_array($tables)) $tables_str = $tables; else $tables_str = implode('.',$tables); - + $cache_path = sprintf('%s/%s%s', $this->count_cache_path, $this->prefix, $tables_str); if(!is_dir($cache_path)) FileHandler::makeDir($cache_path); @@ -511,5 +525,17 @@ return true; } + + function getSupportedDatabase(){ + $result = array(); + if(function_exists('mysql_connect')) $result[] = 'MySQL'; + if(function_exists('cubrid_connect')) $result[] = 'Cubrid'; + if(function_exists('ibase_connect')) $result[] = 'FireBird'; + if(function_exists('pg_connect')) $result[] = 'Postgre'; + if(function_exists('sqlite_open')) $result[] = 'sqlite2'; + if(function_exists('PDO')) $result[] = 'sqlite3(PDO)'; + return $result; + } + } ?> diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index acabc3dac..85cf76f3c 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -18,7 +18,7 @@ var $userid = NULL; ///< user id var $password = NULL; ///< password var $database = NULL; ///< database - var $port = 33000; ///< db server port + var $port = 33000; ///< db server port var $prefix = 'xe'; ///< XE에서 사용할 테이블들의 prefix (한 DB에서 여러개의 XE 설치 가능) var $cutlen = 12000; ///< 큐브리드의 최대 상수 크기(스트링이 이보다 크면 '...'+'...' 방식을 사용해야 한다 @@ -75,7 +75,7 @@ // db 정보가 없으면 무시 if(!$this->hostname || !$this->userid || !$this->password || !$this->database || !$this->port) return; - // 접속시도 + // 접속시도 $this->fd = @cubrid_connect($this->hostname, $this->port, $this->database, $this->userid, $this->password); // 접속체크 @@ -385,9 +385,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { $condition = ''; - foreach($output->conditions as $val) { + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -397,30 +407,24 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; - if(strpos($name,'.')===false) $name = '"'.$name.'"'; - else $name = str_replace('.','."',$name).'"'; - $str = $this->getConditionPart($name, $value, $operation); - if($sub_condition) $sub_condition .= ' '.$pipe.' '; $sub_condition .= $str; } - if($sub_condition) { if($condition && $val['pipe']) $condition .= ' '.$val['pipe'].' '; $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } + /** * @brief insertAct 처리 **/ @@ -430,7 +434,7 @@ $table_list[] = '"'.$this->prefix.$val.'"'; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { $name = $val['name']; $value = $val['value']; @@ -471,15 +475,15 @@ $table_list[] = "\"".$this->prefix.$val."\" as ".$key; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { if(!isset($val['value'])) continue; $name = $val['name']; $value = $val['value']; - for ($i = 0; $i < $key; $i++) { // 한문장에 같은 속성에 대한 중복 설정은 큐브리드에서는 허용치 않음 - if ($output->columns[$i]['name'] == $name) break; - } - if ($i < $key) continue; // 중복이 발견되면 이후의 설정은 무시 + for ($i = 0; $i < $key; $i++) { // 한문장에 같은 속성에 대한 중복 설정은 큐브리드에서는 허용치 않음 + if ($output->columns[$i]['name'] == $name) break; + } + if ($i < $key) continue; // 중복이 발견되면 이후의 설정은 무시 if(strpos($name,'.')!==false&&strpos($value,'.')!==false) $column_list[] = $name.' = '.$value; else { if($output->column_type[$name]!='number') { @@ -543,6 +547,17 @@ $table_list[] = '"'.$this->prefix.$val.'" as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' "'.$this->prefix.$output->tables[$key].'" as '.$key . ' on (' . $condition . ')'; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -572,9 +587,9 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -597,7 +612,7 @@ else { if ($condition) $query = sprintf('%s and inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); - else + else $query = sprintf('%s where inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); } } @@ -630,7 +645,7 @@ $output = "
                \n"; $output .= "Backtrace:
                \n"; $backtrace = debug_backtrace(); - + foreach ($backtrace as $bt) { $args = ''; foreach ($bt['args'] as $a) { @@ -672,18 +687,18 @@ $output .= "
                \n"; return $output; } - + /** * @brief query xml에 navigation 정보가 있을 경우 페이징 관련 작업을 처리한다 * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf('select count(*) as "count" from %s %s', implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -707,7 +722,7 @@ if($page > $total_page) $page = $total_page; $start_count = ($page-1)*$list_count; - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -724,7 +739,7 @@ else { if ($condition) $query = sprintf('%s and inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); - else + else $query = sprintf('%s where inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); } } diff --git a/classes/db/DBFirebird.class.php b/classes/db/DBFirebird.class.php index d3facb5be..e5181f810 100644 --- a/classes/db/DBFirebird.class.php +++ b/classes/db/DBFirebird.class.php @@ -89,7 +89,7 @@ // get server version and implementation strings $server_info = ibase_server_info($service, IBASE_SVC_SERVER_VERSION); ibase_service_detach($service); - } + } else { $this->setError(ibase_errcode(), ibase_errmsg()); return; @@ -341,7 +341,7 @@ /** * @brief 1씩 증가되는 sequence값을 return (firebird의 generator 값을 증가) **/ - function getNextSequence() { + function getNextSequence() { $gen = "GEN_".$this->prefix."sequence_ID"; $sequence = ibase_gen_id($gen, 1); return $sequence; @@ -509,7 +509,7 @@ if($this->column_type[$type]=='INTEGER') $size = null; else if($this->column_type[$type]=='VARCHAR' && !$size) $size = 256; - + $column_schema[] = sprintf('"%s" %s%s %s %s', $name, $this->column_type[$type], @@ -540,8 +540,8 @@ //commit(); @ibase_commit($this->fd); if(!$output) return false; - - if(count($index_list)) { + + if(count($index_list)) { foreach($index_list as $key => $val) { // index name = prefix + table name + index_list // index name 크기가 31byte로 제한되어 있어 중복되지 않을만큼 테이블명을 줄임 @@ -567,7 +567,7 @@ if(!$output) return false; } } - + foreach($auto_increment_list as $increment) { $schema = sprintf('CREATE GENERATOR GEN_%s_ID;', $table_name); $output = $this->_query($schema); @@ -598,8 +598,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -609,15 +620,11 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue('"'.$name.'"', $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; - - $name = $this->autoQuotes($name); - $value = $this->autoValueQuotes($value, $output); - $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; $sub_condition .= $str; @@ -627,8 +634,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' Where '.$condition; return $condition; } @@ -641,7 +646,7 @@ $table_list[] = '"'.$this->prefix.$val.'"'; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { $name = $val['name']; $value = $val['value']; @@ -752,9 +757,21 @@ // 테이블 정리 $table_list = array(); foreach($output->tables as $key => $val) { - $table_list[] = sprintf("\"%s%s\" as \"%s\"", $this->prefix, $val, $key); + $table_list[] = sprintf("\"%s%s\" as \"%s\"", $this->prefix, $val, $key); } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' "'.$this->prefix.$output->_tables[$key].'" as '.$key . ' on (' . $condition . ')'; + } + } + + if(!$output->columns) { $columns = '*'; } else { @@ -762,7 +779,7 @@ foreach($output->columns as $key => $val) { $name = $val['name']; $alias = $val['alias']; - + if($alias == "") $column_list[] = $this->autoQuotes($name); else @@ -773,7 +790,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -792,7 +809,7 @@ if($output->list_count['value']) $limit = sprintf('FIRST %d', $output->list_count['value']); else $limit = ''; - $query = sprintf("select %s %s from %s %s", $limit, $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if($output->groups) { foreach($output->groups as $key => $val) { @@ -825,11 +842,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf('select count(*) as "count" from %s %s;', implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -868,8 +885,8 @@ } } - $limit = sprintf('FIRST %d SKIP %d ', $list_count, $start_count); - $query = sprintf('SELECT %s %s FROM %s %s', $limit, $columns, implode(',',$table_list), $condition); + $limit = sprintf('FIRST %d SKIP %d ', $list_count, $start_count); + $query = sprintf('SELECT %s %s FROM %s %s %s', $limit, $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if($output->groups) { foreach($output->groups as $key => $val) { diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index dee547f95..d61a1f869 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -376,8 +376,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -387,10 +398,9 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -401,8 +411,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -493,6 +501,16 @@ $table_list[] = '`'.$this->prefix.$val.'` as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' `'.$this->prefix.$output->_tables[$key].'` as '.$key . ' on (' . $condition . ')'; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -515,7 +533,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -530,7 +548,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -558,11 +576,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -599,7 +617,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -611,7 +629,6 @@ } $query = sprintf('%s limit %d, %d', $query, $start_count, $list_count); - $result = $this->_query($query); if($this->isError()) { $buff = new Object(); diff --git a/classes/db/DBMysql_innodb.class.php b/classes/db/DBMysql_innodb.class.php index f9cfa704e..4203d1c7b 100644 --- a/classes/db/DBMysql_innodb.class.php +++ b/classes/db/DBMysql_innodb.class.php @@ -385,8 +385,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -396,10 +407,10 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -410,8 +421,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -502,6 +511,17 @@ $table_list[] = '`'.$this->prefix.$val.'` as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' `'.$this->prefix.$output->_tables[$key].'` as '.$key . ' on (' . $condition . ')'; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -524,7 +544,8 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); + // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -539,7 +560,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -567,11 +588,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -608,7 +629,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); if($output->order) { diff --git a/classes/db/DBPostgresql.class.php b/classes/db/DBPostgresql.class.php index ac593469a..0e7fb8b07 100644 --- a/classes/db/DBPostgresql.class.php +++ b/classes/db/DBPostgresql.class.php @@ -69,20 +69,20 @@ * @brief DB 접속 **/ function _connect() { - // pg용 connection string - $conn_string = ""; + // pg용 connection string + $conn_string = ""; // db 정보가 없으면 무시 if(!$this->hostname || !$this->userid || !$this->database) return; - // connection string 만들기 - $conn_string .= ($this->hostname) ? " host=$this->hostname" : ""; - $conn_string .= ($this->userid) ? " user=$this->userid" : ""; - $conn_string .= ($this->password) ? " password=$this->password" : ""; - $conn_string .= ($this->database) ? " dbname=$this->database" : ""; - $conn_string .= ($this->port) ? " port=$this->port" : ""; + // connection string 만들기 + $conn_string .= ($this->hostname) ? " host=$this->hostname" : ""; + $conn_string .= ($this->userid) ? " user=$this->userid" : ""; + $conn_string .= ($this->password) ? " password=$this->password" : ""; + $conn_string .= ($this->database) ? " dbname=$this->database" : ""; + $conn_string .= ($this->port) ? " port=$this->port" : ""; - // 접속시도 + // 접속시도 $this->fd = @pg_connect($conn_string); if(!$this->fd || pg_connection_status($this->fd) != PGSQL_CONNECTION_OK) { $this->setError(-1, "CONNECTION FAILURE"); @@ -314,10 +314,10 @@ // 테이블 생성 schema 작성 $table_name = $xml_obj->table->attrs->name; - if($table_name == 'sequence') { + if($table_name == 'sequence') { $query = sprintf('create sequence %s', $this->prefix.$table_name); - return $this->_query($query); - } + return $this->_query($query); + } if($this->isTableExists($table_name)) return; $table_name = $this->prefix.$table_name; @@ -336,7 +336,7 @@ $default = $column->attrs->default; $auto_increment = $column->attrs->auto_increment; - if($type == "bignumber" || $type == "number") $size = 0; + if($type == "bignumber" || $type == "number") $size = 0; $column_schema[] = sprintf('%s %s%s %s %s', $name, @@ -361,7 +361,7 @@ } } - + $schema = sprintf('create table %s (%s%s);', $this->addQuotes($table_name), "\n", implode($column_schema,",\n")); $output = $this->_query($schema); @@ -381,8 +381,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -392,10 +403,10 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -406,11 +417,10 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } + /** * @brief insertAct 처리 **/ @@ -420,7 +430,7 @@ $table_list[] = $this->prefix.$val; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { $name = $val['name']; $value = $val['value']; @@ -446,7 +456,7 @@ $table_list[] = $this->prefix.$val.' as '.$key; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { if(!isset($val['value'])) continue; $name = $val['name']; @@ -498,6 +508,18 @@ $table_list[] = $this->prefix.$val.' as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' '.$this->prefix.$output->_tables[$key].' as '.$key . ' on (' . $condition . ')'; + } + } + + if(!$output->columns) { $columns = '*'; } else { @@ -520,7 +542,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -535,7 +557,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -560,11 +582,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -601,7 +623,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); diff --git a/classes/db/DBSqlite2.class.php b/classes/db/DBSqlite2.class.php index 47bfd5f48..34efa7da6 100644 --- a/classes/db/DBSqlite2.class.php +++ b/classes/db/DBSqlite2.class.php @@ -357,8 +357,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -368,10 +379,10 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -382,8 +393,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -509,6 +518,17 @@ $table_list[] = $this->prefix.$val.' as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' '.$this->prefix.$output->_tables[$key].' as '.$key . ' on ' . $condition . ''; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -531,7 +551,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -546,7 +566,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -574,12 +594,14 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); + $total_count = $this->getCountCache($output->tables, $condition); + if($total_count === false) { $result = $this->_query($count_query); $count_output = $this->_fetch($result); @@ -615,7 +637,8 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); + if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); diff --git a/classes/db/DBSqlite3_pdo.class.php b/classes/db/DBSqlite3_pdo.class.php index 994e1cec9..d22f349a1 100644 --- a/classes/db/DBSqlite3_pdo.class.php +++ b/classes/db/DBSqlite3_pdo.class.php @@ -386,8 +386,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -397,12 +408,11 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; - $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; $sub_condition .= $str; @@ -412,8 +422,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -550,6 +558,19 @@ $table_list[] = $this->prefix.$val.' as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' '.$this->prefix.$output->_tables[$key].' as '.$key . ' on (' . $condition . ')'; + } + } + + + if(!$output->columns) { $columns = '*'; } else { @@ -572,7 +593,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, ,$left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -587,7 +608,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -615,11 +636,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $this->_prepare($count_query); @@ -656,7 +677,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); diff --git a/classes/xml/XmlQueryParser.class.php b/classes/xml/XmlQueryParser.class.php index 2420b6b9c..be30f05d7 100644 --- a/classes/xml/XmlQueryParser.class.php +++ b/classes/xml/XmlQueryParser.class.php @@ -15,7 +15,7 @@ **/ function parse($query_id, $xml_file, $cache_file) { // query xml 파일을 찾아서 파싱, 결과가 없으면 return - $buff = FileHandler::readFile($xml_file); + $buff = FileHandler::readFile($xml_file); $xml_obj = parent::parse($buff); if(!$xml_obj) return; unset($buff); @@ -38,9 +38,14 @@ // 테이블 정리 (배열코드로 변환) $tables = $xml_obj->query->tables->table; + $output->left_tables = array(); + + $left_conditions = array(); + if(!$tables) return; if(!is_array($tables)) $tables = array($tables); foreach($tables as $key => $val) { + // 테이블과 alias의 이름을 구함 $table_name = $val->attrs->name; $alias = $val->attrs->alias; @@ -48,6 +53,11 @@ $output->tables[$alias] = $table_name; + if(in_array($val->attrs->type,array('left join','left outer join','right join','right outer join')) && count($val->conditions)){ + $output->left_tables[$alias] = $val->attrs->type; + $left_conditions[$alias] = $val->conditions; + } + // 테이블을 찾아서 컬럼의 속성을 구함 $table_file = sprintf('%s%s/%s/schemas/%s.xml', _XE_PATH_, 'modules', $module, $table_name); if(!file_exists($table_file)) { @@ -75,167 +85,92 @@ } } + // 컬럼 정리 $columns = $xml_obj->query->columns->column; - if(!$columns) { - $output->column[] = array("*" => "*"); - } else { - if(!is_array($columns)) $columns = array($columns); - foreach($columns as $key => $val) { - $name = $val->attrs->name; - /* - if(strpos('.',$name)===false && count($output->tables)==1) { - $tmp = array_values($output->tables); - $name = sprintf('%s.%s', $tmp[0], $val->attrs->name); - } - */ + $out = $this->_setColumn($columns); + $output->columns = $out->columns; - $output->columns[] = array( - "name" => $name, - "var" => $val->attrs->var, - "default" => $val->attrs->default, - "notnull" => $val->attrs->notnull, - "filter" => $val->attrs->filter, - "minlength" => $val->attrs->minlength, - "maxlength" => $val->attrs->maxlength, - "alias" => $val->attrs->alias, - ); - } - } - - // 조건절 정리 $conditions = $xml_obj->query->conditions; + $out = $this->_setConditions($conditions); + $output->conditions = $out->conditions; - $condition = $conditions->condition; - if($condition) { - $obj->condition = $condition; - unset($condition); - $condition = array($obj); - } - - $condition_group = $conditions->group; - if($condition_group && !is_array($condition_group)) $condition_group = array($condition_group); - - if($condition && $condition_group) $cond = array_merge($condition, $condition_group); - elseif($condition_group) $cond = $condition_group; - else $cond = $condition; - - if($cond) { - foreach($cond as $key => $val) { - unset($cond_output); - - if($val->attrs->pipe) $cond_output->pipe = $val->attrs->pipe; - else $cond_output->pipe = null; - - if(!$val->condition) continue; - if(!is_array($val->condition)) $val->condition = array($val->condition); - - foreach($val->condition as $k => $v) { - $obj = $v->attrs; - if(!$obj->alias) $obj->alias = $obj->column; - $cond_output->condition[] = $obj; - } - - $output->conditions[] = $cond_output; + foreach($output->left_tables as $key => $val){ + if($left_conditions[$key]){ + $out = $this->_setConditions($left_conditions[$key]); + $output->left_conditions[$key] = $out->conditions; } } - // group 정리 $group_list = $xml_obj->query->groups->group; - if($group_list) { - if(!is_array($group_list)) $group_list = array($group_list); - for($i=0;$iattrs->column); - if(!$column) continue; - $group_column_list[] = $column; - } - if(count($group_column_list)) $output->groups = $group_column_list; - } + $out = $this->_setGroup($group_list); + $output->groups = $out->groups; // 네비게이션 정리 - $navigation = $xml_obj->query->navigation; - if($navigation) { - $order = $navigation->index; - if($order) { - if(!is_array($order)) $order = array($order); - foreach($order as $order_info) { - $output->order[] = $order_info->attrs; - } - } + $out = $this->_setNavigation($xml_obj); + $output->order = $out->order; + $output->list_count = $out->list_count; + $output->page_count = $out->page_count; + $output->page = $out->page; - $list_count = $navigation->list_count->attrs; - $output->list_count = $list_count; - - $page_count = $navigation->page_count->attrs; - $output->page_count = $page_count; - - $page = $navigation->page->attrs; - $output->page = $page ; - } $column_count = count($output->columns); $condition_count = count($output->conditions); - // php script 생성 - - // table 정리 $buff .= '$output->tables = array( '; + foreach($output->tables as $key => $val) { + if(!array_key_exists($key,$output->left_tables)){ + $buff .= sprintf('"%s"=>"%s",', $key, $val); + } + } + $buff .= ' );'."\n"; + + + // php script 생성 + $buff .= '$output->_tables = array( '; foreach($output->tables as $key => $val) { $buff .= sprintf('"%s"=>"%s",', $key, $val); } $buff .= ' );'."\n"; + + + if(count($output->left_tables)){ + $buff .= '$output->left_tables = array( '; + foreach($output->left_tables as $key => $val) { + $buff .= sprintf('"%s"=>"%s",', $key, $val); + } + $buff .= ' );'."\n"; + } + + // column 정리 if($column_count) { $buff .= '$output->columns = array ( '; - foreach($output->columns as $key => $val) { - $val['default'] = $this->getDefault($val['name'], $val['default']); - if($val['var'] && strpos($val['var'],'.')===false) { - - if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s?$args->%s:%s),%s', $val['name'], $val['alias'], $val['var'], $val['var'], $val['default'] ,"\n"); - else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s),%s', $val['name'], $val['alias'], $val['var'], "\n"); - - if($val['default']) $default_list[$val['var']] = $val['default']; - if($val['notnull']) $notnull_list[] = $val['var']; - if($val['minlength']) $minlength_list[$val['var']] = $val['minlength']; - if($val['maxlength']) $maxlength_list[$val['var']] = $val['maxlength']; - } else { - if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>%s),%s', $val['name'], $val['alias'], $val['default'] ,"\n"); - else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s",),%s', $val['name'], $val['alias'], "\n"); - } - } + $buff .= $this->_getColumn($output->columns); $buff .= ' );'."\n"; } // conditions 정리 if($condition_count) { $buff .= '$output->conditions = array ( '; - foreach($output->conditions as $key => $val) { - $buff .= sprintf('array("pipe"=>"%s",%s"condition"=>array(', $val->pipe,"\n"); - foreach($val->condition as $k => $v) { - $v->default = $this->getDefault($v->column, $v->default); - if($v->var) { - if(strpos($v->var,".")===false) { - if($v->default) $default_list[$v->var] = $v->default; - if($v->filter) $filter_list[] = $v; - if($v->notnull) $notnull_list[] = $v->var; - if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s?$args->%s:%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->var, $v->default, $v->pipe, $v->operation, "\n"); - else $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); - } else { - $buff .= sprintf('array("column"=>"%s", "value"=>"%s","pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); - } - } else { - if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->default ,$v->pipe, $v->operation,"\n"); - else $buff .= sprintf('array("column"=>"%s", "pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->pipe, $v->operation,"\n"); - } - } - $buff .= ')),'."\n"; - } - + $buff .= $this->_getConditions($output->conditions); $buff .= ' );'."\n"; } + // conditions 정리 + if(count($output->left_conditions)) { + $buff .= '$output->left_conditions = array ( '; + foreach($output->left_conditions as $key => $val){ + $buff .= "'{$key}' => array ( "; + $buff .= $this->_getConditions($val); + $buff .= "),\n"; + } + $buff .= ' );'."\n"; + } + + + // order 정리 if($output->order) { $buff .= '$output->order = array('; @@ -312,6 +247,179 @@ FileHandler::writeFile($cache_file, $buff); } + + + + function _setColumn($columns){ + + if(!$columns) { + $output->column[] = array("*" => "*"); + } else { + if(!is_array($columns)) $columns = array($columns); + foreach($columns as $key => $val) { + $name = $val->attrs->name; + /* + if(strpos('.',$name)===false && count($output->tables)==1) { + $tmp = array_values($output->tables); + $name = sprintf('%s.%s', $tmp[0], $val->attrs->name); + } + */ + + $output->columns[] = array( + "name" => $name, + "var" => $val->attrs->var, + "default" => $val->attrs->default, + "notnull" => $val->attrs->notnull, + "filter" => $val->attrs->filter, + "minlength" => $val->attrs->minlength, + "maxlength" => $val->attrs->maxlength, + "alias" => $val->attrs->alias, + ); + } + } + return $output; + } + + + function _setConditions($conditions){ + // 조건절 정리 + + $condition = $conditions->condition; + if($condition) { + $obj->condition = $condition; + unset($condition); + $condition = array($obj); + } + $condition_group = $conditions->group; + if($condition_group && !is_array($condition_group)) $condition_group = array($condition_group); + + if($condition && $condition_group) $cond = array_merge($condition, $condition_group); + elseif($condition_group) $cond = $condition_group; + else $cond = $condition; + + if($cond) { + foreach($cond as $key => $val) { + unset($cond_output); + + if($val->attrs->pipe) $cond_output->pipe = $val->attrs->pipe; + else $cond_output->pipe = null; + + if(!$val->condition) continue; + if(!is_array($val->condition)) $val->condition = array($val->condition); + + foreach($val->condition as $k => $v) { + $obj = $v->attrs; + if(!$obj->alias) $obj->alias = $obj->column; + $cond_output->condition[] = $obj; + } + + $output->conditions[] = $cond_output; + } + } + return $output; + } + + function _setGroup($group_list){ + // group 정리 + + if($group_list) { + if(!is_array($group_list)) $group_list = array($group_list); + for($i=0;$iattrs->column); + if(!$column) continue; + $group_column_list[] = $column; + } + if(count($group_column_list)) $output->groups = $group_column_list; + } + return $output; + } + + + function _setNavigation($xml_obj){ + $navigation = $xml_obj->query->navigation; + if($navigation) { + $order = $navigation->index; + if($order) { + if(!is_array($order)) $order = array($order); + foreach($order as $order_info) { + $output->order[] = $order_info->attrs; + } + } + + $list_count = $navigation->list_count->attrs; + $output->list_count = $list_count; + + $page_count = $navigation->page_count->attrs; + $output->page_count = $page_count; + + $page = $navigation->page->attrs; + $output->page = $page ; + } + return $output; + } + + + + + + function _getColumn($columns){ + $buff = ''; + foreach($columns as $key => $val) { + $val['default'] = $this->getDefault($val['name'], $val['default']); + if($val['var'] && strpos($val['var'],'.')===false) { + + if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s?$args->%s:%s),%s', $val['name'], $val['alias'], $val['var'], $val['var'], $val['default'] ,"\n"); + else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s),%s', $val['name'], $val['alias'], $val['var'], "\n"); + + if($val['default']) $default_list[$val['var']] = $val['default']; + if($val['notnull']) $notnull_list[] = $val['var']; + if($val['minlength']) $minlength_list[$val['var']] = $val['minlength']; + if($val['maxlength']) $maxlength_list[$val['var']] = $val['maxlength']; + } else { + if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>%s),%s', $val['name'], $val['alias'], $val['default'] ,"\n"); + else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s",),%s', $val['name'], $val['alias'], "\n"); + } + } + return $buff; + } + + + + + + function _getConditions($conditions){ + $buff = ''; + foreach($conditions as $key => $val) { + $buff .= sprintf('array("pipe"=>"%s",%s"condition"=>array(', $val->pipe,"\n"); + foreach($val->condition as $k => $v) { + $v->default = $this->getDefault($v->column, $v->default); + if($v->var) { + if(strpos($v->var,".")===false) { + if($v->default) $default_list[$v->var] = $v->default; + if($v->filter) $filter_list[] = $v; + if($v->notnull) $notnull_list[] = $v->var; + if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s?$args->%s:%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->var, $v->default, $v->pipe, $v->operation, "\n"); + else $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); + } else { + $buff .= sprintf('array("column"=>"%s", "value"=>"%s","pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); + } + } else { + if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->default ,$v->pipe, $v->operation,"\n"); + else $buff .= sprintf('array("column"=>"%s", "pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->pipe, $v->operation,"\n"); + } + } + $buff .= ')),'."\n"; + } + return $buff; + } + + + + + + + /** * @brief column, condition등의 key에 default 값을 세팅 **/ @@ -331,7 +439,7 @@ $val = 'time()'; break; case 'curdate' : - $val = 'date("YmdHis")'; + $val = 'date("YmdHis")'; break; case 'sequence' : $val = '$this->getNextSequence()'; From e8198a4381eecce0834e3d962704131e72938b70 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 2 Jan 2009 09:06:22 +0000 Subject: [PATCH 47/82] =?UTF-8?q?17596244=20*=20autolink=20=EC=95=A0?= =?UTF-8?q?=EB=93=9C=EC=98=A8=EC=97=90=EC=84=9C=20=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=EC=97=B4=EC=9D=B4=20HTML=20=EC=BD=94=EB=93=9C=EB=A1=9C=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5200 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/autolink/autolink.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/addons/autolink/autolink.js b/addons/autolink/autolink.js index 62cc2c3e5..f77ab3f3e 100644 --- a/addons/autolink/autolink.js +++ b/addons/autolink/autolink.js @@ -2,8 +2,7 @@ jQuery(function($) { var url_regx = /((http|https|ftp|news|telnet|irc):\/\/(([0-9a-z\-._~!$&'\(\)*+,;=:]|(%[0-9a-f]{2}))*\@)?((\[(((([0-9a-f]{1,4}:){6}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(::([0-9a-f]{1,4}:){5}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(([0-9a-f]{1,4})?::([0-9a-f]{1,4}:){4}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){3}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){2}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4})|((([0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::))|(v[0-9a-f]+.[0-9a-z\-._~!$&'\(\)*+,;=:]+))\])|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5]))|(([0-9a-z\-._~!$&'\(\)*+,;=]|(%[0-9a-f]{2}))+))(:[0-9]*)?(\/([0-9a-z\-._~!$&'\(\)*+,;=:@]|(%[0-9a-f]{2}))*)*(\?([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?(#([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?)/i; - function replaceHrefLink(target_obj) { - var obj = target_obj; + function replaceHrefLink(obj) { var obj_list = obj.childNodes; for(var i=0; i < obj_list.length; ++i) { @@ -12,15 +11,18 @@ jQuery(function($) { if(!pObj) continue; var pN = pObj.nodeName.toLowerCase(); - if($.inArray(pN, ['a', 'pre', 'xml', 'textarea', 'input']) != -1) continue; + if($.inArray(pN, ['a', 'pre', 'xml', 'textarea', 'input', 'option', 'code']) != -1) continue; if(obj.nodeType == 3 && obj.length >= 10) { - var html = obj.nodeValue.replace(url_regx, '$1'); - $(obj).replaceWith(html); - delete(html); + var content = obj.nodeValue; + content = content.replace('<', '<'); + content = content.replace('>', '>'); + content = content.replace(url_regx, '$1'); + $(obj).replaceWith(content); + delete(content); } else if(obj.nodeType == 1 && obj.childNodes.length) { - if($.inArray(obj.nodeName.toLowerCase(), ['a', 'pre', 'xml', 'textarea', 'input']) != -1) continue; + if($.inArray(obj.nodeName.toLowerCase(), ['a', 'pre', 'xml', 'textarea', 'input', 'option', 'code']) != -1) continue; replaceHrefLink(obj); } } From 816c6f45ce4bf40acc3d050c43e6ccf1cbfb71d2 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 2 Jan 2009 13:11:58 +0000 Subject: [PATCH 48/82] =?UTF-8?q?17596244=20*=20autolink=20=EC=95=A0?= =?UTF-8?q?=EB=93=9C=EC=98=A8=20=EC=B6=94=EA=B0=80=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5201 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/autolink/autolink.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/autolink/autolink.js b/addons/autolink/autolink.js index f77ab3f3e..fa4478039 100644 --- a/addons/autolink/autolink.js +++ b/addons/autolink/autolink.js @@ -5,7 +5,7 @@ jQuery(function($) { function replaceHrefLink(obj) { var obj_list = obj.childNodes; - for(var i=0; i < obj_list.length; ++i) { + for(var i = 0; i < obj_list.length; ++i) { var obj = obj_list[i]; var pObj = obj.parentNode; if(!pObj) continue; @@ -15,14 +15,16 @@ jQuery(function($) { if(obj.nodeType == 3 && obj.length >= 10) { var content = obj.nodeValue; - content = content.replace('<', '<'); - content = content.replace('>', '>'); + if(!url_regx.test(content)) continue; + + content = content.replace(//g, '>'); content = content.replace(url_regx, '$1'); + $(obj).replaceWith(content); delete(content); } else if(obj.nodeType == 1 && obj.childNodes.length) { - if($.inArray(obj.nodeName.toLowerCase(), ['a', 'pre', 'xml', 'textarea', 'input', 'option', 'code']) != -1) continue; replaceHrefLink(obj); } } From 3a5ba66dd9faea1eeceb52fca735917911f28225 Mon Sep 17 00:00:00 2001 From: haneul Date: Fri, 2 Jan 2009 13:20:19 +0000 Subject: [PATCH 49/82] #17598380 : fixed the error due to missed comma git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5202 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DBSqlite3_pdo.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/db/DBSqlite3_pdo.class.php b/classes/db/DBSqlite3_pdo.class.php index d22f349a1..000487132 100644 --- a/classes/db/DBSqlite3_pdo.class.php +++ b/classes/db/DBSqlite3_pdo.class.php @@ -593,7 +593,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, ,$left_join, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { From 2f9be8468132a3062acc574e065b521ddafefb22 Mon Sep 17 00:00:00 2001 From: bnu Date: Sun, 4 Jan 2009 17:12:43 +0000 Subject: [PATCH 50/82] =?UTF-8?q?=EB=94=94=EB=B2=84=EA=B9=85=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5203 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/admin.admin.view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index f5e17314d..9dbc5bd27 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -214,7 +214,7 @@ **/ function dispAdminConfig() { $db_info = Context::getDBInfo(); - debugPrint($db_info); + Context::set('selected_lang', $db_info->lang_type); Context::set('lang_supported', Context::loadLangSupported()); From 89cb51fd13ff594b3f6fe01debb6df900b6e6340 Mon Sep 17 00:00:00 2001 From: bnu Date: Sun, 4 Jan 2009 18:03:55 +0000 Subject: [PATCH 51/82] =?UTF-8?q?debugPrint()=ED=95=A8=EC=88=98=EA=B0=80?= =?UTF-8?q?=20=EB=94=94=EB=B2=84=EA=B7=B8=20=EB=AA=A8=EB=93=9C=20=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94=20=EB=90=98=EC=96=B4=20=EC=9E=88=EB=8A=94=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=EC=97=90=EB=A7=8C=20=EB=8F=99=EC=9E=91?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5204 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/func.inc.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/config/func.inc.php b/config/func.inc.php index 4bae4ba18..852a1cd89 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -277,7 +277,7 @@ $g_min = $t_min - $c_min; $g_hour = $t_hour - $c_hour; - $gap = $g_min*60 + $g_hour*60*60; //TODO : 연산 우선순위에 따라 코드를 묶어줄 필요가 있음 + $gap = $g_min*60 + $g_hour*60*60; return $gap; } @@ -387,16 +387,18 @@ * tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다 **/ function debugPrint($buff = null, $display_line = true) { - $debug_file = _XE_PATH_."files/_debug_message.php"; - $bt = debug_backtrace(); - if(is_array($bt)) $first = array_shift($bt); - $buff = sprintf("[%s %s:%d]\n%s\n", date("Y-m-d H:i:s"), array_pop(explode(DIRECTORY_SEPARATOR, $first["file"])), $first["line"], print_r($buff,true)); + if(__DEBUG__ != 0 && __DEBUG_OUTPUT__ === 1) { + $debug_file = _XE_PATH_."files/_debug_message.php"; + $bt = debug_backtrace(); + if(is_array($bt)) $first = array_shift($bt); + $buff = sprintf("[%s %s:%d]\n%s\n", date("Y-m-d H:i:s"), array_pop(explode(DIRECTORY_SEPARATOR, $first["file"])), $first["line"], print_r($buff,true)); - if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; + if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; - if(@!$fp = fopen($debug_file,"a")) return; - fwrite($fp, $buff); - fclose($fp); + if(@!$fp = fopen($debug_file,"a")) return; + fwrite($fp, $buff); + fclose($fp); + } } /** From f406df334923478c2fa1b6173768bf7374f7a965 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 01:48:53 +0000 Subject: [PATCH 52/82] =?UTF-8?q?planet=5Fdocument=20=EC=9C=84=EC=A0=AF?= =?UTF-8?q?=EC=97=90=20=EC=A4=91=EB=B3=B5=20=ED=97=88=EC=9A=A9/=20?= =?UTF-8?q?=EB=B9=84=ED=97=88=EC=9A=A9=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5205 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/planet_document/conf/info.xml | 33 +++++++++++++++++ .../planet_document/planet_document.class.php | 28 +++++++++++---- .../queries/getNewestDocuments.xml | 35 +++++++++++++++++++ .../queries/getUniqueNewestDocuments.xml | 35 +++++++++++++++++++ 4 files changed, 124 insertions(+), 7 deletions(-) create mode 100644 widgets/planet_document/queries/getNewestDocuments.xml create mode 100644 widgets/planet_document/queries/getUniqueNewestDocuments.xml diff --git a/widgets/planet_document/conf/info.xml b/widgets/planet_document/conf/info.xml index fb5af5723..1405ba0aa 100644 --- a/widgets/planet_document/conf/info.xml +++ b/widgets/planet_document/conf/info.xml @@ -79,5 +79,38 @@ Вы можете установить вытсоту изображения. (стандарт: 50px) 指定圖片高度。(預設是50px) + + select + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + + N + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + + + Y + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + + diff --git a/widgets/planet_document/planet_document.class.php b/widgets/planet_document/planet_document.class.php index afbb8904b..a3ba1e9a4 100644 --- a/widgets/planet_document/planet_document.class.php +++ b/widgets/planet_document/planet_document.class.php @@ -22,11 +22,25 @@ $list_count = (int)$args->list_count; if(!$list_count) $list_count = 5; + // 중복 허용/ 비허용 체크 + if($args->allow_repetition != 'Y') { + $output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments'); + } else { + $output = executeQueryArray('widgets.planet_document.getNewestDocuments'); + } + // 플래닛 글 목록 구함 $oPlanetModel = &getModel('planet'); Context::set('planet', $planet = $oPlanetModel->getPlanet()); - $output = $oPlanetModel->getContentList(null, 'content', '', 1, $list_count); - Context::set('planet_list', $output->data); + + foreach($output->data as $key => $val) { + $document_srl = $val->document_srl; + $oPlanet = null; + $oPlanet = new PlanetItem(); + $oPlanet->setAttribute($val); + $planet_list[] = $oPlanet; + } + Context::set('planet_list', $planet_list); // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); @@ -35,11 +49,11 @@ // 템플릿 파일을 지정 $tpl_file = 'list'; - if(!$args->thumbnail_width) $args->thumbnail_width = 50; - if(!$args->thumbnail_height) $args->thumbnail_height = 50; - $widget_info->thumbnail_width = $args->thumbnail_width; - $widget_info->thumbnail_height = $args->thumbnail_height; - Context::set('widget_info', $widget_info); + if(!$args->thumbnail_width) $args->thumbnail_width = 50; + if(!$args->thumbnail_height) $args->thumbnail_height = 50; + $widget_info->thumbnail_width = $args->thumbnail_width; + $widget_info->thumbnail_height = $args->thumbnail_height; + Context::set('widget_info', $widget_info); // 템플릿 컴파일 $oTemplate = &TemplateHandler::getInstance(); diff --git a/widgets/planet_document/queries/getNewestDocuments.xml b/widgets/planet_document/queries/getNewestDocuments.xml new file mode 100644 index 000000000..8a18737b4 --- /dev/null +++ b/widgets/planet_document/queries/getNewestDocuments.xml @@ -0,0 +1,35 @@ + + + +
                +
                +
                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/widgets/planet_document/queries/getUniqueNewestDocuments.xml b/widgets/planet_document/queries/getUniqueNewestDocuments.xml new file mode 100644 index 000000000..324ee36c7 --- /dev/null +++ b/widgets/planet_document/queries/getUniqueNewestDocuments.xml @@ -0,0 +1,35 @@ + + +
                +
                +
                +
                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2395c36ae9a41abe7ab96b04f9a2d17c8e6e3b71 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 01:50:08 +0000 Subject: [PATCH 53/82] =?UTF-8?q?dbHandler=EC=9D=98=20operation=EC=97=90?= =?UTF-8?q?=20not=20in=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5206 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DB.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 345ab6894..b9eeb8549 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -372,6 +372,9 @@ case 'like' : $value = '%'.$value.'%'; break; + case 'notin' : + return "'".$value."'"; + break; case 'in' : return "'".$value."'"; break; @@ -395,6 +398,7 @@ case 'like_prefix' : case 'like' : case 'in' : + case 'notin' : case 'notequal' : // 변수가 세팅되지 않고, 문자열이나 숫자형이 아니면 리턴 if(!isset($value)) return; @@ -426,6 +430,9 @@ case 'in' : return $name.' in ('.$value.')'; break; + case 'notin' : + return $name.' notin ('.$value.')'; + break; case 'notequal' : return $name.' <> '.$value; break; From 51adeb74f3e9841358b9783bfff00964505a55d1 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 02:23:23 +0000 Subject: [PATCH 54/82] =?UTF-8?q?=EC=BA=90=EC=8B=9C=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=9E=AC=EC=83=9D=EC=84=B1=EC=8B=9C=20=EA=B0=9C=EB=B0=9C=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EB=94=94=EB=B2=84=EA=B7=B8=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=8F=84=20=EC=A7=80=EC=9A=B0=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5207 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/admin.admin.controller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index 4db3e2389..0fcad69d4 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -19,6 +19,12 @@ $oModuleModel = &getModel('module'); $module_list = $oModuleModel->getModuleList(); + // 개발 디버그 파일들 제거 + FileHandler::removeFile(_XE_PATH_.'files/_debug_message.php'); + FileHandler::removeFile(_XE_PATH_.'files/_debug_db_query.php'); + FileHandler::removeFile(_XE_PATH_.'files/_db_slow_query.php'); + + // 각 모듈마다 돌면서 캐시 파일 제거 foreach($module_list as $module) { $oModule = null; $oModule = &getClass($module->module); From 2db129865d30642a8218de7cfcdb479df5f56216 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 02:26:40 +0000 Subject: [PATCH 55/82] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=8B=9C=20=ED=95=98=EB=8B=A8=EC=9D=98=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9E=90=20=EB=B2=84=ED=8A=BC=EC=9D=B4=20=EC=88=A8?= =?UTF-8?q?=EC=96=B4=EB=B2=84=EB=A6=AC=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5208 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/page/tpl/css/page.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/page/tpl/css/page.css b/modules/page/tpl/css/page.css index 411c16a66..796373da4 100644 --- a/modules/page/tpl/css/page.css +++ b/modules/page/tpl/css/page.css @@ -1,7 +1,7 @@ @charset "utf-8"; h3 { margin:0 10px 0 10px; } -.adminLayer { margin-top:30px; background-color:#fff;} +.adminLayer { margin-top:30px; background-color:#eee; border:1px solid #888;} .buttonBox { border:2px solid #EEEEEE; padding:5px; overflow:hidden; *zoom:1;} .buttonBox .fr { height:28px; } From 959946c2a01942c287b703e1738e9c54e922f022 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 03:31:19 +0000 Subject: [PATCH 56/82] =?UTF-8?q?XE=20=EA=B8=B0=EB=B3=B8=20=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=20=EB=AA=A9=EB=A1=9D=20=EC=8A=A4=ED=82=A8=EC=9D=98=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=A0=9C=EA=B1=B0=20=EB=B0=8F=20?= =?UTF-8?q?CSS=EB=A5=BC=20white/black=EC=9C=BC=EB=A1=9C=EB=A7=8C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5209 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../skins/blog_tag_list/css/common.css | 14 +++--- .../tag_list/skins/blog_tag_list/css/cyan.css | 5 -- .../skins/blog_tag_list/css/green.css | 5 -- .../skins/blog_tag_list/css/normal.css | 5 -- .../skins/blog_tag_list/css/purple.css | 5 -- .../tag_list/skins/blog_tag_list/css/red.css | 5 -- .../blog_tag_list/images/cyan/bgBoxTypeB.gif | Bin 207 -> 0 bytes .../blog_tag_list/images/green/bgBoxTypeB.gif | Bin 205 -> 0 bytes .../images/normal/bgBoxTypeB.gif | Bin 200 -> 0 bytes .../images/purple/bgBoxTypeB.gif | Bin 197 -> 0 bytes .../blog_tag_list/images/red/bgBoxTypeB.gif | Bin 196 -> 0 bytes widgets/tag_list/skins/blog_tag_list/skin.xml | 46 ++++-------------- .../tag_list/skins/blog_tag_list/tags.html | 43 +++++----------- 13 files changed, 30 insertions(+), 98 deletions(-) delete mode 100644 widgets/tag_list/skins/blog_tag_list/css/cyan.css delete mode 100644 widgets/tag_list/skins/blog_tag_list/css/green.css delete mode 100644 widgets/tag_list/skins/blog_tag_list/css/normal.css delete mode 100644 widgets/tag_list/skins/blog_tag_list/css/purple.css delete mode 100644 widgets/tag_list/skins/blog_tag_list/css/red.css delete mode 100644 widgets/tag_list/skins/blog_tag_list/images/cyan/bgBoxTypeB.gif delete mode 100644 widgets/tag_list/skins/blog_tag_list/images/green/bgBoxTypeB.gif delete mode 100644 widgets/tag_list/skins/blog_tag_list/images/normal/bgBoxTypeB.gif delete mode 100644 widgets/tag_list/skins/blog_tag_list/images/purple/bgBoxTypeB.gif delete mode 100644 widgets/tag_list/skins/blog_tag_list/images/red/bgBoxTypeB.gif diff --git a/widgets/tag_list/skins/blog_tag_list/css/common.css b/widgets/tag_list/skins/blog_tag_list/css/common.css index d7f60a786..e045e8e1c 100644 --- a/widgets/tag_list/skins/blog_tag_list/css/common.css +++ b/widgets/tag_list/skins/blog_tag_list/css/common.css @@ -1,6 +1,8 @@ -.tag_list .items span a { color:#a4a4a4; line-height:120%;} -.tag_list .items .typeA a { color:#fe3614; font-weight:bold; font-size:12pt; background-color:#EFEFEF; margin:0;} -.tag_list .items .typeB a { color:#fe3614; font-size:11pt; margin:0;} -.tag_list .items .typeC a { font-weight:bold; font-size:11pt; margin:0; background-color:#EFEFEF;} -.tag_list .items .typeD a { font-weight:bold; margin:0; background-color:#EFEFEF;} -.tag_list .items .typeE a { font-weight:normal; margin:0;} +.tag_list .items span a { text-decoration:none; color:#000; display:inline-block; margin:0 10px 5px 0; } +.tag_list .items span a:hover { text-decoration:underline;} +.tag_list .items .type1 a { font-weight:bold; font-size:18px; } +.tag_list .items .type2 a { font-size:18px; } +.tag_list .items .type3 a { font-weight:bold; font-size:14px; } +.tag_list .items .type4 a { } + +.blog_widget_black .tag_list .items span a { color:#fff; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/cyan.css b/widgets/tag_list/skins/blog_tag_list/css/cyan.css deleted file mode 100644 index 1ebc30a46..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/cyan.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_cyan .tag_list { border:1px solid #e0e1db; background:url(../images/cyan/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_cyan .tag_list h2 { padding:0; margin:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_cyan .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_cyan .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_cyan .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/green.css b/widgets/tag_list/skins/blog_tag_list/css/green.css deleted file mode 100644 index 2ef58b653..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/green.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_green .tag_list { border:1px solid #e0e1db; background:url(../images/green/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_green .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_green .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_green .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_green .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/normal.css b/widgets/tag_list/skins/blog_tag_list/css/normal.css deleted file mode 100644 index d010e7fc6..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/normal.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_normal .tag_list { border:1px solid #e0e1db; background:url(../images/normal/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_normal .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_normal .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_normal .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_normal .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/purple.css b/widgets/tag_list/skins/blog_tag_list/css/purple.css deleted file mode 100644 index 974396551..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/purple.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_purple .tag_list { border:1px solid #e0e1db; background:url(../images/purple/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_purple .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_purple .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_purple .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_purple .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/red.css b/widgets/tag_list/skins/blog_tag_list/css/red.css deleted file mode 100644 index 6bcd4df77..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/red.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_red .tag_list { border:1px solid #e0e1db; background:url(../images/red/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_red .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_red .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_red .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_red .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/images/cyan/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/cyan/bgBoxTypeB.gif deleted file mode 100644 index 99a8770454d1a10d58fdfd3c07027e8ba0315dbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 207 zcmZ?wbhEHbWMz=ojdHLCg zFCV}C`2YVu0}LqsWC1gEKqSac238*h^)81R7fe|~)a`Q_!e*Dt=l{POGT-YYwve0lcc&(D`%U%mVB z;nlY{AAf#+{r&B;uP?s-{`U6!`{!R@e*g3H>({T}et-Y)^W)cFUw{7n`SItcH{ahr z{qp?(|Njg~K=CIFn5P3GL3T2*dOc9<3XfFM&{~`QU{{EYy-Duf@`bOR?i)KOq*<(y z=xs;|I+)@#?|e_ltrcP75pNQ9`&R62DX?%-vp$#JTXoiM$6e)#iFWgEyj5hd1^_n- Bb|(M; diff --git a/widgets/tag_list/skins/blog_tag_list/images/normal/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/normal/bgBoxTypeB.gif deleted file mode 100644 index 09f7dd59cd21149a0a456595a07cb8fccbb288c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmZ?wbhEHbWMznQ`}y<7w{Ktn{rmIz^M|irKmY#y z`|saB$BrNP`t|G2pWi=!{`mX%ufKnRD!>2w_2cW;Pyhb?{qp70@83WF|NqZ`4JiI( z0SoJZNRXWjtgZ@bU7?xt+-K?ONbh~GaM~-@*`n@kjs4&KO#v@7#8f?05_gJN%x%cH k;;@u$-Sw6*@0V5kr){YCqcL4D=zyAFE@blNlU%x*8{`2eakGDU5fBXIO-OpcNe*bv& zUi=lh?(zyAL5=Ewj4{~2%t#h)x-NgWUg zvXg<;X@P2&L!_97)SA_gcLnL34~W&bsC#4m^#6gD01pi@X diff --git a/widgets/tag_list/skins/blog_tag_list/skin.xml b/widgets/tag_list/skins/blog_tag_list/skin.xml index d06292276..4c6a75e3c 100644 --- a/widgets/tag_list/skins/blog_tag_list/skin.xml +++ b/widgets/tag_list/skins/blog_tag_list/skin.xml @@ -30,40 +30,14 @@ 레이아웃에 맞춤 隨版面 - - 기본 컬러 - デフォルトカラー - 默认颜色 - Default color - 預設顏色 - - - 청록색 - 青緑 - 青绿色 - cyan - 青綠色 - - - 초록색 - - 绿色 - green - 綠色 - - - 빨간색 - - 红色 - red - 紅色 - - - 보라색 - - 紫色 - purple - 紫色 - + + 검은색 + + Black + Черного + Negro + 黑色 + 黑色 + - \ No newline at end of file + diff --git a/widgets/tag_list/skins/blog_tag_list/tags.html b/widgets/tag_list/skins/blog_tag_list/tags.html index dea9cd609..326a881dd 100644 --- a/widgets/tag_list/skins/blog_tag_list/tags.html +++ b/widgets/tag_list/skins/blog_tag_list/tags.html @@ -2,50 +2,31 @@ - - - - - - - - - - + + {@ $colorset="black" } {@ $colorset="" }
                +
                -

                {$widget_info->title}

                - -

                tags

                -
                +
                - - - {@ $tag_class = "typeA" } - - {@ $tag_class = "typeB" } - - {@ $tag_class = "typeC" } - - {@ $tag_class = "typeD" } - - {@ $tag_class = "typeE" } - - - class="{$tag_class}" > - - {htmlspecialchars($val->tag)} + + + {htmlspecialchars($val->tag)} - {htmlspecialchars($val->tag)} + + {htmlspecialchars($val->tag)} + + {htmlspecialchars($val->tag)} + From 31542a73a4a85322c0e35b5fc74da2d0da093fd9 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 03:32:11 +0000 Subject: [PATCH 57/82] =?UTF-8?q?xe=20=EA=B8=B0=EB=B3=B8=20=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=20=EB=AA=A9=EB=A1=9D=20=EC=9C=84=EC=A0=AF=EC=9D=98=20?= =?UTF-8?q?css=20=EB=94=94=EB=A0=89=ED=86=A0=EB=A6=AC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5210 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/tag_list/skins/blog_tag_list/{css => }/common.css | 0 widgets/tag_list/skins/blog_tag_list/tags.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename widgets/tag_list/skins/blog_tag_list/{css => }/common.css (100%) diff --git a/widgets/tag_list/skins/blog_tag_list/css/common.css b/widgets/tag_list/skins/blog_tag_list/common.css similarity index 100% rename from widgets/tag_list/skins/blog_tag_list/css/common.css rename to widgets/tag_list/skins/blog_tag_list/common.css diff --git a/widgets/tag_list/skins/blog_tag_list/tags.html b/widgets/tag_list/skins/blog_tag_list/tags.html index 326a881dd..6dc328699 100644 --- a/widgets/tag_list/skins/blog_tag_list/tags.html +++ b/widgets/tag_list/skins/blog_tag_list/tags.html @@ -1,6 +1,6 @@ - + {@ $colorset="black" } From 8dade33f8fc925fb48f7627f0ebb1feca734009b Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 03:33:03 +0000 Subject: [PATCH 58/82] =?UTF-8?q?XE=20tag=5Flist=20=EC=9C=84=EC=A0=AF?= =?UTF-8?q?=EC=9D=98=20=ED=83=9C=EA=B7=B8=EB=A5=BC=204=EA=B0=9C=EC=9D=98?= =?UTF-8?q?=20=EB=8B=A8=EA=B3=84=EB=A1=9C=20rank=EB=A5=BC=20=EB=B6=80?= =?UTF-8?q?=EC=97=AC=ED=95=98=EB=8F=84=EB=A1=9D=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=EC=9D=84=20=EB=B3=80=EA=B2=BD=ED=95=98=EA=B3=A0=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=EC=9D=98=20=EB=AA=A8=EB=93=88=20=EC=84=A0=ED=83=9D=20?= =?UTF-8?q?=EB=8C=80=EC=83=81=EC=9D=84=201=EA=B0=9C=20=EC=9D=B4=EC=83=81?= =?UTF-8?q?=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=ED=95=98?= =?UTF-8?q?=EC=97=AC=201=EA=B0=9C=20=EC=84=A0=ED=83=9D=EC=8B=9C=20?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=20mid=EB=A1=9C=20=EA=B7=B8=EB=A0=87=EC=A7=80?= =?UTF-8?q?=20=EC=95=8A=EC=9C=BC=EB=A9=B4=20=ED=86=B5=ED=95=A9=EA=B2=80?= =?UTF-8?q?=EC=83=89=EC=9D=84=20=EC=9D=B4=EC=9A=A9=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=BD=94=EB=93=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5211 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/func.inc.php | 2 +- widgets/tag_list/conf/info.xml | 36 ++++++++++++------------- widgets/tag_list/tag_list.class.php | 42 ++++++++++++++++++----------- 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/config/func.inc.php b/config/func.inc.php index 852a1cd89..1c7e927e4 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -387,7 +387,7 @@ * tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다 **/ function debugPrint($buff = null, $display_line = true) { - if(__DEBUG__ != 0 && __DEBUG_OUTPUT__ === 1) { + if(__DEBUG__ != 0 && __DEBUG_OUTPUT__ !== 1) { $debug_file = _XE_PATH_."files/_debug_message.php"; $bt = debug_backtrace(); if(is_array($bt)) $first = array_shift($bt); diff --git a/widgets/tag_list/conf/info.xml b/widgets/tag_list/conf/info.xml index 3b5afe22e..a9975b96f 100644 --- a/widgets/tag_list/conf/info.xml +++ b/widgets/tag_list/conf/info.xml @@ -62,22 +62,22 @@ Вы можете сконфигурировать число тегов для показа. (стандарт: 20) 可設置要顯示的標籤數。(預設是 20個) - - mid - 대상 모듈 - 模块对象 - モジュール - Target Module - Módulo Objetivo - Модуль назначения - 目標模組 - 선택하신 모듈에 등록된 꼬리표를 대상으로 합니다. - 将把被选模块当中的标签作为对象。 - チェックされたモジュールに登録されたタグを対象とします。 - Tag list will be shown based on this target module. - Objetivo de la lista de etiquetas será la del módulo seleccionado. - Список тегов будет показан на основании этого модуля назначения. - 把所選擇的模組作為目標。 - + + mid_list + 대상 모듈 + 模块对象 + モジュール + Target Module + Módulo objetivo + Модуль назначения + 目標模組 + 선택하신 모듈에 등록된 글을 대상으로 합니다. + 将把被选模块当中的主题作为对象。 + チェックされたモジュールに登録されたコンテンツ(書き込み)を対象とします。 + The target articles for the newest comments will be the ones submitted in the selected module. + El objetivo de los comentarios recientes serán los comentarios agragados en el módulo selccionado. + Статьи назначения для последних комментариев будут теми, что были размещены в выбранном модуле. + 將所選擇的模組作為目標。 + - \ No newline at end of file + diff --git a/widgets/tag_list/tag_list.class.php b/widgets/tag_list/tag_list.class.php index a06b5d0f7..939184d23 100644 --- a/widgets/tag_list/tag_list.class.php +++ b/widgets/tag_list/tag_list.class.php @@ -19,15 +19,9 @@ $title = $args->title; $list_count = (int)$args->list_count; if(!$list_count) $list_count = 20; - if($args->mid_list) { - $tmp_mid = explode(",",$args->mid_list); - $mid = $tmp_mid[0]; - } else { - $mid = $args->mid; - } // TagModel::getTagList()를 이용하기 위한 변수 정리 - $obj->mid = $mid; + $obj->mid = $args->mid_list; $obj->list_count = $list_count; // tag 모듈의 model 객체를 받아서 getTagList() method를 실행 @@ -35,21 +29,37 @@ $output = $oTagModel->getTagList($obj); // 템플릿 파일에서 사용할 변수들을 세팅 - $widget_info->module_name = $mid; - + if(preg_match('/^([0-9a-z\_]+)$/i', $args->mid_list)) $widget_info->mid = $widget_info->module_name = $args->mid_list; $widget_info->title = $title; - $widget_info->mid = $mid; if(count($output->data)) { - - // 내용을 랜던으로 정렬 - $numbers = array_keys($output->data); - shuffle($numbers); - foreach($numbers as $k => $v) { - $widget_info->tag_list[] = $output->data[$v]; + $tags = array(); + $max = 0; + $min = 99999999; + foreach($output->data as $key => $val) { + $tag = trim($val->tag); + if(!$tag) continue; + $count = $val->count; + if($max < $count) $max = $count; + if($min > $count) $min = $count; + $tags[] = $val; } + + $mid2 = $min+(int)(($max-$min)/2); + $mid1 = $mid2+(int)(($max-$mid2)/2); + $mid3 = $min+(int)(($mid2-$min)/2); + + foreach($tags as $key => $item) { + if($item->count > $mid1) $rank = 1; + elseif($item->count > $mid2) $rank = 2; + elseif($item->count > $mid3) $rank = 3; + else $rank= 4; + $tags[$key]->rank = $rank; + } + shuffle($tags); } + $widget_info->tag_list = $tags; Context::set('widget_info', $widget_info); From 7fab10e4ac3809f13e16c7c2dbfbbc5ab48ad93c Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 03:47:24 +0000 Subject: [PATCH 59/82] =?UTF-8?q?=ED=94=8C=EB=9E=98=EB=8B=9B=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EC=9C=84=EC=A0=AF=EC=9D=98=20=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=EC=88=98=EA=B0=80=20=EC=A0=81=EC=9A=A9=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95.?= =?UTF-8?q?=20=ED=83=9C=EA=B7=B8=EB=AA=A9=EB=A1=9D(=EA=BC=AC=EB=A6=AC?= =?UTF-8?q?=ED=91=9C)=20=EC=9C=84=EC=A0=AF=EC=97=90=EC=84=9C=20=ED=86=B5?= =?UTF-8?q?=ED=95=A9=EA=B2=80=EC=83=89=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=A7=81=ED=81=AC=EC=8B=9C=20=EB=B3=80=EC=88=98=EB=AA=85=20?= =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20=EA=B2=83=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5212 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/member/skins/default/member_info.html | 9 --------- widgets/planet_document/planet_document.class.php | 5 +++-- widgets/tag_list/skins/blog_tag_list/tags.html | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/member/skins/default/member_info.html b/modules/member/skins/default/member_info.html index f4b210d50..b7b0ec101 100644 --- a/modules/member/skins/default/member_info.html +++ b/modules/member/skins/default/member_info.html @@ -5,15 +5,6 @@
                - - - - diff --git a/widgets/planet_document/planet_document.class.php b/widgets/planet_document/planet_document.class.php index a3ba1e9a4..305336d2f 100644 --- a/widgets/planet_document/planet_document.class.php +++ b/widgets/planet_document/planet_document.class.php @@ -21,12 +21,13 @@ // 출력된 목록 수 $list_count = (int)$args->list_count; if(!$list_count) $list_count = 5; + $args->list_count = $list_count; // 중복 허용/ 비허용 체크 if($args->allow_repetition != 'Y') { - $output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments'); + $output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments', $args); } else { - $output = executeQueryArray('widgets.planet_document.getNewestDocuments'); + $output = executeQueryArray('widgets.planet_document.getNewestDocuments', $args); } // 플래닛 글 목록 구함 diff --git a/widgets/tag_list/skins/blog_tag_list/tags.html b/widgets/tag_list/skins/blog_tag_list/tags.html index 6dc328699..e5ecb9f92 100644 --- a/widgets/tag_list/skins/blog_tag_list/tags.html +++ b/widgets/tag_list/skins/blog_tag_list/tags.html @@ -25,7 +25,7 @@ {htmlspecialchars($val->tag)} - {htmlspecialchars($val->tag)} + {htmlspecialchars($val->tag)} From 7992a7e888807ea1a642674718b823ecaf8ceddc Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 03:55:31 +0000 Subject: [PATCH 60/82] =?UTF-8?q?getModuleSrlByMid=EC=97=90=EC=84=9C=20mid?= =?UTF-8?q?=EA=B0=92=EC=9D=B4=20,=20=EB=A1=9C=20=EC=97=B0=EA=B2=B0?= =?UTF-8?q?=EB=90=9C=20=EB=8B=A4=EC=88=98=EC=9D=98=20mid=EC=9D=BC=EB=95=8C?= =?UTF-8?q?=EC=97=90=EB=8F=84=20=EC=A0=95=EC=83=81=EC=A0=81=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5213 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/module/module.model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 218942e01..044fd62ca 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -129,6 +129,7 @@ * @brief mid 목록에 대응하는 module_srl을 배열로 return **/ function getModuleSrlByMid($mid) { + if($mid && !is_array($mid)) $mid = explode(',',$mid); if(is_array($mid)) $mid = "'".implode("','",$mid)."'"; $site_module_info = Context::get('site_module_info'); From 7e908a0d2f45b4e51bae0d5b9829df029d129b89 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 04:42:39 +0000 Subject: [PATCH 61/82] =?UTF-8?q?planet=EC=9D=98=20=EA=B8=80=20=EB=B2=88?= =?UTF-8?q?=ED=98=B8=EB=A1=9C=20=EC=A0=91=EC=86=8D=EC=8B=9C=20=ED=95=B4?= =?UTF-8?q?=EB=8B=B9=20=EA=B8=80=EC=9D=98=20=EB=82=A0=EC=A7=9C=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=ED=95=98=EA=B3=A0=20name=EC=9D=84=20?= =?UTF-8?q?=EC=9D=B4=EC=9A=A9=ED=95=B4=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?= =?UTF-8?q?=EB=90=98=EC=96=B4=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5214 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/planet.view.php | 16 +++++++++++++--- modules/planet/skins/xe_planet/content_list.html | 7 +++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/modules/planet/planet.view.php b/modules/planet/planet.view.php index b7c20d064..cdfa77069 100644 --- a/modules/planet/planet.view.php +++ b/modules/planet/planet.view.php @@ -179,10 +179,20 @@ $oPlanetModel = &getModel('planet'); + // 글 고유 링크가 있으면 처리 + if(Context::get('document_srl')) { + $oDocumentModel = &getModel('document'); + $oDocument = $oDocumentModel->getDocument(Context::get('document_srl')); + } + // 플래닛의 기본 단위인 날짜를 미리 계산 (지정된 일자의 이전/다음날도 미리 계산하여 세팅) - $last_date = $this->planet->getContentLastDay(); - $date = Context::get('date'); - if(!$date || $date > $last_date) $date = $last_date; + if($oDocument && $oDocument->isExists()) { + $date = $oDocument->getRegdate('Ymd'); + } else { + $last_date = $this->planet->getContentLastDay(); + $date = Context::get('date'); + if(!$date || $date > $last_date) $date = $last_date; + } Context::set('date', $date); Context::set('prev_date', $this->planet->getPrevDate($date)); Context::set('next_date', $this->planet->getNextDate($date)); diff --git a/modules/planet/skins/xe_planet/content_list.html b/modules/planet/skins/xe_planet/content_list.html index 7a4f173d9..03e3aec1f 100644 --- a/modules/planet/skins/xe_planet/content_list.html +++ b/modules/planet/skins/xe_planet/content_list.html @@ -11,6 +11,7 @@ +
                @@ -100,3 +101,9 @@
                + + + + From 1a3457b150d6c9239304a313592d8f728c3ccf8b Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 5 Jan 2009 04:53:25 +0000 Subject: [PATCH 62/82] =?UTF-8?q?#17593003=20=EA=B4=80=EB=A6=AC=EC=9E=90?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=9A=8C=EC=9B=90=EC=B6=94?= =?UTF-8?q?=EA=B0=80=ED=9B=84=20member=5Fsrl=20=EC=A0=84=EB=8B=AC=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5215 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/member/member.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 6b017974e..5c7ffaddf 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -1167,7 +1167,7 @@ /** * @brief member 테이블에 사용자 추가 **/ - function insertMember($args, $password_is_hashed = false) { + function insertMember(&$args, $password_is_hashed = false) { // trigger 호출 (before) $output = ModuleHandler::triggerCall('member.insertMember', 'before', $args); if(!$output->toBool()) return $output; From 705a62c8df6816545cb1457ef7c68de8fb187d68 Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 5 Jan 2009 05:26:25 +0000 Subject: [PATCH 63/82] =?UTF-8?q?#17603409=20=EA=B4=80=EB=A6=AC=EC=9E=90?= =?UTF-8?q?=20=EC=B4=88=EA=B8=B0=20=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=AA=A8=EB=93=88=EB=AA=A9=EB=A1=9D=20=EC=A4=91=20?= =?UTF-8?q?title=20=EC=86=8D=EC=84=B1=20=EC=B6=9C=EB=A0=A5=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5216 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/tpl/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index b1ed97bfc..be488a4d2 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -54,7 +54,7 @@
                - + From 94c95c17c6d07a2cf23fb7857310e1eced741f50 Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 5 Jan 2009 05:34:10 +0000 Subject: [PATCH 64/82] =?UTF-8?q?#17572520=20=ED=99=88=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=AA=A8=EB=93=88->=20=ED=9A=8C=EC=9B=90=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=95=20=EB=B2=84=EA=B7=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5217 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/homepage/skins/xe_official/member_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/homepage/skins/xe_official/member_list.html b/modules/homepage/skins/xe_official/member_list.html index eed687d1b..43f028047 100644 --- a/modules/homepage/skins/xe_official/member_list.html +++ b/modules/homepage/skins/xe_official/member_list.html @@ -56,7 +56,7 @@ {$page_no} - {$page_no} + {$page} {$lang->last_page} From a065b6f77c7ab66cb981964e3ccc4edcbf327cd9 Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 5 Jan 2009 05:58:42 +0000 Subject: [PATCH 65/82] =?UTF-8?q?FirePHPCore=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5218 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- libs/FirePHPCore/FirePHP.class.php | 2750 ++++++++++++++++++++++++++++ libs/FirePHPCore/LICENSE | 58 + 2 files changed, 2808 insertions(+) create mode 100644 libs/FirePHPCore/FirePHP.class.php create mode 100644 libs/FirePHPCore/LICENSE diff --git a/libs/FirePHPCore/FirePHP.class.php b/libs/FirePHPCore/FirePHP.class.php new file mode 100644 index 000000000..53aaa9c9c --- /dev/null +++ b/libs/FirePHPCore/FirePHP.class.php @@ -0,0 +1,2750 @@ + + * @license http://www.opensource.org/licenses/bsd-license.php + * @package FirePHP + */ + + +/** + * Sends the given data to the FirePHP Firefox Extension. + * The data can be displayed in the Firebug Console or in the + * "Server" request tab. + * + * For more information see: http://www.firephp.org/ + * + * @copyright Copyright (C) 2007-2008 Christoph Dorn + * @author Christoph Dorn + * @license http://www.opensource.org/licenses/bsd-license.php + * @package FirePHP + */ +class FirePHP { + + /** + * FirePHP version + * + * @var string + */ + const VERSION = '0.2.1'; + + /** + * Firebug LOG level + * + * Logs a message to firebug console. + * + * @var string + */ + const LOG = 'LOG'; + + /** + * Firebug INFO level + * + * Logs a message to firebug console and displays an info icon before the message. + * + * @var string + */ + const INFO = 'INFO'; + + /** + * Firebug WARN level + * + * Logs a message to firebug console, displays an warning icon before the message and colors the line turquoise. + * + * @var string + */ + const WARN = 'WARN'; + + /** + * Firebug ERROR level + * + * Logs a message to firebug console, displays an error icon before the message and colors the line yellow. Also increments the firebug error count. + * + * @var string + */ + const ERROR = 'ERROR'; + + /** + * Dumps a variable to firebug's server panel + * + * @var string + */ + const DUMP = 'DUMP'; + + /** + * Displays a stack trace in firebug console + * + * @var string + */ + const TRACE = 'TRACE'; + + /** + * Displays an exception in firebug console + * + * Increments the firebug error count. + * + * @var string + */ + const EXCEPTION = 'EXCEPTION'; + + /** + * Displays an table in firebug console + * + * @var string + */ + const TABLE = 'TABLE'; + + /** + * Starts a group in firebug console + * + * @var string + */ + const GROUP_START = 'GROUP_START'; + + /** + * Ends a group in firebug console + * + * @var string + */ + const GROUP_END = 'GROUP_END'; + + /** + * Singleton instance of FirePHP + * + * @var FirePHP + */ + protected static $instance = null; + + /** + * Wildfire protocol message index + * + * @var int + */ + protected $messageIndex = 1; + + /** + * Options for the library + * + * @var array + */ + protected $options = array(); + + /** + * Filters used to exclude object members when encoding + * + * @var array + */ + protected $objectFilters = array(); + + /** + * A stack of objects used to detect recursion during object encoding + * + * @var object + */ + protected $objectStack = array(); + + /** + * Flag to enable/disable logging + * + * @var boolean + */ + protected $enabled = true; + + /** + * The object constructor + */ + function __construct() { + $this->options['maxObjectDepth'] = 10; + $this->options['maxArrayDepth'] = 20; + $this->options['useNativeJsonEncode'] = true; + $this->options['includeLineNumbers'] = true; + } + + /** + * When the object gets serialized only include specific object members. + * + * @return array + */ + public function __sleep() { + return array('options','objectFilters','enabled'); + } + + /** + * Gets singleton instance of FirePHP + * + * @param boolean $AutoCreate + * @return FirePHP + */ + public static function getInstance($AutoCreate=false) { + if($AutoCreate===true && !self::$instance) { + self::init(); + } + return self::$instance; + } + + /** + * Creates FirePHP object and stores it for singleton access + * + * @return FirePHP + */ + public static function init() { + return self::$instance = new self(); + } + + /** + * Enable and disable logging to Firebug + * + * @param boolean $Enabled TRUE to enable, FALSE to disable + * @return void + */ + public function setEnabled($Enabled) { + $this->enabled = $Enabled; + } + + /** + * Check if logging is enabled + * + * @return boolean TRUE if enabled + */ + public function getEnabled() { + return $this->enabled; + } + + /** + * Specify a filter to be used when encoding an object + * + * Filters are used to exclude object members. + * + * @param string $Class The class name of the object + * @param array $Filter An array or members to exclude + * @return void + */ + public function setObjectFilter($Class, $Filter) { + $this->objectFilters[$Class] = $Filter; + } + + /** + * Set some options for the library + * + * Options: + * - maxObjectDepth: The maximum depth to traverse objects (default: 10) + * - maxArrayDepth: The maximum depth to traverse arrays (default: 20) + * - useNativeJsonEncode: If true will use json_encode() (default: true) + * - includeLineNumbers: If true will include line numbers and filenames (default: true) + * + * @param array $Options The options to be set + * @return void + */ + public function setOptions($Options) { + $this->options = array_merge($this->options,$Options); + } + + /** + * Register FirePHP as your error handler + * + * Will throw exceptions for each php error. + */ + public function registerErrorHandler() + { + //NOTE: The following errors will not be caught by this error handler: + // E_ERROR, E_PARSE, E_CORE_ERROR, + // E_CORE_WARNING, E_COMPILE_ERROR, + // E_COMPILE_WARNING, E_STRICT + + set_error_handler(array($this,'errorHandler')); + } + + /** + * FirePHP's error handler + * + * Throws exception for each php error that will occur. + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + * @param array $errcontext + */ + public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) + { + // Don't throw exception if error reporting is switched off + if (error_reporting() == 0) { + return; + } + // Only throw exceptions for errors we are asking for + if (error_reporting() & $errno) { + throw new ErrorException($errstr, 0, $errno, $errfile, $errline); + } + } + + /** + * Register FirePHP as your exception handler + */ + public function registerExceptionHandler() + { + set_exception_handler(array($this,'exceptionHandler')); + } + + /** + * FirePHP's exception handler + * + * Logs all exceptions to your firebug console and then stops the script. + * + * @param Exception $Exception + * @throws Exception + */ + function exceptionHandler($Exception) { + $this->fb($Exception); + } + + /** + * Set custom processor url for FirePHP + * + * @param string $URL + */ + public function setProcessorUrl($URL) + { + $this->setHeader('X-FirePHP-ProcessorURL', $URL); + } + + /** + * Set custom renderer url for FirePHP + * + * @param string $URL + */ + public function setRendererUrl($URL) + { + $this->setHeader('X-FirePHP-RendererURL', $URL); + } + + /** + * Start a group for following messages + * + * @param string $Name + * @return true + * @throws Exception + */ + public function group($Name) { + return $this->fb(null, $Name, FirePHP::GROUP_START); + } + + /** + * Ends a group you have started before + * + * @return true + * @throws Exception + */ + public function groupEnd() { + return $this->fb(null, null, FirePHP::GROUP_END); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::LOG + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function log($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::LOG); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::INFO + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function info($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::INFO); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::WARN + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function warn($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::WARN); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::ERROR + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function error($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::ERROR); + } + + /** + * Dumps key and variable to firebug server panel + * + * @see FirePHP::DUMP + * @param string $Key + * @param mixed $Variable + * @return true + * @throws Exception + */ + public function dump($Key, $Variable) { + return $this->fb($Variable, $Key, FirePHP::DUMP); + } + + /** + * Log a trace in the firebug console + * + * @see FirePHP::TRACE + * @param string $Label + * @return true + * @throws Exception + */ + public function trace($Label) { + return $this->fb($Label, FirePHP::TRACE); + } + + /** + * Log a table in the firebug console + * + * @see FirePHP::TABLE + * @param string $Label + * @param string $Table + * @return true + * @throws Exception + */ + public function table($Label, $Table) { + return $this->fb($Table, $Label, FirePHP::TABLE); + } + + /** + * Check if FirePHP is installed on client + * + * @return boolean + */ + public function detectClientExtension() { + /* Check if FirePHP is installed on client */ + if(!@preg_match_all('/\sFirePHP\/([\.|\d]*)\s?/si',$this->getUserAgent(),$m) || + !version_compare($m[1][0],'0.0.6','>=')) { + return false; + } + return true; + } + + /** + * Log varible to Firebug + * + * @see http://www.firephp.org/Wiki/Reference/Fb + * @param mixed $Object The variable to be logged + * @return true Return TRUE if message was added to headers, FALSE otherwise + * @throws Exception + */ + public function fb($Object) { + + if(!$this->enabled) { + return false; + } + + if (headers_sent($filename, $linenum)) { + throw $this->newException('Headers already sent in '.$filename.' on line '.$linenum.'. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.'); + } + + $Type = null; + $Label = null; + + if(func_num_args()==1) { + } else + if(func_num_args()==2) { + switch(func_get_arg(1)) { + case self::LOG: + case self::INFO: + case self::WARN: + case self::ERROR: + case self::DUMP: + case self::TRACE: + case self::EXCEPTION: + case self::TABLE: + case self::GROUP_START: + case self::GROUP_END: + $Type = func_get_arg(1); + break; + default: + $Label = func_get_arg(1); + break; + } + } else + if(func_num_args()==3) { + $Type = func_get_arg(2); + $Label = func_get_arg(1); + } else { + throw $this->newException('Wrong number of arguments to fb() function!'); + } + + + if(!$this->detectClientExtension()) { + return false; + } + + $meta = array(); + $skipFinalObjectEncode = false; + + if($Object instanceof Exception) { + + $meta['file'] = $this->_escapeTraceFile($Object->getFile()); + $meta['line'] = $Object->getLine(); + + $trace = $Object->getTrace(); + if($Object instanceof ErrorException + && isset($trace[0]['function']) + && $trace[0]['function']=='errorHandler' + && isset($trace[0]['class']) + && $trace[0]['class']=='FirePHP') { + + $severity = false; + switch($Object->getSeverity()) { + case E_WARNING: $severity = 'E_WARNING'; break; + case E_NOTICE: $severity = 'E_NOTICE'; break; + case E_USER_ERROR: $severity = 'E_USER_ERROR'; break; + case E_USER_WARNING: $severity = 'E_USER_WARNING'; break; + case E_USER_NOTICE: $severity = 'E_USER_NOTICE'; break; + case E_STRICT: $severity = 'E_STRICT'; break; + case E_RECOVERABLE_ERROR: $severity = 'E_RECOVERABLE_ERROR'; break; + case E_DEPRECATED: $severity = 'E_DEPRECATED'; break; + case E_USER_DEPRECATED: $severity = 'E_USER_DEPRECATED'; break; + } + + $Object = array('Class'=>get_class($Object), + 'Message'=>$severity.': '.$Object->getMessage(), + 'File'=>$this->_escapeTraceFile($Object->getFile()), + 'Line'=>$Object->getLine(), + 'Type'=>'trigger', + 'Trace'=>$this->_escapeTrace(array_splice($trace,2))); + $skipFinalObjectEncode = true; + } else { + $Object = array('Class'=>get_class($Object), + 'Message'=>$Object->getMessage(), + 'File'=>$this->_escapeTraceFile($Object->getFile()), + 'Line'=>$Object->getLine(), + 'Type'=>'throw', + 'Trace'=>$this->_escapeTrace($trace)); + $skipFinalObjectEncode = true; + } + $Type = self::EXCEPTION; + + } else + if($Type==self::TRACE) { + + $trace = debug_backtrace(); + if(!$trace) return false; + for( $i=0 ; $i_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php' + || substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) { + /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ + } else + if(isset($trace[$i]['class']) + && isset($trace[$i+1]['file']) + && $trace[$i]['class']=='FirePHP' + && substr($this->_standardizePath($trace[$i+1]['file']),-18,18)=='FirePHPCore/fb.php') { + /* Skip fb() */ + } else + if($trace[$i]['function']=='fb' + || $trace[$i]['function']=='trace' + || $trace[$i]['function']=='send') { + $Object = array('Class'=>isset($trace[$i]['class'])?$trace[$i]['class']:'', + 'Type'=>isset($trace[$i]['type'])?$trace[$i]['type']:'', + 'Function'=>isset($trace[$i]['function'])?$trace[$i]['function']:'', + 'Message'=>$trace[$i]['args'][0], + 'File'=>isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):'', + 'Line'=>isset($trace[$i]['line'])?$trace[$i]['line']:'', + 'Args'=>isset($trace[$i]['args'])?$this->encodeObject($trace[$i]['args']):'', + 'Trace'=>$this->_escapeTrace(array_splice($trace,$i+1))); + + $skipFinalObjectEncode = true; + $meta['file'] = isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):''; + $meta['line'] = isset($trace[$i]['line'])?$trace[$i]['line']:''; + break; + } + } + + } else + if($Type==self::TABLE) { + + if(isset($Object[0]) && is_string($Object[0])) { + $Object[1] = $this->encodeTable($Object[1]); + } else { + $Object = $this->encodeTable($Object); + } + + $skipFinalObjectEncode = true; + + } else { + if($Type===null) { + $Type = self::LOG; + } + } + + if($this->options['includeLineNumbers']) { + if(!isset($meta['file']) || !isset($meta['line'])) { + + $trace = debug_backtrace(); + for( $i=0 ; $trace && $i_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php' + || substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) { + /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ + } else + if(isset($trace[$i]['class']) + && isset($trace[$i+1]['file']) + && $trace[$i]['class']=='FirePHP' + && substr($this->_standardizePath($trace[$i+1]['file']),-18,18)=='FirePHPCore/fb.php') { + /* Skip fb() */ + } else + if(isset($trace[$i]['file']) + && substr($this->_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php') { + /* Skip FB::fb() */ + } else { + $meta['file'] = isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):''; + $meta['line'] = isset($trace[$i]['line'])?$trace[$i]['line']:''; + break; + } + } + + } + } else { + unset($meta['file']); + unset($meta['line']); + } + + $this->setHeader('X-Wf-Protocol-1','http://meta.wildfirehq.org/Protocol/JsonStream/0.2'); + $this->setHeader('X-Wf-1-Plugin-1','http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/'.self::VERSION); + + $structure_index = 1; + if($Type==self::DUMP) { + $structure_index = 2; + $this->setHeader('X-Wf-1-Structure-2','http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1'); + } else { + $this->setHeader('X-Wf-1-Structure-1','http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'); + } + + if($Type==self::DUMP) { + $msg = '{"'.$Label.'":'.$this->jsonEncode($Object, $skipFinalObjectEncode).'}'; + } else { + $msg_meta = array('Type'=>$Type); + if($Label!==null) { + $msg_meta['Label'] = $Label; + } + if(isset($meta['file'])) { + $msg_meta['File'] = $meta['file']; + } + if(isset($meta['line'])) { + $msg_meta['Line'] = $meta['line']; + } + $msg = '['.$this->jsonEncode($msg_meta).','.$this->jsonEncode($Object, $skipFinalObjectEncode).']'; + } + + $parts = explode("\n",chunk_split($msg, 5000, "\n")); + + for( $i=0 ; $i2) { + // Message needs to be split into multiple parts + $this->setHeader('X-Wf-1-'.$structure_index.'-'.'1-'.$this->messageIndex, + (($i==0)?strlen($msg):'') + . '|' . $part . '|' + . (($isetHeader('X-Wf-1-'.$structure_index.'-'.'1-'.$this->messageIndex, + strlen($part) . '|' . $part . '|'); + } + + $this->messageIndex++; + + if ($this->messageIndex > 99999) { + throw new Exception('Maximum number (99,999) of messages reached!'); + } + } + } + + $this->setHeader('X-Wf-1-Index',$this->messageIndex-1); + + return true; + } + + /** + * Standardizes path for windows systems. + * + * @param string $Path + * @return string + */ + protected function _standardizePath($Path) { + return preg_replace('/\\\\+/','/',$Path); + } + + /** + * Escape trace path for windows systems + * + * @param array $Trace + * @return array + */ + protected function _escapeTrace($Trace) { + if(!$Trace) return $Trace; + for( $i=0 ; $i_escapeTraceFile($Trace[$i]['file']); + } + if(isset($Trace[$i]['args'])) { + $Trace[$i]['args'] = $this->encodeObject($Trace[$i]['args']); + } + } + return $Trace; + } + + /** + * Escape file information of trace for windows systems + * + * @param string $File + * @return string + */ + protected function _escapeTraceFile($File) { + /* Check if we have a windows filepath */ + if(strpos($File,'\\')) { + /* First strip down to single \ */ + + $file = preg_replace('/\\\\+/','\\',$File); + + return $file; + } + return $File; + } + + /** + * Send header + * + * @param string $Name + * @param string_type $Value + */ + protected function setHeader($Name, $Value) { + return header($Name.': '.$Value); + } + + /** + * Get user agent + * + * @return string|false + */ + protected function getUserAgent() { + if(!isset($_SERVER['HTTP_USER_AGENT'])) return false; + return $_SERVER['HTTP_USER_AGENT']; + } + + /** + * Returns a new exception + * + * @param string $Message + * @return Exception + */ + protected function newException($Message) { + return new Exception($Message); + } + + /** + * Encode an object into a JSON string + * + * Uses PHP's jeson_encode() if available + * + * @param object $Object The object to be encoded + * @return string The JSON string + */ + public function jsonEncode($Object, $skipObjectEncode=false) + { + if(!$skipObjectEncode) { + $Object = $this->encodeObject($Object); + } + + if(function_exists('json_encode') + && $this->options['useNativeJsonEncode']!=false) { + + return json_encode($Object); + } else { + return $this->json_encode($Object); + } + } + + /** + * Encodes a table by encoding each row and column with encodeObject() + * + * @param array $Table The table to be encoded + * @return array + */ + protected function encodeTable($Table) { + if(!$Table) return $Table; + for( $i=0 ; $iencodeObject($Table[$i][$j]); + } + } + } + return $Table; + } + + /** + * Encodes an object including members with + * protected and private visibility + * + * @param Object $Object The object to be encoded + * @param int $Depth The current traversal depth + * @return array All members of the object + */ + protected function encodeObject($Object, $ObjectDepth = 1, $ArrayDepth = 1) + { + $return = array(); + + if (is_resource($Object)) { + + return '** '.(string)$Object.' **'; + + } else + if (is_object($Object)) { + + if ($ObjectDepth > $this->options['maxObjectDepth']) { + return '** Max Object Depth ('.$this->options['maxObjectDepth'].') **'; + } + + foreach ($this->objectStack as $refVal) { + if ($refVal === $Object) { + return '** Recursion ('.get_class($Object).') **'; + } + } + array_push($this->objectStack, $Object); + + $return['__className'] = $class = get_class($Object); + + $reflectionClass = new ReflectionClass($class); + $properties = array(); + foreach( $reflectionClass->getProperties() as $property) { + $properties[$property->getName()] = $property; + } + + $members = (array)$Object; + + foreach( $properties as $raw_name => $property ) { + + $name = $raw_name; + if($property->isStatic()) { + $name = 'static:'.$name; + } + if($property->isPublic()) { + $name = 'public:'.$name; + } else + if($property->isPrivate()) { + $name = 'private:'.$name; + $raw_name = "\0".$class."\0".$raw_name; + } else + if($property->isProtected()) { + $name = 'protected:'.$name; + $raw_name = "\0".'*'."\0".$raw_name; + } + + if(!(isset($this->objectFilters[$class]) + && is_array($this->objectFilters[$class]) + && in_array($raw_name,$this->objectFilters[$class]))) { + + if(array_key_exists($raw_name,$members) + && !$property->isStatic()) { + + $return[$name] = $this->encodeObject($members[$raw_name], $ObjectDepth + 1, 1); + + } else { + if(method_exists($property,'setAccessible')) { + $property->setAccessible(true); + $return[$name] = $this->encodeObject($property->getValue($Object), $ObjectDepth + 1, 1); + } else + if($property->isPublic()) { + $return[$name] = $this->encodeObject($property->getValue($Object), $ObjectDepth + 1, 1); + } else { + $return[$name] = '** Need PHP 5.3 to get value **'; + } + } + } else { + $return[$name] = '** Excluded by Filter **'; + } + } + + // Include all members that are not defined in the class + // but exist in the object + foreach( $members as $raw_name => $value ) { + + $name = $raw_name; + + if ($name{0} == "\0") { + $parts = explode("\0", $name); + $name = $parts[2]; + } + + if(!isset($properties[$name])) { + $name = 'undeclared:'.$name; + + if(!(isset($this->objectFilters[$class]) + && is_array($this->objectFilters[$class]) + && in_array($raw_name,$this->objectFilters[$class]))) { + + $return[$name] = $this->encodeObject($value, $ObjectDepth + 1, 1); + } else { + $return[$name] = '** Excluded by Filter **'; + } + } + } + + array_pop($this->objectStack); + + } elseif (is_array($Object)) { + + if ($ArrayDepth > $this->options['maxArrayDepth']) { + return '** Max Array Depth ('.$this->options['maxArrayDepth'].') **'; + } + + foreach ($Object as $key => $val) { + + // Encoding the $GLOBALS PHP array causes an infinite loop + // if the recursion is not reset here as it contains + // a reference to itself. This is the only way I have come up + // with to stop infinite recursion in this case. + if($key=='GLOBALS' + && is_array($val) + && array_key_exists('GLOBALS',$val)) { + $val['GLOBALS'] = '** Recursion (GLOBALS) **'; + } + + $return[$key] = $this->encodeObject($val, 1, $ArrayDepth + 1); + } + } else { + if(self::is_utf8($Object)) { + return $Object; + } else { + return utf8_encode($Object); + } + } + return $return; + } + + /** + * Returns true if $string is valid UTF-8 and false otherwise. + * + * @param mixed $str String to be tested + * @return boolean + */ + protected static function is_utf8($str) { + $c=0; $b=0; + $bits=0; + $len=strlen($str); + for($i=0; $i<$len; $i++){ + $c=ord($str[$i]); + if($c > 128){ + if(($c >= 254)) return false; + elseif($c >= 252) $bits=6; + elseif($c >= 248) $bits=5; + elseif($c >= 240) $bits=4; + elseif($c >= 224) $bits=3; + elseif($c >= 192) $bits=2; + else return false; + if(($i+$bits) > $len) return false; + while($bits > 1){ + $i++; + $b=ord($str[$i]); + if($b < 128 || $b > 191) return false; + $bits--; + } + } + } + return true; + } + + /** + * Converts to and from JSON format. + * + * JSON (JavaScript Object Notation) is a lightweight data-interchange + * format. It is easy for humans to read and write. It is easy for machines + * to parse and generate. It is based on a subset of the JavaScript + * Programming Language, Standard ECMA-262 3rd Edition - December 1999. + * This feature can also be found in Python. JSON is a text format that is + * completely language independent but uses conventions that are familiar + * to programmers of the C-family of languages, including C, C++, C#, Java, + * JavaScript, Perl, TCL, and many others. These properties make JSON an + * ideal data-interchange language. + * + * This package provides a simple encoder and decoder for JSON notation. It + * is intended for use with client-side Javascript applications that make + * use of HTTPRequest to perform server communication functions - data can + * be encoded into JSON notation for use in a client-side javascript, or + * decoded from incoming Javascript requests. JSON format is native to + * Javascript, and can be directly eval()'ed with no further parsing + * overhead + * + * All strings should be in ASCII or UTF-8 format! + * + * LICENSE: Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: Redistributions of source code must retain the + * above copyright notice, this list of conditions and the following + * disclaimer. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * @category + * @package Services_JSON + * @author Michal Migurski + * @author Matt Knapp + * @author Brett Stimmerman + * @author Christoph Dorn + * @copyright 2005 Michal Migurski + * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + + + /** + * Keep a list of objects as we descend into the array so we can detect recursion. + */ + private $json_objectStack = array(); + + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + private function json_utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + private function json_encode($var) + { + + if(is_object($var)) { + if(in_array($var,$this->json_objectStack)) { + return '"** Recursion **"'; + } + } + + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2})); + $c += 2; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + + case 'array': + /* + * As per JSON spec if any array key is not an integer + * we must treat the the whole array as an object. We + * also try to catch a sparsely populated associative + * array with numeric keys here because some JS engines + * will create an array with empty indexes up to + * max_index which can cause memory issues and because + * the keys, which may be relevant, will be remapped + * otherwise. + * + * As per the ECMA and JSON specification an object may + * have any string as a property. Unfortunately due to + * a hole in the ECMA specification if the key is a + * ECMA reserved word or starts with a digit the + * parameter is only accessible using ECMAScript's + * bracket notation. + */ + + // treat as a JSON object + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + + $this->json_objectStack[] = $var; + + $properties = array_map(array($this, 'json_name_value'), + array_keys($var), + array_values($var)); + + array_pop($this->json_objectStack); + + foreach($properties as $property) { + if($property instanceof Exception) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + $this->json_objectStack[] = $var; + + // treat it like a regular array + $elements = array_map(array($this, 'json_encode'), $var); + + array_pop($this->json_objectStack); + + foreach($elements as $element) { + if($element instanceof Exception) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = self::encodeObject($var); + + $this->json_objectStack[] = $var; + + $properties = array_map(array($this, 'json_name_value'), + array_keys($vars), + array_values($vars)); + + array_pop($this->json_objectStack); + + foreach($properties as $property) { + if($property instanceof Exception) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return null; + } + } + + /** + * array-walking function for use in generating JSON-formatted name-value pairs + * + * @param string $name name of key to use + * @param mixed $value reference to an array element to be encoded + * + * @return string JSON-formatted name-value pair, like '"name":value' + * @access private + */ + private function json_name_value($name, $value) + { + // Encoding the $GLOBALS PHP array causes an infinite loop + // if the recursion is not reset here as it contains + // a reference to itself. This is the only way I have come up + // with to stop infinite recursion in this case. + if($name=='GLOBALS' + && is_array($value) + && array_key_exists('GLOBALS',$value)) { + $value['GLOBALS'] = '** Recursion **'; + } + + $encoded_value = $this->json_encode($value); + + if($encoded_value instanceof Exception) { + return $encoded_value; + } + + return $this->json_encode(strval($name)) . ':' . $encoded_value; + } +} + + * @license http://www.opensource.org/licenses/bsd-license.php + * @package FirePHP + */ + + +/** + * Sends the given data to the FirePHP Firefox Extension. + * The data can be displayed in the Firebug Console or in the + * "Server" request tab. + * + * For more information see: http://www.firephp.org/ + * + * @copyright Copyright (C) 2007-2008 Christoph Dorn + * @author Christoph Dorn + * @license http://www.opensource.org/licenses/bsd-license.php + * @package FirePHP + */ +class FirePHP { + + /** + * FirePHP version + * + * @var string + */ + const VERSION = '0.2.1'; + + /** + * Firebug LOG level + * + * Logs a message to firebug console. + * + * @var string + */ + const LOG = 'LOG'; + + /** + * Firebug INFO level + * + * Logs a message to firebug console and displays an info icon before the message. + * + * @var string + */ + const INFO = 'INFO'; + + /** + * Firebug WARN level + * + * Logs a message to firebug console, displays an warning icon before the message and colors the line turquoise. + * + * @var string + */ + const WARN = 'WARN'; + + /** + * Firebug ERROR level + * + * Logs a message to firebug console, displays an error icon before the message and colors the line yellow. Also increments the firebug error count. + * + * @var string + */ + const ERROR = 'ERROR'; + + /** + * Dumps a variable to firebug's server panel + * + * @var string + */ + const DUMP = 'DUMP'; + + /** + * Displays a stack trace in firebug console + * + * @var string + */ + const TRACE = 'TRACE'; + + /** + * Displays an exception in firebug console + * + * Increments the firebug error count. + * + * @var string + */ + const EXCEPTION = 'EXCEPTION'; + + /** + * Displays an table in firebug console + * + * @var string + */ + const TABLE = 'TABLE'; + + /** + * Starts a group in firebug console + * + * @var string + */ + const GROUP_START = 'GROUP_START'; + + /** + * Ends a group in firebug console + * + * @var string + */ + const GROUP_END = 'GROUP_END'; + + /** + * Singleton instance of FirePHP + * + * @var FirePHP + */ + protected static $instance = null; + + /** + * Wildfire protocol message index + * + * @var int + */ + protected $messageIndex = 1; + + /** + * Options for the library + * + * @var array + */ + protected $options = array(); + + /** + * Filters used to exclude object members when encoding + * + * @var array + */ + protected $objectFilters = array(); + + /** + * A stack of objects used to detect recursion during object encoding + * + * @var object + */ + protected $objectStack = array(); + + /** + * Flag to enable/disable logging + * + * @var boolean + */ + protected $enabled = true; + + /** + * The object constructor + */ + function __construct() { + $this->options['maxObjectDepth'] = 10; + $this->options['maxArrayDepth'] = 20; + $this->options['useNativeJsonEncode'] = true; + $this->options['includeLineNumbers'] = true; + } + + /** + * When the object gets serialized only include specific object members. + * + * @return array + */ + public function __sleep() { + return array('options','objectFilters','enabled'); + } + + /** + * Gets singleton instance of FirePHP + * + * @param boolean $AutoCreate + * @return FirePHP + */ + public static function getInstance($AutoCreate=false) { + if($AutoCreate===true && !self::$instance) { + self::init(); + } + return self::$instance; + } + + /** + * Creates FirePHP object and stores it for singleton access + * + * @return FirePHP + */ + public static function init() { + return self::$instance = new self(); + } + + /** + * Enable and disable logging to Firebug + * + * @param boolean $Enabled TRUE to enable, FALSE to disable + * @return void + */ + public function setEnabled($Enabled) { + $this->enabled = $Enabled; + } + + /** + * Check if logging is enabled + * + * @return boolean TRUE if enabled + */ + public function getEnabled() { + return $this->enabled; + } + + /** + * Specify a filter to be used when encoding an object + * + * Filters are used to exclude object members. + * + * @param string $Class The class name of the object + * @param array $Filter An array or members to exclude + * @return void + */ + public function setObjectFilter($Class, $Filter) { + $this->objectFilters[$Class] = $Filter; + } + + /** + * Set some options for the library + * + * Options: + * - maxObjectDepth: The maximum depth to traverse objects (default: 10) + * - maxArrayDepth: The maximum depth to traverse arrays (default: 20) + * - useNativeJsonEncode: If true will use json_encode() (default: true) + * - includeLineNumbers: If true will include line numbers and filenames (default: true) + * + * @param array $Options The options to be set + * @return void + */ + public function setOptions($Options) { + $this->options = array_merge($this->options,$Options); + } + + /** + * Register FirePHP as your error handler + * + * Will throw exceptions for each php error. + */ + public function registerErrorHandler() + { + //NOTE: The following errors will not be caught by this error handler: + // E_ERROR, E_PARSE, E_CORE_ERROR, + // E_CORE_WARNING, E_COMPILE_ERROR, + // E_COMPILE_WARNING, E_STRICT + + set_error_handler(array($this,'errorHandler')); + } + + /** + * FirePHP's error handler + * + * Throws exception for each php error that will occur. + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + * @param array $errcontext + */ + public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) + { + // Don't throw exception if error reporting is switched off + if (error_reporting() == 0) { + return; + } + // Only throw exceptions for errors we are asking for + if (error_reporting() & $errno) { + throw new ErrorException($errstr, 0, $errno, $errfile, $errline); + } + } + + /** + * Register FirePHP as your exception handler + */ + public function registerExceptionHandler() + { + set_exception_handler(array($this,'exceptionHandler')); + } + + /** + * FirePHP's exception handler + * + * Logs all exceptions to your firebug console and then stops the script. + * + * @param Exception $Exception + * @throws Exception + */ + function exceptionHandler($Exception) { + $this->fb($Exception); + } + + /** + * Set custom processor url for FirePHP + * + * @param string $URL + */ + public function setProcessorUrl($URL) + { + $this->setHeader('X-FirePHP-ProcessorURL', $URL); + } + + /** + * Set custom renderer url for FirePHP + * + * @param string $URL + */ + public function setRendererUrl($URL) + { + $this->setHeader('X-FirePHP-RendererURL', $URL); + } + + /** + * Start a group for following messages + * + * @param string $Name + * @return true + * @throws Exception + */ + public function group($Name) { + return $this->fb(null, $Name, FirePHP::GROUP_START); + } + + /** + * Ends a group you have started before + * + * @return true + * @throws Exception + */ + public function groupEnd() { + return $this->fb(null, null, FirePHP::GROUP_END); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::LOG + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function log($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::LOG); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::INFO + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function info($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::INFO); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::WARN + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function warn($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::WARN); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::ERROR + * @param mixes $Object + * @param string $Label + * @return true + * @throws Exception + */ + public function error($Object, $Label=null) { + return $this->fb($Object, $Label, FirePHP::ERROR); + } + + /** + * Dumps key and variable to firebug server panel + * + * @see FirePHP::DUMP + * @param string $Key + * @param mixed $Variable + * @return true + * @throws Exception + */ + public function dump($Key, $Variable) { + return $this->fb($Variable, $Key, FirePHP::DUMP); + } + + /** + * Log a trace in the firebug console + * + * @see FirePHP::TRACE + * @param string $Label + * @return true + * @throws Exception + */ + public function trace($Label) { + return $this->fb($Label, FirePHP::TRACE); + } + + /** + * Log a table in the firebug console + * + * @see FirePHP::TABLE + * @param string $Label + * @param string $Table + * @return true + * @throws Exception + */ + public function table($Label, $Table) { + return $this->fb($Table, $Label, FirePHP::TABLE); + } + + /** + * Check if FirePHP is installed on client + * + * @return boolean + */ + public function detectClientExtension() { + /* Check if FirePHP is installed on client */ + if(!@preg_match_all('/\sFirePHP\/([\.|\d]*)\s?/si',$this->getUserAgent(),$m) || + !version_compare($m[1][0],'0.0.6','>=')) { + return false; + } + return true; + } + + /** + * Log varible to Firebug + * + * @see http://www.firephp.org/Wiki/Reference/Fb + * @param mixed $Object The variable to be logged + * @return true Return TRUE if message was added to headers, FALSE otherwise + * @throws Exception + */ + public function fb($Object) { + + if(!$this->enabled) { + return false; + } + + if (headers_sent($filename, $linenum)) { + throw $this->newException('Headers already sent in '.$filename.' on line '.$linenum.'. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.'); + } + + $Type = null; + $Label = null; + + if(func_num_args()==1) { + } else + if(func_num_args()==2) { + switch(func_get_arg(1)) { + case self::LOG: + case self::INFO: + case self::WARN: + case self::ERROR: + case self::DUMP: + case self::TRACE: + case self::EXCEPTION: + case self::TABLE: + case self::GROUP_START: + case self::GROUP_END: + $Type = func_get_arg(1); + break; + default: + $Label = func_get_arg(1); + break; + } + } else + if(func_num_args()==3) { + $Type = func_get_arg(2); + $Label = func_get_arg(1); + } else { + throw $this->newException('Wrong number of arguments to fb() function!'); + } + + + if(!$this->detectClientExtension()) { + return false; + } + + $meta = array(); + $skipFinalObjectEncode = false; + + if($Object instanceof Exception) { + + $meta['file'] = $this->_escapeTraceFile($Object->getFile()); + $meta['line'] = $Object->getLine(); + + $trace = $Object->getTrace(); + if($Object instanceof ErrorException + && isset($trace[0]['function']) + && $trace[0]['function']=='errorHandler' + && isset($trace[0]['class']) + && $trace[0]['class']=='FirePHP') { + + $severity = false; + switch($Object->getSeverity()) { + case E_WARNING: $severity = 'E_WARNING'; break; + case E_NOTICE: $severity = 'E_NOTICE'; break; + case E_USER_ERROR: $severity = 'E_USER_ERROR'; break; + case E_USER_WARNING: $severity = 'E_USER_WARNING'; break; + case E_USER_NOTICE: $severity = 'E_USER_NOTICE'; break; + case E_STRICT: $severity = 'E_STRICT'; break; + case E_RECOVERABLE_ERROR: $severity = 'E_RECOVERABLE_ERROR'; break; + case E_DEPRECATED: $severity = 'E_DEPRECATED'; break; + case E_USER_DEPRECATED: $severity = 'E_USER_DEPRECATED'; break; + } + + $Object = array('Class'=>get_class($Object), + 'Message'=>$severity.': '.$Object->getMessage(), + 'File'=>$this->_escapeTraceFile($Object->getFile()), + 'Line'=>$Object->getLine(), + 'Type'=>'trigger', + 'Trace'=>$this->_escapeTrace(array_splice($trace,2))); + $skipFinalObjectEncode = true; + } else { + $Object = array('Class'=>get_class($Object), + 'Message'=>$Object->getMessage(), + 'File'=>$this->_escapeTraceFile($Object->getFile()), + 'Line'=>$Object->getLine(), + 'Type'=>'throw', + 'Trace'=>$this->_escapeTrace($trace)); + $skipFinalObjectEncode = true; + } + $Type = self::EXCEPTION; + + } else + if($Type==self::TRACE) { + + $trace = debug_backtrace(); + if(!$trace) return false; + for( $i=0 ; $i_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php' + || substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) { + /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ + } else + if(isset($trace[$i]['class']) + && isset($trace[$i+1]['file']) + && $trace[$i]['class']=='FirePHP' + && substr($this->_standardizePath($trace[$i+1]['file']),-18,18)=='FirePHPCore/fb.php') { + /* Skip fb() */ + } else + if($trace[$i]['function']=='fb' + || $trace[$i]['function']=='trace' + || $trace[$i]['function']=='send') { + $Object = array('Class'=>isset($trace[$i]['class'])?$trace[$i]['class']:'', + 'Type'=>isset($trace[$i]['type'])?$trace[$i]['type']:'', + 'Function'=>isset($trace[$i]['function'])?$trace[$i]['function']:'', + 'Message'=>$trace[$i]['args'][0], + 'File'=>isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):'', + 'Line'=>isset($trace[$i]['line'])?$trace[$i]['line']:'', + 'Args'=>isset($trace[$i]['args'])?$this->encodeObject($trace[$i]['args']):'', + 'Trace'=>$this->_escapeTrace(array_splice($trace,$i+1))); + + $skipFinalObjectEncode = true; + $meta['file'] = isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):''; + $meta['line'] = isset($trace[$i]['line'])?$trace[$i]['line']:''; + break; + } + } + + } else + if($Type==self::TABLE) { + + if(isset($Object[0]) && is_string($Object[0])) { + $Object[1] = $this->encodeTable($Object[1]); + } else { + $Object = $this->encodeTable($Object); + } + + $skipFinalObjectEncode = true; + + } else { + if($Type===null) { + $Type = self::LOG; + } + } + + if($this->options['includeLineNumbers']) { + if(!isset($meta['file']) || !isset($meta['line'])) { + + $trace = debug_backtrace(); + for( $i=0 ; $trace && $i_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php' + || substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) { + /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ + } else + if(isset($trace[$i]['class']) + && isset($trace[$i+1]['file']) + && $trace[$i]['class']=='FirePHP' + && substr($this->_standardizePath($trace[$i+1]['file']),-18,18)=='FirePHPCore/fb.php') { + /* Skip fb() */ + } else + if(isset($trace[$i]['file']) + && substr($this->_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php') { + /* Skip FB::fb() */ + } else { + $meta['file'] = isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):''; + $meta['line'] = isset($trace[$i]['line'])?$trace[$i]['line']:''; + break; + } + } + + } + } else { + unset($meta['file']); + unset($meta['line']); + } + + $this->setHeader('X-Wf-Protocol-1','http://meta.wildfirehq.org/Protocol/JsonStream/0.2'); + $this->setHeader('X-Wf-1-Plugin-1','http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/'.self::VERSION); + + $structure_index = 1; + if($Type==self::DUMP) { + $structure_index = 2; + $this->setHeader('X-Wf-1-Structure-2','http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1'); + } else { + $this->setHeader('X-Wf-1-Structure-1','http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'); + } + + if($Type==self::DUMP) { + $msg = '{"'.$Label.'":'.$this->jsonEncode($Object, $skipFinalObjectEncode).'}'; + } else { + $msg_meta = array('Type'=>$Type); + if($Label!==null) { + $msg_meta['Label'] = $Label; + } + if(isset($meta['file'])) { + $msg_meta['File'] = $meta['file']; + } + if(isset($meta['line'])) { + $msg_meta['Line'] = $meta['line']; + } + $msg = '['.$this->jsonEncode($msg_meta).','.$this->jsonEncode($Object, $skipFinalObjectEncode).']'; + } + + $parts = explode("\n",chunk_split($msg, 5000, "\n")); + + for( $i=0 ; $i2) { + // Message needs to be split into multiple parts + $this->setHeader('X-Wf-1-'.$structure_index.'-'.'1-'.$this->messageIndex, + (($i==0)?strlen($msg):'') + . '|' . $part . '|' + . (($isetHeader('X-Wf-1-'.$structure_index.'-'.'1-'.$this->messageIndex, + strlen($part) . '|' . $part . '|'); + } + + $this->messageIndex++; + + if ($this->messageIndex > 99999) { + throw new Exception('Maximum number (99,999) of messages reached!'); + } + } + } + + $this->setHeader('X-Wf-1-Index',$this->messageIndex-1); + + return true; + } + + /** + * Standardizes path for windows systems. + * + * @param string $Path + * @return string + */ + protected function _standardizePath($Path) { + return preg_replace('/\\\\+/','/',$Path); + } + + /** + * Escape trace path for windows systems + * + * @param array $Trace + * @return array + */ + protected function _escapeTrace($Trace) { + if(!$Trace) return $Trace; + for( $i=0 ; $i_escapeTraceFile($Trace[$i]['file']); + } + if(isset($Trace[$i]['args'])) { + $Trace[$i]['args'] = $this->encodeObject($Trace[$i]['args']); + } + } + return $Trace; + } + + /** + * Escape file information of trace for windows systems + * + * @param string $File + * @return string + */ + protected function _escapeTraceFile($File) { + /* Check if we have a windows filepath */ + if(strpos($File,'\\')) { + /* First strip down to single \ */ + + $file = preg_replace('/\\\\+/','\\',$File); + + return $file; + } + return $File; + } + + /** + * Send header + * + * @param string $Name + * @param string_type $Value + */ + protected function setHeader($Name, $Value) { + return header($Name.': '.$Value); + } + + /** + * Get user agent + * + * @return string|false + */ + protected function getUserAgent() { + if(!isset($_SERVER['HTTP_USER_AGENT'])) return false; + return $_SERVER['HTTP_USER_AGENT']; + } + + /** + * Returns a new exception + * + * @param string $Message + * @return Exception + */ + protected function newException($Message) { + return new Exception($Message); + } + + /** + * Encode an object into a JSON string + * + * Uses PHP's jeson_encode() if available + * + * @param object $Object The object to be encoded + * @return string The JSON string + */ + public function jsonEncode($Object, $skipObjectEncode=false) + { + if(!$skipObjectEncode) { + $Object = $this->encodeObject($Object); + } + + if(function_exists('json_encode') + && $this->options['useNativeJsonEncode']!=false) { + + return json_encode($Object); + } else { + return $this->json_encode($Object); + } + } + + /** + * Encodes a table by encoding each row and column with encodeObject() + * + * @param array $Table The table to be encoded + * @return array + */ + protected function encodeTable($Table) { + if(!$Table) return $Table; + for( $i=0 ; $iencodeObject($Table[$i][$j]); + } + } + } + return $Table; + } + + /** + * Encodes an object including members with + * protected and private visibility + * + * @param Object $Object The object to be encoded + * @param int $Depth The current traversal depth + * @return array All members of the object + */ + protected function encodeObject($Object, $ObjectDepth = 1, $ArrayDepth = 1) + { + $return = array(); + + if (is_resource($Object)) { + + return '** '.(string)$Object.' **'; + + } else + if (is_object($Object)) { + + if ($ObjectDepth > $this->options['maxObjectDepth']) { + return '** Max Object Depth ('.$this->options['maxObjectDepth'].') **'; + } + + foreach ($this->objectStack as $refVal) { + if ($refVal === $Object) { + return '** Recursion ('.get_class($Object).') **'; + } + } + array_push($this->objectStack, $Object); + + $return['__className'] = $class = get_class($Object); + + $reflectionClass = new ReflectionClass($class); + $properties = array(); + foreach( $reflectionClass->getProperties() as $property) { + $properties[$property->getName()] = $property; + } + + $members = (array)$Object; + + foreach( $properties as $raw_name => $property ) { + + $name = $raw_name; + if($property->isStatic()) { + $name = 'static:'.$name; + } + if($property->isPublic()) { + $name = 'public:'.$name; + } else + if($property->isPrivate()) { + $name = 'private:'.$name; + $raw_name = "\0".$class."\0".$raw_name; + } else + if($property->isProtected()) { + $name = 'protected:'.$name; + $raw_name = "\0".'*'."\0".$raw_name; + } + + if(!(isset($this->objectFilters[$class]) + && is_array($this->objectFilters[$class]) + && in_array($raw_name,$this->objectFilters[$class]))) { + + if(array_key_exists($raw_name,$members) + && !$property->isStatic()) { + + $return[$name] = $this->encodeObject($members[$raw_name], $ObjectDepth + 1, 1); + + } else { + if(method_exists($property,'setAccessible')) { + $property->setAccessible(true); + $return[$name] = $this->encodeObject($property->getValue($Object), $ObjectDepth + 1, 1); + } else + if($property->isPublic()) { + $return[$name] = $this->encodeObject($property->getValue($Object), $ObjectDepth + 1, 1); + } else { + $return[$name] = '** Need PHP 5.3 to get value **'; + } + } + } else { + $return[$name] = '** Excluded by Filter **'; + } + } + + // Include all members that are not defined in the class + // but exist in the object + foreach( $members as $raw_name => $value ) { + + $name = $raw_name; + + if ($name{0} == "\0") { + $parts = explode("\0", $name); + $name = $parts[2]; + } + + if(!isset($properties[$name])) { + $name = 'undeclared:'.$name; + + if(!(isset($this->objectFilters[$class]) + && is_array($this->objectFilters[$class]) + && in_array($raw_name,$this->objectFilters[$class]))) { + + $return[$name] = $this->encodeObject($value, $ObjectDepth + 1, 1); + } else { + $return[$name] = '** Excluded by Filter **'; + } + } + } + + array_pop($this->objectStack); + + } elseif (is_array($Object)) { + + if ($ArrayDepth > $this->options['maxArrayDepth']) { + return '** Max Array Depth ('.$this->options['maxArrayDepth'].') **'; + } + + foreach ($Object as $key => $val) { + + // Encoding the $GLOBALS PHP array causes an infinite loop + // if the recursion is not reset here as it contains + // a reference to itself. This is the only way I have come up + // with to stop infinite recursion in this case. + if($key=='GLOBALS' + && is_array($val) + && array_key_exists('GLOBALS',$val)) { + $val['GLOBALS'] = '** Recursion (GLOBALS) **'; + } + + $return[$key] = $this->encodeObject($val, 1, $ArrayDepth + 1); + } + } else { + if(self::is_utf8($Object)) { + return $Object; + } else { + return utf8_encode($Object); + } + } + return $return; + } + + /** + * Returns true if $string is valid UTF-8 and false otherwise. + * + * @param mixed $str String to be tested + * @return boolean + */ + protected static function is_utf8($str) { + $c=0; $b=0; + $bits=0; + $len=strlen($str); + for($i=0; $i<$len; $i++){ + $c=ord($str[$i]); + if($c > 128){ + if(($c >= 254)) return false; + elseif($c >= 252) $bits=6; + elseif($c >= 248) $bits=5; + elseif($c >= 240) $bits=4; + elseif($c >= 224) $bits=3; + elseif($c >= 192) $bits=2; + else return false; + if(($i+$bits) > $len) return false; + while($bits > 1){ + $i++; + $b=ord($str[$i]); + if($b < 128 || $b > 191) return false; + $bits--; + } + } + } + return true; + } + + /** + * Converts to and from JSON format. + * + * JSON (JavaScript Object Notation) is a lightweight data-interchange + * format. It is easy for humans to read and write. It is easy for machines + * to parse and generate. It is based on a subset of the JavaScript + * Programming Language, Standard ECMA-262 3rd Edition - December 1999. + * This feature can also be found in Python. JSON is a text format that is + * completely language independent but uses conventions that are familiar + * to programmers of the C-family of languages, including C, C++, C#, Java, + * JavaScript, Perl, TCL, and many others. These properties make JSON an + * ideal data-interchange language. + * + * This package provides a simple encoder and decoder for JSON notation. It + * is intended for use with client-side Javascript applications that make + * use of HTTPRequest to perform server communication functions - data can + * be encoded into JSON notation for use in a client-side javascript, or + * decoded from incoming Javascript requests. JSON format is native to + * Javascript, and can be directly eval()'ed with no further parsing + * overhead + * + * All strings should be in ASCII or UTF-8 format! + * + * LICENSE: Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: Redistributions of source code must retain the + * above copyright notice, this list of conditions and the following + * disclaimer. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * @category + * @package Services_JSON + * @author Michal Migurski + * @author Matt Knapp + * @author Brett Stimmerman + * @author Christoph Dorn + * @copyright 2005 Michal Migurski + * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + + + /** + * Keep a list of objects as we descend into the array so we can detect recursion. + */ + private $json_objectStack = array(); + + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + private function json_utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + private function json_encode($var) + { + + if(is_object($var)) { + if(in_array($var,$this->json_objectStack)) { + return '"** Recursion **"'; + } + } + + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2})); + $c += 2; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + + case 'array': + /* + * As per JSON spec if any array key is not an integer + * we must treat the the whole array as an object. We + * also try to catch a sparsely populated associative + * array with numeric keys here because some JS engines + * will create an array with empty indexes up to + * max_index which can cause memory issues and because + * the keys, which may be relevant, will be remapped + * otherwise. + * + * As per the ECMA and JSON specification an object may + * have any string as a property. Unfortunately due to + * a hole in the ECMA specification if the key is a + * ECMA reserved word or starts with a digit the + * parameter is only accessible using ECMAScript's + * bracket notation. + */ + + // treat as a JSON object + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + + $this->json_objectStack[] = $var; + + $properties = array_map(array($this, 'json_name_value'), + array_keys($var), + array_values($var)); + + array_pop($this->json_objectStack); + + foreach($properties as $property) { + if($property instanceof Exception) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + $this->json_objectStack[] = $var; + + // treat it like a regular array + $elements = array_map(array($this, 'json_encode'), $var); + + array_pop($this->json_objectStack); + + foreach($elements as $element) { + if($element instanceof Exception) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = self::encodeObject($var); + + $this->json_objectStack[] = $var; + + $properties = array_map(array($this, 'json_name_value'), + array_keys($vars), + array_values($vars)); + + array_pop($this->json_objectStack); + + foreach($properties as $property) { + if($property instanceof Exception) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return null; + } + } + + /** + * array-walking function for use in generating JSON-formatted name-value pairs + * + * @param string $name name of key to use + * @param mixed $value reference to an array element to be encoded + * + * @return string JSON-formatted name-value pair, like '"name":value' + * @access private + */ + private function json_name_value($name, $value) + { + // Encoding the $GLOBALS PHP array causes an infinite loop + // if the recursion is not reset here as it contains + // a reference to itself. This is the only way I have come up + // with to stop infinite recursion in this case. + if($name=='GLOBALS' + && is_array($value) + && array_key_exists('GLOBALS',$value)) { + $value['GLOBALS'] = '** Recursion **'; + } + + $encoded_value = $this->json_encode($value); + + if($encoded_value instanceof Exception) { + return $encoded_value; + } + + return $this->json_encode(strval($name)) . ':' . $encoded_value; + } +} diff --git a/libs/FirePHPCore/LICENSE b/libs/FirePHPCore/LICENSE new file mode 100644 index 000000000..8f2c04912 --- /dev/null +++ b/libs/FirePHPCore/LICENSE @@ -0,0 +1,58 @@ +Software License Agreement (New BSD License) + +Copyright (c) 2006-2008, Christoph Dorn +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Christoph Dorn nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Software License Agreement (New BSD License) + +Copyright (c) 2006-2008, Christoph Dorn +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Christoph Dorn nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 51864e0a6f3e28b41204928114c6748580e5cdee Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 06:01:41 +0000 Subject: [PATCH 66/82] =?UTF-8?q?#17591929=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=98=EC=97=AC=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=97=86=EB=8B=A4=EB=8A=94=20=EC=97=90=EB=9F=AC=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=8C=93=EC=9D=B4=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5219 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../skins/default/images/common/arrowNextA1.gif | Bin 0 -> 46 bytes .../skins/default/images/common/arrowNextB1.gif | Bin 0 -> 51 bytes .../skins/default/images/common/arrowNextC1.gif | Bin 0 -> 152 bytes .../default/images/common/arrowNextEndA1.gif | Bin 0 -> 52 bytes .../skins/default/images/common/arrowPrevA1.gif | Bin 0 -> 47 bytes .../skins/default/images/common/arrowPrevB1.gif | Bin 0 -> 51 bytes .../skins/default/images/common/arrowPrevC1.gif | Bin 0 -> 151 bytes .../default/images/common/arrowPrevEndA1.gif | Bin 0 -> 51 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 modules/communication/skins/default/images/common/arrowNextA1.gif create mode 100644 modules/communication/skins/default/images/common/arrowNextB1.gif create mode 100644 modules/communication/skins/default/images/common/arrowNextC1.gif create mode 100644 modules/communication/skins/default/images/common/arrowNextEndA1.gif create mode 100644 modules/communication/skins/default/images/common/arrowPrevA1.gif create mode 100644 modules/communication/skins/default/images/common/arrowPrevB1.gif create mode 100644 modules/communication/skins/default/images/common/arrowPrevC1.gif create mode 100644 modules/communication/skins/default/images/common/arrowPrevEndA1.gif diff --git a/modules/communication/skins/default/images/common/arrowNextA1.gif b/modules/communication/skins/default/images/common/arrowNextA1.gif new file mode 100644 index 0000000000000000000000000000000000000000..15c36291e4cb2bc0eba9723c7e0b4d98b5e33ef7 GIT binary patch literal 46 ycmZ?wbhEHbWM*JxXkcWRIdkU!|Nj+#vM@3*Ff!;c00Bsbfr-_HX1_o;Y DSAYzI literal 0 HcmV?d00001 diff --git a/modules/communication/skins/default/images/common/arrowNextC1.gif b/modules/communication/skins/default/images/common/arrowNextC1.gif new file mode 100644 index 0000000000000000000000000000000000000000..82deddc7b7e1bc3dc458342c35e023bbfc3f4480 GIT binary patch literal 152 zcmZ?wbhEHbo*Ag{qy(l-#^cvKmY#y`@etx_U_&L>(?)!(C^>B&z?PN zY;61=3>X*~6o0ZXG61#e0ND&6GZYaf1CA=AF0qNc!wfx#L8zxhnz literal 0 HcmV?d00001 diff --git a/modules/communication/skins/default/images/common/arrowNextEndA1.gif b/modules/communication/skins/default/images/common/arrowNextEndA1.gif new file mode 100644 index 0000000000000000000000000000000000000000..837b81fdd5c7f1dbf88718b8901e1f33cff041b8 GIT binary patch literal 52 zcmZ?wbhEHbo*Ag{qy(l-#^cvKmY#y`@etx_U_&L>(?)!(C^>B&z?PN zY;61=3>X*~6o0ZXG61#e0ND&6GZ Date: Mon, 5 Jan 2009 06:11:01 +0000 Subject: [PATCH 67/82] login form git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5220 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../login_info/skins/default/login_form.html | 126 +++++++++--------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/widgets/login_info/skins/default/login_form.html b/widgets/login_info/skins/default/login_form.html index 10c59e8be..b55bbca3e 100644 --- a/widgets/login_info/skins/default/login_form.html +++ b/widgets/login_info/skins/default/login_form.html @@ -1,63 +1,63 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + From 935d26cf8d89cc624241682e5c47922695c00849 Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 5 Jan 2009 06:13:09 +0000 Subject: [PATCH 68/82] =?UTF-8?q?#17605348=20*=20debugPrint()=EC=97=90=20F?= =?UTF-8?q?irePHP=20=EC=97=B0=EB=8F=99=20=EC=B6=94=EA=B0=80=20=20=20*=20PH?= =?UTF-8?q?P=205.2=20=EC=9D=B4=EC=83=81=EC=97=90=EC=84=9C=20=EC=9E=91?= =?UTF-8?q?=EB=8F=99.=20=EB=A7=8C=EC=A1=B1=ED=95=98=EC=A7=80=20=EB=AA=BB?= =?UTF-8?q?=ED=95=98=EB=A9=B4=20=5Fdebug=5Fmessage.php=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EC=97=90=20=EC=9E=91=EC=84=B1=EB=90=A8=20=20=20*=20Fi?= =?UTF-8?q?rePHP=20=ED=8C=8C=EC=9D=B4=EC=96=B4=ED=8F=AD=EC=8A=A4=20?= =?UTF-8?q?=ED=94=8C=EB=9F=AC=EA=B7=B8=EC=9D=B8=20=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=A8.=20https://addons.mozilla.org/en-US/firefox/addon/614?= =?UTF-8?q?9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5221 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DB.class.php | 15 +- classes/display/DisplayHandler.class.php | 140 ++- config/config.inc.php | 20 +- config/func.inc.php | 35 +- libs/FirePHPCore/FirePHP.class.php | 1375 ---------------------- 5 files changed, 157 insertions(+), 1428 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index b9eeb8549..011ed5be7 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -145,26 +145,29 @@ $this->elapsed_time = $elapsed_time; $GLOBALS['__db_elapsed_time__'] += $elapsed_time; - $str = sprintf("\t%02d. %s (%0.6f sec)\n", ++$GLOBALS['__dbcnt'], $this->query, $elapsed_time); + $log['query'] = $this->query; + $log['elapsed_time'] = $elapsed_time; // 에러 발생시 에러 로그를 남김 (__DEBUG_DB_OUTPUT__이 지정되어 있을경우) if($this->isError()) { - $str .= sprintf("\t Query Failed : %d\n\t\t\t %s\n", $this->errno, $this->errstr); + $log['result'] = 'Failed'; + $log['errno'] = $this->errno; + $log['errstr'] = $this->errstr; - if(__DEBUG_DB_OUTPUT__==1) { + if(__DEBUG_DB_OUTPUT__ == 1) { $debug_file = _XE_PATH_."files/_debug_db_query.php"; $buff = sprintf("%s\n",print_r($str,true)); - if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; + if($display_line) $buff = "\n\n"; if(@!$fp = fopen($debug_file,"a")) return; fwrite($fp, $buff); fclose($fp); } } else { - $str .= "\t Query Success\n"; + $log['result'] = 'Success'; } - $GLOBALS['__db_queries__'] .= $str; + $GLOBALS['__db_queries__'][] = $log; // __LOG_SLOW_QUERY__ 가 정해져 있다면 시간 체크후 쿼리 로그 남김 if(__LOG_SLOW_QUERY__>0 && $elapsed_time > __LOG_SLOW_QUERY__) { diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index 34345fcc2..d81093ffd 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -33,7 +33,7 @@ // 요청방식에 따라 출력을 별도로 if(Context::getResponseMethod()=="HTML") { - + Context::set('content', $content); // 레이아웃을 컴파일 @@ -60,7 +60,7 @@ if(__DEBUG__==3) $GLOBALS['__trans_widget_editor_elapsed__'] = getMicroTime()-$start; - // 최종 결과를 common_layout에 넣어버림 + // 최종 결과를 common_layout에 넣어버림 Context::set('zbxe_final_content', $zbxe_final_content); $output = $oTemplate->compile('./common/tpl', 'common_layout'); @@ -172,50 +172,116 @@ $end = getMicroTime(); - // debug string 작성 시작 - $buff = "\n\n** Debug at ".date('Y-m-d H:i:s')." ************************************************************\n"; + if(__DEBUG_OUTPUT__ != 2) { + // debug string 작성 시작 + $buff = "\n\n** Debug at ".date('Y-m-d H:i:s')." ************************************************************\n"; - // Request/Response 정보 작성 - $buff .= "\n- Request/ Response info\n"; - $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']); - $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']); - $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod()); - $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize()); + // Request/Response 정보 작성 + $buff .= "\n- Request/ Response info\n"; + $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']); + $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']); + $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod()); + $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize()); - // DB 로그 작성 - if(__DEBUG__>1) { - if($GLOBALS['__db_queries__']) { - $buff .= "\n- DB Queries\n"; - $buff .= $GLOBALS['__db_queries__']; + // DB 로그 작성 + if(__DEBUG__ > 1) { + if($GLOBALS['__db_queries__']) { + $buff .= "\n- DB Queries\n"; + $num = 0; + foreach($GLOBALS['__db_queries__'] as $query) { + $buff .= sprintf("\t%02d. %s (%0.6f sec)\n", ++$num, $query['query'], $query['elapsed_time']); + if($query['result'] == 'Success') { + $buff .= "\t Query Success\n"; + } else { + $buff .= sprintf("\t Query $s : %d\n\t\t\t %s\n", $query['result'], $query['errno'], $query['errstr']); + } + } + } + $buff .= "\n- Elapsed time\n"; + + if($GLOBALS['__db_elapsed_time__']) $buff .= sprintf("\tDB queries elapsed time\t\t: %0.5f sec\n", $GLOBALS['__db_elapsed_time__']); } - $buff .= "\n- Elapsed time\n"; - if($GLOBALS['__db_elapsed_time__']) $buff .= sprintf("\tDB queries elapsed time\t\t: %0.5f sec\n", $GLOBALS['__db_elapsed_time__']); + // 기타 로그 작성 + if(__DEBUG__==3) { + $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']); + $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']); + $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']); + $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']); + + // 위젯 실행 시간 작성 + $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']); + + // 레이아웃 실행 시간 + $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']); + + // 위젯, 에디터 컴포넌트 치환 시간 + $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n\n", $GLOBALS['__trans_widget_editor_elapsed__']); + } + + // 전체 실행 시간 작성 + $buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__); } - // 기타 로그 작성 - if(__DEBUG__==3) { - $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']); - $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']); - $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']); - $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']); - - // 위젯 실행 시간 작성 - $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']); - - // 레이아웃 실행 시간 - $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']); - - // 위젯, 에디터 컴포넌트 치환 시간 - $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n\n", $GLOBALS['__trans_widget_editor_elapsed__']); + if(__DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML') { + if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) { + $buff = '허용되지 않은 IP 입니다. config/config.inc.php 파일의 __DEBUG_PROTECT_IP__ 상수 값을 자신의 IP로 변경하세요.'; + } + return ""; } - // 전체 실행 시간 작성 - $buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__); - - if(__DEBUG_OUTPUT__==1 && Context::getResponseMethod()=='HTML') return ""; - if(__DEBUG_OUTPUT__==0) debugPrint($buff, false); + + // Firebug 콘솔 출력 + if(__DEBUG_OUTPUT__ == 2) { + debugPrint( + array('Request / Response info >>> '.Context::getResponseMethod().' / '.$_SERVER['REQUEST_METHOD'], + array( + array('Request URI', 'Request method', 'Response method', 'Response contents size'), + array( + sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']), + $_SERVER['REQUEST_METHOD'], + Context::getResponseMethod(), + $this->getContentSize().' byte' + ) + ) + ), + FirePHP::TABLE + ); + + // 기타 로그 작성 + if(__DEBUG__ == 3 || __DEBUG__ == 1) { + debugPrint( + array('Elapsed time >>> Total : '.sprintf('%0.5f sec', $end - __StartTime__), + array(array('DB queries', 'class file load', 'Template compile', 'XmlParse compile', 'PHP', 'Widgets', 'Trans widget&editor'), + array( + sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']), + sprintf('%0.5f sec', $GLOBALS['__elapsed_class_load__']), + sprintf('%0.5f sec (%d called)', $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']), + sprintf('%0.5f sec', $GLOBALS['__xmlparse_elapsed__']), + sprintf('%0.5f sec', $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']), + sprintf('%0.5f sec', $GLOBALS['__widget_excute_elapsed__']), + sprintf('%0.5f sec', $GLOBALS['__trans_widget_editor_elapsed__']) + ) + ) + ), + FirePHP::TABLE + ); + } + + // DB 쿼리 로그 + if(__DEBUG__ > 1) { + $queries_output = array(array('Query', 'Elapsed time', 'Result')); + foreach($GLOBALS['__db_queries__'] as $query) { + array_push($queries_output, array($query['query'], sprintf('%0.5f', $query['elapsed_time']), $query['result'])); + } + debugPrint( + array('DB Queries >>> '.count($GLOBALS['__db_queries__']).' Queries, '.sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']), $queries_output), + FirePHP::TABLE + ); + } + + } } /** diff --git a/config/config.inc.php b/config/config.inc.php index 30840643a..83e7b7fa7 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -28,10 +28,19 @@ /** * @brief 디버그 메세지의 출력 장소 * 0 : files/_debug_message.php 에 연결하여 출력 - * 1 : Response Method 가 XML 형식이 아닐 경우 브라우저에 최상단에 주석으로 표시 + * 1 : Response Method 가 XML 형식이 아닐 경우 브라우저에 최하단에 주석으로 표시 + * 2 : Firebug 콘솔에 출력 (PHP 5.2 이상. firebug / firephp 플러그인 필요) **/ define('__DEBUG_OUTPUT__', 0); + /** + * @brief FirePHP 콘솔 및 브라우저 주석 출력 보안 + * 0 : 제한 없음 (권장하지 않음) + * 1 : 지정한 IP 주소에만 허용 + **/ + define('__DEBUG_PROTECT__', 1); + define('__DEBUG_PROTECT_IP__', '127.0.0.1'); + /** * @brief DB 오류 메세지 출력 정의 * 0 : 출력하지 않음 @@ -60,10 +69,17 @@ **/ define('_XE_PATH_', str_replace('config/config.inc.php', '', str_replace('\\', '/', __FILE__))); + /** + * @brief Firebug 콘솔 출력 사용시 관련 파일 require + **/ + if(__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') == 1) { + require_once _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php'; + } + /** * @brief 간단하게 사용하기 위한 함수 정의한 파일 require **/ - require_once(_XE_PATH_.'config/func.inc.php'); + require_once(_XE_PATH_.'config/func.inc.php'); if(__DEBUG__) define('__StartTime__', getMicroTime()); diff --git a/config/func.inc.php b/config/func.inc.php index 1c7e927e4..af406127c 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -386,18 +386,37 @@ * ./files/_debug_message.php 파일에 $buff 내용을 출력한다. * tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다 **/ - function debugPrint($buff = null, $display_line = true) { - if(__DEBUG__ != 0 && __DEBUG_OUTPUT__ !== 1) { - $debug_file = _XE_PATH_."files/_debug_message.php"; - $bt = debug_backtrace(); - if(is_array($bt)) $first = array_shift($bt); - $buff = sprintf("[%s %s:%d]\n%s\n", date("Y-m-d H:i:s"), array_pop(explode(DIRECTORY_SEPARATOR, $first["file"])), $first["line"], print_r($buff,true)); + function debugPrint($buff = null, $display_option = true) { + static $firephp; + $bt = debug_backtrace(); + if(is_array($bt)) $first = array_shift($bt); + $file_name = array_pop(explode(DIRECTORY_SEPARATOR, $first['file'])); + $line_num = $first['line']; - if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; + if(__DEBUG_OUTPUT__ == 0 || (__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') != 1) ) { + $debug_file = _XE_PATH_.'files/_debug_message.php'; + $buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true)); - if(@!$fp = fopen($debug_file,"a")) return; + if($display_option === true) $buff = "\n====================================\n".$buff."------------------------------------\n"; + $buff = "\n\n"; + if(@!$fp = fopen($debug_file, 'a')) return; fwrite($fp, $buff); fclose($fp); + + } elseif(__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') == 1) { + if(!isset($firephp)) $firephp = FirePHP::getInstance(true); + $label = sprintf('%s:%d', $file_name, $line_num); + // FirePHP 옵션 + if($display_option === 'TABLE') { + $label = $display_option; + } + + if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) { + $buff = '허용되지 않은 IP 입니다. config/config.inc.php 파일의 __DEBUG_PROTECT_IP__ 상수 값을 자신의 IP로 변경하세요.'; + $label = null; + } + + $firephp->fb($buff, $label); } } diff --git a/libs/FirePHPCore/FirePHP.class.php b/libs/FirePHPCore/FirePHP.class.php index 53aaa9c9c..b0fae20f2 100644 --- a/libs/FirePHPCore/FirePHP.class.php +++ b/libs/FirePHPCore/FirePHP.class.php @@ -1373,1378 +1373,3 @@ class FirePHP { return $this->json_encode(strval($name)) . ':' . $encoded_value; } } - - * @license http://www.opensource.org/licenses/bsd-license.php - * @package FirePHP - */ - - -/** - * Sends the given data to the FirePHP Firefox Extension. - * The data can be displayed in the Firebug Console or in the - * "Server" request tab. - * - * For more information see: http://www.firephp.org/ - * - * @copyright Copyright (C) 2007-2008 Christoph Dorn - * @author Christoph Dorn - * @license http://www.opensource.org/licenses/bsd-license.php - * @package FirePHP - */ -class FirePHP { - - /** - * FirePHP version - * - * @var string - */ - const VERSION = '0.2.1'; - - /** - * Firebug LOG level - * - * Logs a message to firebug console. - * - * @var string - */ - const LOG = 'LOG'; - - /** - * Firebug INFO level - * - * Logs a message to firebug console and displays an info icon before the message. - * - * @var string - */ - const INFO = 'INFO'; - - /** - * Firebug WARN level - * - * Logs a message to firebug console, displays an warning icon before the message and colors the line turquoise. - * - * @var string - */ - const WARN = 'WARN'; - - /** - * Firebug ERROR level - * - * Logs a message to firebug console, displays an error icon before the message and colors the line yellow. Also increments the firebug error count. - * - * @var string - */ - const ERROR = 'ERROR'; - - /** - * Dumps a variable to firebug's server panel - * - * @var string - */ - const DUMP = 'DUMP'; - - /** - * Displays a stack trace in firebug console - * - * @var string - */ - const TRACE = 'TRACE'; - - /** - * Displays an exception in firebug console - * - * Increments the firebug error count. - * - * @var string - */ - const EXCEPTION = 'EXCEPTION'; - - /** - * Displays an table in firebug console - * - * @var string - */ - const TABLE = 'TABLE'; - - /** - * Starts a group in firebug console - * - * @var string - */ - const GROUP_START = 'GROUP_START'; - - /** - * Ends a group in firebug console - * - * @var string - */ - const GROUP_END = 'GROUP_END'; - - /** - * Singleton instance of FirePHP - * - * @var FirePHP - */ - protected static $instance = null; - - /** - * Wildfire protocol message index - * - * @var int - */ - protected $messageIndex = 1; - - /** - * Options for the library - * - * @var array - */ - protected $options = array(); - - /** - * Filters used to exclude object members when encoding - * - * @var array - */ - protected $objectFilters = array(); - - /** - * A stack of objects used to detect recursion during object encoding - * - * @var object - */ - protected $objectStack = array(); - - /** - * Flag to enable/disable logging - * - * @var boolean - */ - protected $enabled = true; - - /** - * The object constructor - */ - function __construct() { - $this->options['maxObjectDepth'] = 10; - $this->options['maxArrayDepth'] = 20; - $this->options['useNativeJsonEncode'] = true; - $this->options['includeLineNumbers'] = true; - } - - /** - * When the object gets serialized only include specific object members. - * - * @return array - */ - public function __sleep() { - return array('options','objectFilters','enabled'); - } - - /** - * Gets singleton instance of FirePHP - * - * @param boolean $AutoCreate - * @return FirePHP - */ - public static function getInstance($AutoCreate=false) { - if($AutoCreate===true && !self::$instance) { - self::init(); - } - return self::$instance; - } - - /** - * Creates FirePHP object and stores it for singleton access - * - * @return FirePHP - */ - public static function init() { - return self::$instance = new self(); - } - - /** - * Enable and disable logging to Firebug - * - * @param boolean $Enabled TRUE to enable, FALSE to disable - * @return void - */ - public function setEnabled($Enabled) { - $this->enabled = $Enabled; - } - - /** - * Check if logging is enabled - * - * @return boolean TRUE if enabled - */ - public function getEnabled() { - return $this->enabled; - } - - /** - * Specify a filter to be used when encoding an object - * - * Filters are used to exclude object members. - * - * @param string $Class The class name of the object - * @param array $Filter An array or members to exclude - * @return void - */ - public function setObjectFilter($Class, $Filter) { - $this->objectFilters[$Class] = $Filter; - } - - /** - * Set some options for the library - * - * Options: - * - maxObjectDepth: The maximum depth to traverse objects (default: 10) - * - maxArrayDepth: The maximum depth to traverse arrays (default: 20) - * - useNativeJsonEncode: If true will use json_encode() (default: true) - * - includeLineNumbers: If true will include line numbers and filenames (default: true) - * - * @param array $Options The options to be set - * @return void - */ - public function setOptions($Options) { - $this->options = array_merge($this->options,$Options); - } - - /** - * Register FirePHP as your error handler - * - * Will throw exceptions for each php error. - */ - public function registerErrorHandler() - { - //NOTE: The following errors will not be caught by this error handler: - // E_ERROR, E_PARSE, E_CORE_ERROR, - // E_CORE_WARNING, E_COMPILE_ERROR, - // E_COMPILE_WARNING, E_STRICT - - set_error_handler(array($this,'errorHandler')); - } - - /** - * FirePHP's error handler - * - * Throws exception for each php error that will occur. - * - * @param int $errno - * @param string $errstr - * @param string $errfile - * @param int $errline - * @param array $errcontext - */ - public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) - { - // Don't throw exception if error reporting is switched off - if (error_reporting() == 0) { - return; - } - // Only throw exceptions for errors we are asking for - if (error_reporting() & $errno) { - throw new ErrorException($errstr, 0, $errno, $errfile, $errline); - } - } - - /** - * Register FirePHP as your exception handler - */ - public function registerExceptionHandler() - { - set_exception_handler(array($this,'exceptionHandler')); - } - - /** - * FirePHP's exception handler - * - * Logs all exceptions to your firebug console and then stops the script. - * - * @param Exception $Exception - * @throws Exception - */ - function exceptionHandler($Exception) { - $this->fb($Exception); - } - - /** - * Set custom processor url for FirePHP - * - * @param string $URL - */ - public function setProcessorUrl($URL) - { - $this->setHeader('X-FirePHP-ProcessorURL', $URL); - } - - /** - * Set custom renderer url for FirePHP - * - * @param string $URL - */ - public function setRendererUrl($URL) - { - $this->setHeader('X-FirePHP-RendererURL', $URL); - } - - /** - * Start a group for following messages - * - * @param string $Name - * @return true - * @throws Exception - */ - public function group($Name) { - return $this->fb(null, $Name, FirePHP::GROUP_START); - } - - /** - * Ends a group you have started before - * - * @return true - * @throws Exception - */ - public function groupEnd() { - return $this->fb(null, null, FirePHP::GROUP_END); - } - - /** - * Log object with label to firebug console - * - * @see FirePHP::LOG - * @param mixes $Object - * @param string $Label - * @return true - * @throws Exception - */ - public function log($Object, $Label=null) { - return $this->fb($Object, $Label, FirePHP::LOG); - } - - /** - * Log object with label to firebug console - * - * @see FirePHP::INFO - * @param mixes $Object - * @param string $Label - * @return true - * @throws Exception - */ - public function info($Object, $Label=null) { - return $this->fb($Object, $Label, FirePHP::INFO); - } - - /** - * Log object with label to firebug console - * - * @see FirePHP::WARN - * @param mixes $Object - * @param string $Label - * @return true - * @throws Exception - */ - public function warn($Object, $Label=null) { - return $this->fb($Object, $Label, FirePHP::WARN); - } - - /** - * Log object with label to firebug console - * - * @see FirePHP::ERROR - * @param mixes $Object - * @param string $Label - * @return true - * @throws Exception - */ - public function error($Object, $Label=null) { - return $this->fb($Object, $Label, FirePHP::ERROR); - } - - /** - * Dumps key and variable to firebug server panel - * - * @see FirePHP::DUMP - * @param string $Key - * @param mixed $Variable - * @return true - * @throws Exception - */ - public function dump($Key, $Variable) { - return $this->fb($Variable, $Key, FirePHP::DUMP); - } - - /** - * Log a trace in the firebug console - * - * @see FirePHP::TRACE - * @param string $Label - * @return true - * @throws Exception - */ - public function trace($Label) { - return $this->fb($Label, FirePHP::TRACE); - } - - /** - * Log a table in the firebug console - * - * @see FirePHP::TABLE - * @param string $Label - * @param string $Table - * @return true - * @throws Exception - */ - public function table($Label, $Table) { - return $this->fb($Table, $Label, FirePHP::TABLE); - } - - /** - * Check if FirePHP is installed on client - * - * @return boolean - */ - public function detectClientExtension() { - /* Check if FirePHP is installed on client */ - if(!@preg_match_all('/\sFirePHP\/([\.|\d]*)\s?/si',$this->getUserAgent(),$m) || - !version_compare($m[1][0],'0.0.6','>=')) { - return false; - } - return true; - } - - /** - * Log varible to Firebug - * - * @see http://www.firephp.org/Wiki/Reference/Fb - * @param mixed $Object The variable to be logged - * @return true Return TRUE if message was added to headers, FALSE otherwise - * @throws Exception - */ - public function fb($Object) { - - if(!$this->enabled) { - return false; - } - - if (headers_sent($filename, $linenum)) { - throw $this->newException('Headers already sent in '.$filename.' on line '.$linenum.'. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.'); - } - - $Type = null; - $Label = null; - - if(func_num_args()==1) { - } else - if(func_num_args()==2) { - switch(func_get_arg(1)) { - case self::LOG: - case self::INFO: - case self::WARN: - case self::ERROR: - case self::DUMP: - case self::TRACE: - case self::EXCEPTION: - case self::TABLE: - case self::GROUP_START: - case self::GROUP_END: - $Type = func_get_arg(1); - break; - default: - $Label = func_get_arg(1); - break; - } - } else - if(func_num_args()==3) { - $Type = func_get_arg(2); - $Label = func_get_arg(1); - } else { - throw $this->newException('Wrong number of arguments to fb() function!'); - } - - - if(!$this->detectClientExtension()) { - return false; - } - - $meta = array(); - $skipFinalObjectEncode = false; - - if($Object instanceof Exception) { - - $meta['file'] = $this->_escapeTraceFile($Object->getFile()); - $meta['line'] = $Object->getLine(); - - $trace = $Object->getTrace(); - if($Object instanceof ErrorException - && isset($trace[0]['function']) - && $trace[0]['function']=='errorHandler' - && isset($trace[0]['class']) - && $trace[0]['class']=='FirePHP') { - - $severity = false; - switch($Object->getSeverity()) { - case E_WARNING: $severity = 'E_WARNING'; break; - case E_NOTICE: $severity = 'E_NOTICE'; break; - case E_USER_ERROR: $severity = 'E_USER_ERROR'; break; - case E_USER_WARNING: $severity = 'E_USER_WARNING'; break; - case E_USER_NOTICE: $severity = 'E_USER_NOTICE'; break; - case E_STRICT: $severity = 'E_STRICT'; break; - case E_RECOVERABLE_ERROR: $severity = 'E_RECOVERABLE_ERROR'; break; - case E_DEPRECATED: $severity = 'E_DEPRECATED'; break; - case E_USER_DEPRECATED: $severity = 'E_USER_DEPRECATED'; break; - } - - $Object = array('Class'=>get_class($Object), - 'Message'=>$severity.': '.$Object->getMessage(), - 'File'=>$this->_escapeTraceFile($Object->getFile()), - 'Line'=>$Object->getLine(), - 'Type'=>'trigger', - 'Trace'=>$this->_escapeTrace(array_splice($trace,2))); - $skipFinalObjectEncode = true; - } else { - $Object = array('Class'=>get_class($Object), - 'Message'=>$Object->getMessage(), - 'File'=>$this->_escapeTraceFile($Object->getFile()), - 'Line'=>$Object->getLine(), - 'Type'=>'throw', - 'Trace'=>$this->_escapeTrace($trace)); - $skipFinalObjectEncode = true; - } - $Type = self::EXCEPTION; - - } else - if($Type==self::TRACE) { - - $trace = debug_backtrace(); - if(!$trace) return false; - for( $i=0 ; $i_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php' - || substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) { - /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ - } else - if(isset($trace[$i]['class']) - && isset($trace[$i+1]['file']) - && $trace[$i]['class']=='FirePHP' - && substr($this->_standardizePath($trace[$i+1]['file']),-18,18)=='FirePHPCore/fb.php') { - /* Skip fb() */ - } else - if($trace[$i]['function']=='fb' - || $trace[$i]['function']=='trace' - || $trace[$i]['function']=='send') { - $Object = array('Class'=>isset($trace[$i]['class'])?$trace[$i]['class']:'', - 'Type'=>isset($trace[$i]['type'])?$trace[$i]['type']:'', - 'Function'=>isset($trace[$i]['function'])?$trace[$i]['function']:'', - 'Message'=>$trace[$i]['args'][0], - 'File'=>isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):'', - 'Line'=>isset($trace[$i]['line'])?$trace[$i]['line']:'', - 'Args'=>isset($trace[$i]['args'])?$this->encodeObject($trace[$i]['args']):'', - 'Trace'=>$this->_escapeTrace(array_splice($trace,$i+1))); - - $skipFinalObjectEncode = true; - $meta['file'] = isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):''; - $meta['line'] = isset($trace[$i]['line'])?$trace[$i]['line']:''; - break; - } - } - - } else - if($Type==self::TABLE) { - - if(isset($Object[0]) && is_string($Object[0])) { - $Object[1] = $this->encodeTable($Object[1]); - } else { - $Object = $this->encodeTable($Object); - } - - $skipFinalObjectEncode = true; - - } else { - if($Type===null) { - $Type = self::LOG; - } - } - - if($this->options['includeLineNumbers']) { - if(!isset($meta['file']) || !isset($meta['line'])) { - - $trace = debug_backtrace(); - for( $i=0 ; $trace && $i_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php' - || substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) { - /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ - } else - if(isset($trace[$i]['class']) - && isset($trace[$i+1]['file']) - && $trace[$i]['class']=='FirePHP' - && substr($this->_standardizePath($trace[$i+1]['file']),-18,18)=='FirePHPCore/fb.php') { - /* Skip fb() */ - } else - if(isset($trace[$i]['file']) - && substr($this->_standardizePath($trace[$i]['file']),-18,18)=='FirePHPCore/fb.php') { - /* Skip FB::fb() */ - } else { - $meta['file'] = isset($trace[$i]['file'])?$this->_escapeTraceFile($trace[$i]['file']):''; - $meta['line'] = isset($trace[$i]['line'])?$trace[$i]['line']:''; - break; - } - } - - } - } else { - unset($meta['file']); - unset($meta['line']); - } - - $this->setHeader('X-Wf-Protocol-1','http://meta.wildfirehq.org/Protocol/JsonStream/0.2'); - $this->setHeader('X-Wf-1-Plugin-1','http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/'.self::VERSION); - - $structure_index = 1; - if($Type==self::DUMP) { - $structure_index = 2; - $this->setHeader('X-Wf-1-Structure-2','http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1'); - } else { - $this->setHeader('X-Wf-1-Structure-1','http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'); - } - - if($Type==self::DUMP) { - $msg = '{"'.$Label.'":'.$this->jsonEncode($Object, $skipFinalObjectEncode).'}'; - } else { - $msg_meta = array('Type'=>$Type); - if($Label!==null) { - $msg_meta['Label'] = $Label; - } - if(isset($meta['file'])) { - $msg_meta['File'] = $meta['file']; - } - if(isset($meta['line'])) { - $msg_meta['Line'] = $meta['line']; - } - $msg = '['.$this->jsonEncode($msg_meta).','.$this->jsonEncode($Object, $skipFinalObjectEncode).']'; - } - - $parts = explode("\n",chunk_split($msg, 5000, "\n")); - - for( $i=0 ; $i2) { - // Message needs to be split into multiple parts - $this->setHeader('X-Wf-1-'.$structure_index.'-'.'1-'.$this->messageIndex, - (($i==0)?strlen($msg):'') - . '|' . $part . '|' - . (($isetHeader('X-Wf-1-'.$structure_index.'-'.'1-'.$this->messageIndex, - strlen($part) . '|' . $part . '|'); - } - - $this->messageIndex++; - - if ($this->messageIndex > 99999) { - throw new Exception('Maximum number (99,999) of messages reached!'); - } - } - } - - $this->setHeader('X-Wf-1-Index',$this->messageIndex-1); - - return true; - } - - /** - * Standardizes path for windows systems. - * - * @param string $Path - * @return string - */ - protected function _standardizePath($Path) { - return preg_replace('/\\\\+/','/',$Path); - } - - /** - * Escape trace path for windows systems - * - * @param array $Trace - * @return array - */ - protected function _escapeTrace($Trace) { - if(!$Trace) return $Trace; - for( $i=0 ; $i_escapeTraceFile($Trace[$i]['file']); - } - if(isset($Trace[$i]['args'])) { - $Trace[$i]['args'] = $this->encodeObject($Trace[$i]['args']); - } - } - return $Trace; - } - - /** - * Escape file information of trace for windows systems - * - * @param string $File - * @return string - */ - protected function _escapeTraceFile($File) { - /* Check if we have a windows filepath */ - if(strpos($File,'\\')) { - /* First strip down to single \ */ - - $file = preg_replace('/\\\\+/','\\',$File); - - return $file; - } - return $File; - } - - /** - * Send header - * - * @param string $Name - * @param string_type $Value - */ - protected function setHeader($Name, $Value) { - return header($Name.': '.$Value); - } - - /** - * Get user agent - * - * @return string|false - */ - protected function getUserAgent() { - if(!isset($_SERVER['HTTP_USER_AGENT'])) return false; - return $_SERVER['HTTP_USER_AGENT']; - } - - /** - * Returns a new exception - * - * @param string $Message - * @return Exception - */ - protected function newException($Message) { - return new Exception($Message); - } - - /** - * Encode an object into a JSON string - * - * Uses PHP's jeson_encode() if available - * - * @param object $Object The object to be encoded - * @return string The JSON string - */ - public function jsonEncode($Object, $skipObjectEncode=false) - { - if(!$skipObjectEncode) { - $Object = $this->encodeObject($Object); - } - - if(function_exists('json_encode') - && $this->options['useNativeJsonEncode']!=false) { - - return json_encode($Object); - } else { - return $this->json_encode($Object); - } - } - - /** - * Encodes a table by encoding each row and column with encodeObject() - * - * @param array $Table The table to be encoded - * @return array - */ - protected function encodeTable($Table) { - if(!$Table) return $Table; - for( $i=0 ; $iencodeObject($Table[$i][$j]); - } - } - } - return $Table; - } - - /** - * Encodes an object including members with - * protected and private visibility - * - * @param Object $Object The object to be encoded - * @param int $Depth The current traversal depth - * @return array All members of the object - */ - protected function encodeObject($Object, $ObjectDepth = 1, $ArrayDepth = 1) - { - $return = array(); - - if (is_resource($Object)) { - - return '** '.(string)$Object.' **'; - - } else - if (is_object($Object)) { - - if ($ObjectDepth > $this->options['maxObjectDepth']) { - return '** Max Object Depth ('.$this->options['maxObjectDepth'].') **'; - } - - foreach ($this->objectStack as $refVal) { - if ($refVal === $Object) { - return '** Recursion ('.get_class($Object).') **'; - } - } - array_push($this->objectStack, $Object); - - $return['__className'] = $class = get_class($Object); - - $reflectionClass = new ReflectionClass($class); - $properties = array(); - foreach( $reflectionClass->getProperties() as $property) { - $properties[$property->getName()] = $property; - } - - $members = (array)$Object; - - foreach( $properties as $raw_name => $property ) { - - $name = $raw_name; - if($property->isStatic()) { - $name = 'static:'.$name; - } - if($property->isPublic()) { - $name = 'public:'.$name; - } else - if($property->isPrivate()) { - $name = 'private:'.$name; - $raw_name = "\0".$class."\0".$raw_name; - } else - if($property->isProtected()) { - $name = 'protected:'.$name; - $raw_name = "\0".'*'."\0".$raw_name; - } - - if(!(isset($this->objectFilters[$class]) - && is_array($this->objectFilters[$class]) - && in_array($raw_name,$this->objectFilters[$class]))) { - - if(array_key_exists($raw_name,$members) - && !$property->isStatic()) { - - $return[$name] = $this->encodeObject($members[$raw_name], $ObjectDepth + 1, 1); - - } else { - if(method_exists($property,'setAccessible')) { - $property->setAccessible(true); - $return[$name] = $this->encodeObject($property->getValue($Object), $ObjectDepth + 1, 1); - } else - if($property->isPublic()) { - $return[$name] = $this->encodeObject($property->getValue($Object), $ObjectDepth + 1, 1); - } else { - $return[$name] = '** Need PHP 5.3 to get value **'; - } - } - } else { - $return[$name] = '** Excluded by Filter **'; - } - } - - // Include all members that are not defined in the class - // but exist in the object - foreach( $members as $raw_name => $value ) { - - $name = $raw_name; - - if ($name{0} == "\0") { - $parts = explode("\0", $name); - $name = $parts[2]; - } - - if(!isset($properties[$name])) { - $name = 'undeclared:'.$name; - - if(!(isset($this->objectFilters[$class]) - && is_array($this->objectFilters[$class]) - && in_array($raw_name,$this->objectFilters[$class]))) { - - $return[$name] = $this->encodeObject($value, $ObjectDepth + 1, 1); - } else { - $return[$name] = '** Excluded by Filter **'; - } - } - } - - array_pop($this->objectStack); - - } elseif (is_array($Object)) { - - if ($ArrayDepth > $this->options['maxArrayDepth']) { - return '** Max Array Depth ('.$this->options['maxArrayDepth'].') **'; - } - - foreach ($Object as $key => $val) { - - // Encoding the $GLOBALS PHP array causes an infinite loop - // if the recursion is not reset here as it contains - // a reference to itself. This is the only way I have come up - // with to stop infinite recursion in this case. - if($key=='GLOBALS' - && is_array($val) - && array_key_exists('GLOBALS',$val)) { - $val['GLOBALS'] = '** Recursion (GLOBALS) **'; - } - - $return[$key] = $this->encodeObject($val, 1, $ArrayDepth + 1); - } - } else { - if(self::is_utf8($Object)) { - return $Object; - } else { - return utf8_encode($Object); - } - } - return $return; - } - - /** - * Returns true if $string is valid UTF-8 and false otherwise. - * - * @param mixed $str String to be tested - * @return boolean - */ - protected static function is_utf8($str) { - $c=0; $b=0; - $bits=0; - $len=strlen($str); - for($i=0; $i<$len; $i++){ - $c=ord($str[$i]); - if($c > 128){ - if(($c >= 254)) return false; - elseif($c >= 252) $bits=6; - elseif($c >= 248) $bits=5; - elseif($c >= 240) $bits=4; - elseif($c >= 224) $bits=3; - elseif($c >= 192) $bits=2; - else return false; - if(($i+$bits) > $len) return false; - while($bits > 1){ - $i++; - $b=ord($str[$i]); - if($b < 128 || $b > 191) return false; - $bits--; - } - } - } - return true; - } - - /** - * Converts to and from JSON format. - * - * JSON (JavaScript Object Notation) is a lightweight data-interchange - * format. It is easy for humans to read and write. It is easy for machines - * to parse and generate. It is based on a subset of the JavaScript - * Programming Language, Standard ECMA-262 3rd Edition - December 1999. - * This feature can also be found in Python. JSON is a text format that is - * completely language independent but uses conventions that are familiar - * to programmers of the C-family of languages, including C, C++, C#, Java, - * JavaScript, Perl, TCL, and many others. These properties make JSON an - * ideal data-interchange language. - * - * This package provides a simple encoder and decoder for JSON notation. It - * is intended for use with client-side Javascript applications that make - * use of HTTPRequest to perform server communication functions - data can - * be encoded into JSON notation for use in a client-side javascript, or - * decoded from incoming Javascript requests. JSON format is native to - * Javascript, and can be directly eval()'ed with no further parsing - * overhead - * - * All strings should be in ASCII or UTF-8 format! - * - * LICENSE: Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: Redistributions of source code must retain the - * above copyright notice, this list of conditions and the following - * disclaimer. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * @category - * @package Services_JSON - * @author Michal Migurski - * @author Matt Knapp - * @author Brett Stimmerman - * @author Christoph Dorn - * @copyright 2005 Michal Migurski - * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ - * @license http://www.opensource.org/licenses/bsd-license.php - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 - */ - - - /** - * Keep a list of objects as we descend into the array so we can detect recursion. - */ - private $json_objectStack = array(); - - - /** - * convert a string from one UTF-8 char to one UTF-16 char - * - * Normally should be handled by mb_convert_encoding, but - * provides a slower PHP-only method for installations - * that lack the multibye string extension. - * - * @param string $utf8 UTF-8 character - * @return string UTF-16 character - * @access private - */ - private function json_utf82utf16($utf8) - { - // oh please oh please oh please oh please oh please - if(function_exists('mb_convert_encoding')) { - return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); - } - - switch(strlen($utf8)) { - case 1: - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return $utf8; - - case 2: - // return a UTF-16 character from a 2-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x07 & (ord($utf8{0}) >> 2)) - . chr((0xC0 & (ord($utf8{0}) << 6)) - | (0x3F & ord($utf8{1}))); - - case 3: - // return a UTF-16 character from a 3-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr((0xF0 & (ord($utf8{0}) << 4)) - | (0x0F & (ord($utf8{1}) >> 2))) - . chr((0xC0 & (ord($utf8{1}) << 6)) - | (0x7F & ord($utf8{2}))); - } - - // ignoring UTF-32 for now, sorry - return ''; - } - - /** - * encodes an arbitrary variable into JSON format - * - * @param mixed $var any number, boolean, string, array, or object to be encoded. - * see argument 1 to Services_JSON() above for array-parsing behavior. - * if var is a strng, note that encode() always expects it - * to be in ASCII or UTF-8 format! - * - * @return mixed JSON string representation of input var or an error if a problem occurs - * @access public - */ - private function json_encode($var) - { - - if(is_object($var)) { - if(in_array($var,$this->json_objectStack)) { - return '"** Recursion **"'; - } - } - - switch (gettype($var)) { - case 'boolean': - return $var ? 'true' : 'false'; - - case 'NULL': - return 'null'; - - case 'integer': - return (int) $var; - - case 'double': - case 'float': - return (float) $var; - - case 'string': - // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT - $ascii = ''; - $strlen_var = strlen($var); - - /* - * Iterate over every character in the string, - * escaping with a slash or encoding to UTF-8 where necessary - */ - for ($c = 0; $c < $strlen_var; ++$c) { - - $ord_var_c = ord($var{$c}); - - switch (true) { - case $ord_var_c == 0x08: - $ascii .= '\b'; - break; - case $ord_var_c == 0x09: - $ascii .= '\t'; - break; - case $ord_var_c == 0x0A: - $ascii .= '\n'; - break; - case $ord_var_c == 0x0C: - $ascii .= '\f'; - break; - case $ord_var_c == 0x0D: - $ascii .= '\r'; - break; - - case $ord_var_c == 0x22: - case $ord_var_c == 0x2F: - case $ord_var_c == 0x5C: - // double quote, slash, slosh - $ascii .= '\\'.$var{$c}; - break; - - case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): - // characters U-00000000 - U-0000007F (same as ASCII) - $ascii .= $var{$c}; - break; - - case (($ord_var_c & 0xE0) == 0xC0): - // characters U-00000080 - U-000007FF, mask 110XXXXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, ord($var{$c + 1})); - $c += 1; - $utf16 = $this->json_utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xF0) == 0xE0): - // characters U-00000800 - U-0000FFFF, mask 1110XXXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2})); - $c += 2; - $utf16 = $this->json_utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xF8) == 0xF0): - // characters U-00010000 - U-001FFFFF, mask 11110XXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3})); - $c += 3; - $utf16 = $this->json_utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xFC) == 0xF8): - // characters U-00200000 - U-03FFFFFF, mask 111110XX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4})); - $c += 4; - $utf16 = $this->json_utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xFE) == 0xFC): - // characters U-04000000 - U-7FFFFFFF, mask 1111110X - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4}), - ord($var{$c + 5})); - $c += 5; - $utf16 = $this->json_utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - } - } - - return '"'.$ascii.'"'; - - case 'array': - /* - * As per JSON spec if any array key is not an integer - * we must treat the the whole array as an object. We - * also try to catch a sparsely populated associative - * array with numeric keys here because some JS engines - * will create an array with empty indexes up to - * max_index which can cause memory issues and because - * the keys, which may be relevant, will be remapped - * otherwise. - * - * As per the ECMA and JSON specification an object may - * have any string as a property. Unfortunately due to - * a hole in the ECMA specification if the key is a - * ECMA reserved word or starts with a digit the - * parameter is only accessible using ECMAScript's - * bracket notation. - */ - - // treat as a JSON object - if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { - - $this->json_objectStack[] = $var; - - $properties = array_map(array($this, 'json_name_value'), - array_keys($var), - array_values($var)); - - array_pop($this->json_objectStack); - - foreach($properties as $property) { - if($property instanceof Exception) { - return $property; - } - } - - return '{' . join(',', $properties) . '}'; - } - - $this->json_objectStack[] = $var; - - // treat it like a regular array - $elements = array_map(array($this, 'json_encode'), $var); - - array_pop($this->json_objectStack); - - foreach($elements as $element) { - if($element instanceof Exception) { - return $element; - } - } - - return '[' . join(',', $elements) . ']'; - - case 'object': - $vars = self::encodeObject($var); - - $this->json_objectStack[] = $var; - - $properties = array_map(array($this, 'json_name_value'), - array_keys($vars), - array_values($vars)); - - array_pop($this->json_objectStack); - - foreach($properties as $property) { - if($property instanceof Exception) { - return $property; - } - } - - return '{' . join(',', $properties) . '}'; - - default: - return null; - } - } - - /** - * array-walking function for use in generating JSON-formatted name-value pairs - * - * @param string $name name of key to use - * @param mixed $value reference to an array element to be encoded - * - * @return string JSON-formatted name-value pair, like '"name":value' - * @access private - */ - private function json_name_value($name, $value) - { - // Encoding the $GLOBALS PHP array causes an infinite loop - // if the recursion is not reset here as it contains - // a reference to itself. This is the only way I have come up - // with to stop infinite recursion in this case. - if($name=='GLOBALS' - && is_array($value) - && array_key_exists('GLOBALS',$value)) { - $value['GLOBALS'] = '** Recursion **'; - } - - $encoded_value = $this->json_encode($value); - - if($encoded_value instanceof Exception) { - return $encoded_value; - } - - return $this->json_encode(strval($name)) . ':' . $encoded_value; - } -} From d2a7cbc43b399938c1cc200f23aa2042509b60af Mon Sep 17 00:00:00 2001 From: misol Date: Mon, 5 Jan 2009 06:14:14 +0000 Subject: [PATCH 69/82] =?UTF-8?q?=EB=B3=80=EC=88=98=ED=98=95=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5222 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../editor/components/naver_map/naver_map.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/editor/components/naver_map/naver_map.class.php b/modules/editor/components/naver_map/naver_map.class.php index 5c1150839..007209851 100644 --- a/modules/editor/components/naver_map/naver_map.class.php +++ b/modules/editor/components/naver_map/naver_map.class.php @@ -99,7 +99,7 @@ function transHTML($xml_obj) { $x = $xml_obj->attrs->x; $y = $xml_obj->attrs->y; - $marker = $xml_obj->attrs->marker; + $marker = urlencode($xml_obj->attrs->marker); $style = $xml_obj->attrs->style; preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches); @@ -108,7 +108,7 @@ if(!$width) $width = 400; if(!$height) $height = 400; - $body_code = sprintf('
                ', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height); + $body_code = sprintf('
                ', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height); return $body_code; } @@ -117,15 +117,19 @@ $width = Context::get('width'); if(!$width) $width = 640; + settype($width,"float"); $height = Context::get('height'); if(!$height) $height = 480; + settype($height,"float"); $x = Context::get('x'); if(!$x) $x = 321198; + settype($x,"int"); $y = Context::get('y'); if(!$y) $y = 529730; + settype($y,"int"); $marker = Context::get('marker'); @@ -160,6 +164,10 @@ $marker_list = explode('|@|', $marker); $icon_no = 0; for($i=0;$i Date: Mon, 5 Jan 2009 06:24:42 +0000 Subject: [PATCH 70/82] =?UTF-8?q?#17008112=20=EA=B6=8C=ED=95=9C=EC=9D=B4?= =?UTF-8?q?=20=EC=97=86=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=ED=8F=BC=EC=9D=B4=20=EB=82=98=ED=83=80=EB=82=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5223 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/message/skins/default/css/message.css | 36 +++++++++++++++---- .../message/skins/default/system_message.html | 25 ++++++++----- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/modules/message/skins/default/css/message.css b/modules/message/skins/default/css/message.css index c6e533347..b1da19c2a 100644 --- a/modules/message/skins/default/css/message.css +++ b/modules/message/skins/default/css/message.css @@ -1,16 +1,38 @@ @charset "utf-8"; - -.system_message { - color:#666666; - text-align:center; - padding:1em 0 1em 0; +.system_message_box { + position:relative; + *zoom:1; } -.system_button { - margin-top:1em; +.system_message_box blockquote { + text-align:center; + margin:30px 0 20px 0; + font-size:1.3em; + font-weight:bold; + text-decoration:underline; +} + +.system_message_box ul { + padding:0; + margin:0; + overflow:hidden; + *zoom:1; + text-align:center; +} + +.system_message_box ul li { + padding:0; + margin:0 10px 0 0; + display:inline; + list-style:none; } .system_message a { margin-top:1em; } + +.loginForm { + width:200px; + margin:30px auto 0 auto; +} diff --git a/modules/message/skins/default/system_message.html b/modules/message/skins/default/system_message.html index f4451ba0b..441b4954d 100644 --- a/modules/message/skins/default/system_message.html +++ b/modules/message/skins/default/system_message.html @@ -1,14 +1,21 @@ -
                - {$system_message} - + +
                + +
                + + From 405c9cd20d802d224f2e4d38013b640de716c206 Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 5 Jan 2009 06:24:53 +0000 Subject: [PATCH 71/82] =?UTF-8?q?#17573307=20=ED=99=88=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EA=B4=80=EB=A6=AC=20->=20=EA=B2=8C=EC=8B=9C=ED=8C=90?= =?UTF-8?q?=20->=20=EB=AA=A8=EB=93=88=EC=84=B8=EB=B6=80=EC=84=A4=EC=A0=95?= =?UTF-8?q?=20=EB=B2=84=EA=B7=B8=ED=94=BD=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5224 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../homepage/skins/xe_official/js/homepage.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/homepage/skins/xe_official/js/homepage.js b/modules/homepage/skins/xe_official/js/homepage.js index c831a2eeb..92afd1868 100644 --- a/modules/homepage/skins/xe_official/js/homepage.js +++ b/modules/homepage/skins/xe_official/js/homepage.js @@ -258,3 +258,20 @@ function doReloadTreeMenu(){ function closeTreeMenuInfo(){ jQuery('#menuItem').css("visibility",'hidden'); } + + +/* 모듈 생성 후 */ +function completeInsertBoard(ret_obj) { + var error = ret_obj['error']; + var message = ret_obj['message']; + + var page = ret_obj['page']; + var module_srl = ret_obj['module_srl']; + + alert(message); + + var url = current_url.setQuery('act','dispHomepageBoardInfo'); + if(module_srl) url = url.setQuery('module_srl',module_srl); + if(page) url.setQuery('page',page); + location.href = url; +} \ No newline at end of file From 085c7266f3f5a318863ee94dc50dae94e2438c14 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 06:28:12 +0000 Subject: [PATCH 72/82] =?UTF-8?q?#17494681=20=EC=9D=BC=EB=B3=B8=EC=96=B4?= =?UTF-8?q?=EC=99=80=20=EB=A7=88=EC=B0=AC=EA=B0=80=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EB=8B=A4=EB=A5=B8=20=EC=96=B8=EC=96=B4=ED=8C=A9=EC=97=90?= =?UTF-8?q?=EB=8F=84=20=ED=99=88=ED=8E=98=EC=9D=B4=EC=A7=80=EC=9D=98=20Q?= =?UTF-8?q?=20and=20A=20=EB=A9=94=EB=89=B4=EB=A1=9C=20=EB=8C=80=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5225 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/homepage/lang/en.lang.php | 2 +- modules/homepage/lang/ko.lang.php | 2 +- modules/homepage/lang/zh-CN.lang.php | 2 +- modules/homepage/lang/zh-TW.lang.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/homepage/lang/en.lang.php b/modules/homepage/lang/en.lang.php index 039ee54b9..7789ffe0b 100644 --- a/modules/homepage/lang/en.lang.php +++ b/modules/homepage/lang/en.lang.php @@ -26,7 +26,7 @@ 'community' => 'Community', 'freeboard' => 'Off-topics', 'humor' => 'Humor', - 'qa' => 'Question&Answer', + 'qa' => 'Q and A', ), 'second' => array( 'profile' => 'Introduction', diff --git a/modules/homepage/lang/ko.lang.php b/modules/homepage/lang/ko.lang.php index c65ddafd2..fded754af 100644 --- a/modules/homepage/lang/ko.lang.php +++ b/modules/homepage/lang/ko.lang.php @@ -26,7 +26,7 @@ 'community' => '커뮤니티', 'freeboard' => '자유게시판', 'humor' => '재밌는 이야기', - 'qa' => '질문&답변', + 'qa' => '질문/답변', ), 'second' => array( 'profile' => '홈페이지 소개', diff --git a/modules/homepage/lang/zh-CN.lang.php b/modules/homepage/lang/zh-CN.lang.php index 12f12d839..8be0ce69b 100644 --- a/modules/homepage/lang/zh-CN.lang.php +++ b/modules/homepage/lang/zh-CN.lang.php @@ -26,7 +26,7 @@ 'community' => '社区', 'freeboard' => '自由交流区', 'humor' => '幽默/休闲', - 'qa' => 'Q&A', + 'qa' => 'Q and A', ), 'second' => array( 'profile' => '关于我们', diff --git a/modules/homepage/lang/zh-TW.lang.php b/modules/homepage/lang/zh-TW.lang.php index 804ba34cd..acf2dbd42 100644 --- a/modules/homepage/lang/zh-TW.lang.php +++ b/modules/homepage/lang/zh-TW.lang.php @@ -26,7 +26,7 @@ 'community' => '討論', 'freeboard' => '自由討論', 'humor' => '新鮮趣事', - 'qa' => 'Q & A', + 'qa' => 'Q and A', ), 'second' => array( 'profile' => '網站介紹', From 505f4f1c2540dcab653b15afee4eee261b1b1ec7 Mon Sep 17 00:00:00 2001 From: misol Date: Mon, 5 Jan 2009 06:37:58 +0000 Subject: [PATCH 73/82] http://www.zeroboard.com/17555116 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5226 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../editor/components/multimedia_link/multimedia_link.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/editor/components/multimedia_link/multimedia_link.class.php b/modules/editor/components/multimedia_link/multimedia_link.class.php index b211cc73a..4b6ef0b25 100644 --- a/modules/editor/components/multimedia_link/multimedia_link.class.php +++ b/modules/editor/components/multimedia_link/multimedia_link.class.php @@ -56,6 +56,7 @@ $caption = $xml_obj->body; $src = str_replace(array('&','"'), array('&','&qout;'), $src); + $src = str_replace('&amp;', '&', $src); return sprintf("
                ", $src, $width, $height, $auto_start); } From bf2496daba6a57d8f2a66f5cc42f13b42e15f42f Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 06:51:25 +0000 Subject: [PATCH 74/82] =?UTF-8?q?#16999852=20=EC=9C=88=EB=8F=84=EC=9A=B0?= =?UTF-8?q?=20=EC=84=9C=EB=B2=84=EC=97=90=EC=84=9C=20=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EB=B0=9C=EC=86=A1=20=EC=95=88=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0.=20=EC=83=88=EB=AF=B8=EA=B8=B0?= =?UTF-8?q?=ED=94=88=EB=AC=BC=EB=8B=98=EC=9D=98=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5227 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/mail/Mail.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/mail/Mail.class.php b/classes/mail/Mail.class.php index f9f2898b6..9c201559c 100644 --- a/classes/mail/Mail.class.php +++ b/classes/mail/Mail.class.php @@ -66,10 +66,12 @@ $headers = sprintf( "From: %s".$eol. + "To: %s".$eol. "MIME-Version: 1.0".$eol. "Content-Type: multipart/alternative;".$eol."\tboundary=\"%s\"".$eol.$eol. "", $this->getSender(), + $this->getReceiptor(), $boundary ); @@ -93,7 +95,7 @@ $boundary ); - return mail($this->getReceiptor(), $this->getTitle(), $body, $headers); + return mail($this->receiptor_email, $this->getTitle(), $body, $headers); } function checkMailMX($email_address) { From 2ee25015fbc2dcf978bf6d47d9c9057d184744ff Mon Sep 17 00:00:00 2001 From: misol Date: Mon, 5 Jan 2009 06:54:23 +0000 Subject: [PATCH 75/82] =?UTF-8?q?sub=20sup=EB=A5=BC=20=EC=96=B8=EC=96=B4?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=EC=97=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5228 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/editor/lang/en.lang.php | 2 + modules/editor/lang/es.lang.php | 2 + modules/editor/lang/fr.lang.php | 2 + modules/editor/lang/jp.lang.php | 172 +++++++++++++++-------------- modules/editor/lang/ko.lang.php | 2 + modules/editor/lang/ru.lang.php | 2 + modules/editor/lang/zh-CN.lang.php | 2 + modules/editor/lang/zh-TW.lang.php | 2 + 8 files changed, 101 insertions(+), 85 deletions(-) diff --git a/modules/editor/lang/en.lang.php b/modules/editor/lang/en.lang.php index ffb67be1b..0def1c8d8 100644 --- a/modules/editor/lang/en.lang.php +++ b/modules/editor/lang/en.lang.php @@ -85,6 +85,8 @@ $lang->edit->help_italic = 'Make italic font'; $lang->edit->help_underline = 'Underline font'; $lang->edit->help_strike = 'Strike font'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Redo'; $lang->edit->help_undo = 'Undo'; $lang->edit->help_align_left = 'Align left'; diff --git a/modules/editor/lang/es.lang.php b/modules/editor/lang/es.lang.php index 1ae4c4bfc..f3d575ec2 100644 --- a/modules/editor/lang/es.lang.php +++ b/modules/editor/lang/es.lang.php @@ -81,6 +81,8 @@ $lang->edit->help_italic = 'Letra cursiva'; $lang->edit->help_underline = 'Letra subrayada'; $lang->edit->help_strike = 'Letra con linea'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Rehacer'; $lang->edit->help_undo = 'Deshacer'; $lang->edit->help_align_left = 'Margen izquierdo'; diff --git a/modules/editor/lang/fr.lang.php b/modules/editor/lang/fr.lang.php index 73c9e4973..d0a009d26 100644 --- a/modules/editor/lang/fr.lang.php +++ b/modules/editor/lang/fr.lang.php @@ -85,6 +85,8 @@ $lang->edit->help_italic = 'Caractère italique'; $lang->edit->help_underline = 'Caractère souligné'; $lang->edit->help_strike = 'Caractère biffé'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Réfaire'; $lang->edit->help_undo = 'Annuler'; $lang->edit->help_align_left = 'Aligner à gauche'; diff --git a/modules/editor/lang/jp.lang.php b/modules/editor/lang/jp.lang.php index 2c82da296..d5dd5be0c 100644 --- a/modules/editor/lang/jp.lang.php +++ b/modules/editor/lang/jp.lang.php @@ -1,59 +1,59 @@ 翻訳:RisaPapa、ミニミ - * @brief ウィジウィグエディター(editor)モジュールの基本言語パッケージ + * @author zero 翻訳RisaPapa߫˫ + * @brief ǫーeditor⫸ーޫѫëー **/ - $lang->editor = 'ウイジウイグエディター'; - $lang->component_name = 'コンポーネント'; - $lang->component_version = 'バージョン'; - $lang->component_author = '作者'; - $lang->component_link = 'リンク'; - $lang->component_date = '作成日'; - $lang->component_license = 'ライセンス'; - $lang->component_history = '変更履歴'; - $lang->component_description = '説明'; - $lang->component_extra_vars = '設定変数'; - $lang->component_grant = '権限設定'; + $lang->editor = 'ǫー'; + $lang->component_name = 'ーͫ'; + $lang->component_version = 'ー'; + $lang->component_author = ''; + $lang->component_link = ''; + $lang->component_date = ''; + $lang->component_license = '髤'; + $lang->component_history = '変歴'; + $lang->component_description = '説٥'; + $lang->component_extra_vars = '変数'; + $lang->component_grant = '権'; - $lang->about_component = 'コンポーネント情報'; - $lang->about_component_grant = '基本コンポーネント以外の拡張コンポーネント機能が利用可能な権限の設定が出来ます。
                (選択なしの場合、誰でも利用可能)'; - $lang->about_component_mid = 'エディターコンポーネントが使われる対象を指定します。
                (選択なしの場合、全ての対象で利用可能)'; + $lang->about_component = 'ーͫ'; + $lang->about_component_grant = '⫳ーͫ拡嫳ーͫѦʦ権ڪҪ来ު
                (択ʪꡢǪʦ)'; + $lang->about_component_mid = 'ǫーーͫȪŪ対ڪҪު
                (択ʪꡢƪ対ڪʦ)'; - $lang->msg_component_is_not_founded = '%s エディターのコンポーネントが見つかりません。'; - $lang->msg_component_is_inserted = '選択されたコンポーネントは既に入力されています。'; - $lang->msg_component_is_first_order = '選択されたコンポーネントは最初に位置しています。'; - $lang->msg_component_is_last_order = '選択されたコンポーネントは最後に位置しています。'; - $lang->msg_load_saved_doc = '自動保存された書き込みがあります。復旧しますか?\n書き終わってから登録すると前の自動保存データは削除されます。'; - $lang->msg_auto_saved = '自動保存されました。'; + $lang->msg_component_is_not_founded = '%s ǫーΫーͫȪ̸Īު'; + $lang->msg_component_is_inserted = '択쪿ーͫȪ既ƪު'; + $lang->msg_component_is_first_order = '択쪿ーͫȪǪƪު'; + $lang->msg_component_is_last_order = '択쪿ーͫȪǪƪު'; + $lang->msg_load_saved_doc = '쪿込ߪު旧ު\nêƪ録ー𶪵ު'; + $lang->msg_auto_saved = 'ު'; - $lang->cmd_disable = '未使用'; - $lang->cmd_enable = '使用'; + $lang->cmd_disable = 'ڱ'; + $lang->cmd_enable = ''; - $lang->editor_skin = 'エディタースキン'; - $lang->upload_file_grant = 'ファイル添付権限'; - $lang->enable_default_component_grant = '基本コンポーネント使用権限'; - $lang->enable_component_grant = 'コンポーネント使用権限'; - $lang->enable_html_grant = 'HTML編集権限'; - $lang->enable_autosave = '自動保存使用'; - $lang->height_resizable = '高さの調節'; - $lang->editor_height = 'エディターの高さ'; + $lang->editor_skin = 'ǫー'; + $lang->upload_file_grant = 'ի権'; + $lang->enable_default_component_grant = '⫳ーͫ権'; + $lang->enable_component_grant = 'ーͫ権'; + $lang->enable_html_grant = 'HTML権'; + $lang->enable_autosave = ''; + $lang->height_resizable = 'Ԫ'; + $lang->editor_height = 'ǫーԪ'; - $lang->about_editor_skin = 'エディターのスキンの選択が出来ます。'; - $lang->about_upload_file_grant = 'ファイル添付可能な権限の設定が出来ます。(選択なしの場合、誰でも添付が可能)'; - $lang->about_default_component_grant = 'エディターでの基本コンポーネントを使用可能な権限の設定が出来ます。(選択なしの場合、誰でも利用可能)'; - $lang->about_editor_height = 'エディターの基本高さを設定します。'; - $lang->about_editor_height_resizable = 'エディターの高さを直接変更出来るようにします。'; - $lang->about_enable_html_grant = 'HTML編集権限を付与します。'; - $lang->about_enable_autosave = '書き込みのとき、自動保存機能をオンにします。'; + $lang->about_editor_skin = 'ǫーΫ択来ު'; + $lang->about_upload_file_grant = 'իʦ権ڪҪ来ު(択ʪꡢǪʦ)'; + $lang->about_default_component_grant = 'ǫーǪ⫳ーͫȪʦ権ڪҪ来ު(択ʪꡢǪʦ)'; + $lang->about_editor_height = 'ǫーԪҪު'; + $lang->about_editor_height_resizable = 'ǫーԪ変来誦˪ު'; + $lang->about_enable_html_grant = 'HTML権ڪ与ު'; + $lang->about_enable_autosave = '込ߪΪȪѦ򫪫˪ު'; - $lang->edit->fontname = 'フォント'; - $lang->edit->fontsize = 'フォントサイズ'; - $lang->edit->use_paragraph = '段落機能'; + $lang->edit->fontname = 'ի'; + $lang->edit->fontsize = 'իȫ'; + $lang->edit->use_paragraph = 'ӫժѦ'; $lang->edit->fontlist = array( - 'MS Pゴシック', - 'MS P明朝', + 'ͣ Ыë', + 'ͣ ٥', 'MS UI Gothic', 'Arial', 'Arial Black', @@ -66,57 +66,59 @@ 'Fantasy', ); - $lang->edit->header = '見出し'; + $lang->edit->header = '̸'; $lang->edit->header_list = array( - 'h1' => '見出し1', - 'h2' => '見出し2', - 'h3' => '見出し3', - 'h4' => '見出し4', - 'h5' => '見出し5', - 'h6' => '見出し6', + 'h1' => '̸󪷣', + 'h2' => '̸󪷣', + 'h3' => '̸󪷣', + 'h4' => '̸󪷣', + 'h5' => '̸󪷣', + 'h6' => '̸󪷣', ); - $lang->edit->submit = '送信'; + $lang->edit->submit = ''; - $lang->edit->help_remove_format = '選択領域の中のタグを消します。'; - $lang->edit->help_strike_through = 'テキストに取り消し線を表示します。'; - $lang->edit->help_align_full = '左右の余白に合わせて文字列を配置します。'; + $lang->edit->help_remove_format = '択洪ΫἪު'; + $lang->edit->help_strike_through = 'ƫȪἪʪƪު'; + $lang->edit->help_align_full = 'Ӫܪ請֪Ǫު'; - $lang->edit->help_fontcolor = 'テキストの色を指定します。'; - $lang->edit->help_fontbgcolor = 'テキストの背景色を指定します。'; - $lang->edit->help_bold = 'テキストを太字に指定します。'; - $lang->edit->help_italic = 'テキストを斜体にします。'; - $lang->edit->help_underline = 'テキストに下線(アンダーライン)を引きます。'; - $lang->edit->help_strike = '取り消し線を引きます。'; - $lang->edit->help_redo = '繰り返し'; - $lang->edit->help_undo = '元に戻す'; - $lang->edit->help_align_left = 'テキストを左揃えで表示します。'; - $lang->edit->help_align_center = 'テキストを中央揃えで表示します。'; - $lang->edit->help_align_right = 'テキストを右揃えで表示します。'; - $lang->edit->help_add_indent = 'インデントを増やします。'; - $lang->edit->help_remove_indent = 'インデントを減らします。'; - $lang->edit->help_list_number = '段落番号'; - $lang->edit->help_list_bullet = '箇条書き'; - $lang->edit->help_use_paragrapth = '段落機能を使用する場合は、「Ctrl+Enter」を押します(書き終わった後、「Alt+S」を押すと保存されます)。'; + $lang->edit->help_fontcolor = 'ƫȪҪު'; + $lang->edit->help_fontbgcolor = 'ƫȪҪު'; + $lang->edit->help_bold = 'ƫȪҪު'; + $lang->edit->help_italic = 'ƫȪ体˪ު'; + $lang->edit->help_underline = 'ƫȪʣー髤󣩪ڪު'; + $lang->edit->help_strike = 'Ἢʪڪު'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; + $lang->edit->help_redo = '۪'; + $lang->edit->help_undo = 'ꪪ戻'; + $lang->edit->help_align_left = 'ƫȪ揃ƪު'; + $lang->edit->help_align_center = 'ƫȪ揃ƪު'; + $lang->edit->help_align_right = 'ƫȪ揃ƪު'; + $lang->edit->help_add_indent = 'ǫȪ増䪷ު'; + $lang->edit->help_remove_indent = 'ǫȪ骷ު'; + $lang->edit->help_list_number = 'ӫժ号'; + $lang->edit->help_list_bullet = '条'; + $lang->edit->help_use_paragrapth = 'ӫժѦĪϡCtrl+Enter㪷ުêAlt+S㪹ު'; - $lang->edit->upload = '添付'; - $lang->edit->upload_file = 'ファイル添付'; - $lang->edit->link_file = 'テキスト挿入'; - $lang->edit->delete_selected = '選択リスト削除'; + $lang->edit->upload = ''; + $lang->edit->upload_file = 'ի'; + $lang->edit->link_file = 'ƫ挿'; + $lang->edit->delete_selected = '択꫹'; - $lang->edit->icon_align_article = '一段落'; - $lang->edit->icon_align_left = '左揃え'; - $lang->edit->icon_align_middle = '中央揃え'; - $lang->edit->icon_align_right = '右揃え'; + $lang->edit->icon_align_article = 'ӫժ'; + $lang->edit->icon_align_left = '揃'; + $lang->edit->icon_align_middle = '揃'; + $lang->edit->icon_align_right = '揃'; - $lang->about_dblclick_in_editor = '背景、文字、イメージ、引用文の上にカーソルを合わせ、ダブルクリックすると詳細設定できるコンポーネントを表示します。'; + $lang->about_dblclick_in_editor = 'ءー߾˫ー請֫뫯ëҪǪ뫳ーͫȪƪު'; - $lang->edit->rich_editor = 'ウイジウイグ編集'; - $lang->edit->html_editor = 'HTMLタグ編集'; - $lang->edit->extension ='拡張コンポーネント'; - $lang->edit->help = 'ヘルプ'; - $lang->edit->help_command = 'ショートカット‐キーの説明'; + $lang->edit->rich_editor = ''; + $lang->edit->html_editor = 'HTML'; + $lang->edit->extension ='拡嫳ーͫ'; + $lang->edit->help = 'ث'; + $lang->edit->help_command = 'ーȫë‐ー説٥'; diff --git a/modules/editor/lang/ko.lang.php b/modules/editor/lang/ko.lang.php index dd86cf8c9..4022e5119 100644 --- a/modules/editor/lang/ko.lang.php +++ b/modules/editor/lang/ko.lang.php @@ -88,6 +88,8 @@ $lang->edit->help_italic = '글자를 기울이게 합니다'; $lang->edit->help_underline = '밑줄을 긋습니다'; $lang->edit->help_strike = '취소선을 긋습니다'; + $lang->edit->help_sup = '윗첨자를 입력합니다.'; + $lang->edit->help_sub = '아랫첨자를 입력합니다.'; $lang->edit->help_redo = '다음 동작으로 돌아갑니다'; $lang->edit->help_undo = '이전 동작으로 돌아갑니다'; $lang->edit->help_align_left = '왼쪽 정렬을 합니다'; diff --git a/modules/editor/lang/ru.lang.php b/modules/editor/lang/ru.lang.php index 602fa2ac2..cf734574f 100644 --- a/modules/editor/lang/ru.lang.php +++ b/modules/editor/lang/ru.lang.php @@ -81,6 +81,8 @@ $lang->edit->help_italic = 'Сделать шрифт наклонным'; $lang->edit->help_underline = 'Сделать шрифт подчеркнутым'; $lang->edit->help_strike = 'Сделать шрифт зачеркнутым'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Восстановить отмененное'; $lang->edit->help_undo = 'Отмена'; $lang->edit->help_align_left = 'Выровнять по левому краю'; diff --git a/modules/editor/lang/zh-CN.lang.php b/modules/editor/lang/zh-CN.lang.php index d42260827..54c427b5e 100644 --- a/modules/editor/lang/zh-CN.lang.php +++ b/modules/editor/lang/zh-CN.lang.php @@ -85,6 +85,8 @@ $lang->edit->help_italic = '斜体'; $lang->edit->help_underline = '下划线'; $lang->edit->help_strike = '取消线'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = '重新操作'; $lang->edit->help_undo = '返回操作'; $lang->edit->help_align_left = '左对齐'; diff --git a/modules/editor/lang/zh-TW.lang.php b/modules/editor/lang/zh-TW.lang.php index 94c98f0dd..d54676e75 100644 --- a/modules/editor/lang/zh-TW.lang.php +++ b/modules/editor/lang/zh-TW.lang.php @@ -88,6 +88,8 @@ $lang->edit->help_italic = '斜體'; $lang->edit->help_underline = '底線'; $lang->edit->help_strike = '虛線'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = '重新操作'; $lang->edit->help_undo = '返回操作'; $lang->edit->help_align_left = '靠左對齊'; From 981575ad3a5a00cadee54486395cbde8248cd934 Mon Sep 17 00:00:00 2001 From: misol Date: Mon, 5 Jan 2009 06:54:46 +0000 Subject: [PATCH 76/82] =?UTF-8?q?=EC=97=90=EB=94=94=ED=84=B0=EC=97=90=20?= =?UTF-8?q?=EC=9C=97=EC=B2=A8=EC=9E=90=20=EC=95=84=EB=9E=AB=EC=B2=A8?= =?UTF-8?q?=EC=9E=90=20=EC=84=A4=EB=AA=85=20=EB=84=A3=EC=9D=84=20=EC=88=98?= =?UTF-8?q?=20=EC=9E=88=EA=B2=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5229 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/editor/skins/default/editor.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/editor/skins/default/editor.html b/modules/editor/skins/default/editor.html index 46d18c900..edc1741d9 100644 --- a/modules/editor/skins/default/editor.html +++ b/modules/editor/skins/default/editor.html @@ -102,8 +102,8 @@
              • -
              • -
              • +
              • +
              • From f81b5afe21e458b5310a3ef802c9ccf59e6468f2 Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 5 Jan 2009 07:04:31 +0000 Subject: [PATCH 78/82] =?UTF-8?q?r5228=EC=97=90=EC=84=9C=20=EC=9D=BC?= =?UTF-8?q?=EB=B3=B8=EC=96=B4=20=EC=96=B8=EC=96=B4=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=B4=20=EA=B9=A8=EC=A7=80=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5231 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/editor/lang/jp.lang.php | 170 ++++++++++++++++---------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/modules/editor/lang/jp.lang.php b/modules/editor/lang/jp.lang.php index d5dd5be0c..637903bd1 100644 --- a/modules/editor/lang/jp.lang.php +++ b/modules/editor/lang/jp.lang.php @@ -1,59 +1,59 @@ 翻訳RisaPapa߫˫ - * @brief ǫーeditor⫸ーޫѫëー + * @author zero 翻訳:RisaPapa、ミニミ + * @brief ウィジウィグエディター(editor)モジュールの基本言語パッケージ **/ - $lang->editor = 'ǫー'; - $lang->component_name = 'ーͫ'; - $lang->component_version = 'ー'; - $lang->component_author = ''; - $lang->component_link = ''; - $lang->component_date = ''; - $lang->component_license = '髤'; - $lang->component_history = '変歴'; - $lang->component_description = '説٥'; - $lang->component_extra_vars = '変数'; - $lang->component_grant = '権'; + $lang->editor = 'ウイジウイグエディター'; + $lang->component_name = 'コンポーネント'; + $lang->component_version = 'バージョン'; + $lang->component_author = '作者'; + $lang->component_link = 'リンク'; + $lang->component_date = '作成日'; + $lang->component_license = 'ライセンス'; + $lang->component_history = '変更履歴'; + $lang->component_description = '説明'; + $lang->component_extra_vars = '設定変数'; + $lang->component_grant = '権限設定'; - $lang->about_component = 'ーͫ'; - $lang->about_component_grant = '⫳ーͫ拡嫳ーͫѦʦ権ڪҪ来ު
                (択ʪꡢǪʦ)'; - $lang->about_component_mid = 'ǫーーͫȪŪ対ڪҪު
                (択ʪꡢƪ対ڪʦ)'; + $lang->about_component = 'コンポーネント情報'; + $lang->about_component_grant = '基本コンポーネント以外の拡張コンポーネント機能が利用可能な権限の設定が出来ます。
                (選択なしの場合、誰でも利用可能)'; + $lang->about_component_mid = 'エディターコンポーネントが使われる対象を指定します。
                (選択なしの場合、全ての対象で利用可能)'; - $lang->msg_component_is_not_founded = '%s ǫーΫーͫȪ̸Īު'; - $lang->msg_component_is_inserted = '択쪿ーͫȪ既ƪު'; - $lang->msg_component_is_first_order = '択쪿ーͫȪǪƪު'; - $lang->msg_component_is_last_order = '択쪿ーͫȪǪƪު'; - $lang->msg_load_saved_doc = '쪿込ߪު旧ު\nêƪ録ー𶪵ު'; - $lang->msg_auto_saved = 'ު'; + $lang->msg_component_is_not_founded = '%s エディターのコンポーネントが見つかりません。'; + $lang->msg_component_is_inserted = '選択されたコンポーネントは既に入力されています。'; + $lang->msg_component_is_first_order = '選択されたコンポーネントは最初に位置しています。'; + $lang->msg_component_is_last_order = '選択されたコンポーネントは最後に位置しています。'; + $lang->msg_load_saved_doc = '自動保存された書き込みがあります。復旧しますか?\n書き終わってから登録すると前の自動保存データは削除されます。'; + $lang->msg_auto_saved = '自動保存されました。'; - $lang->cmd_disable = 'ڱ'; - $lang->cmd_enable = ''; + $lang->cmd_disable = '未使用'; + $lang->cmd_enable = '使用'; - $lang->editor_skin = 'ǫー'; - $lang->upload_file_grant = 'ի権'; - $lang->enable_default_component_grant = '⫳ーͫ権'; - $lang->enable_component_grant = 'ーͫ権'; - $lang->enable_html_grant = 'HTML権'; - $lang->enable_autosave = ''; - $lang->height_resizable = 'Ԫ'; - $lang->editor_height = 'ǫーԪ'; + $lang->editor_skin = 'エディタースキン'; + $lang->upload_file_grant = 'ファイル添付権限'; + $lang->enable_default_component_grant = '基本コンポーネント使用権限'; + $lang->enable_component_grant = 'コンポーネント使用権限'; + $lang->enable_html_grant = 'HTML編集権限'; + $lang->enable_autosave = '自動保存使用'; + $lang->height_resizable = '高さの調節'; + $lang->editor_height = 'エディターの高さ'; - $lang->about_editor_skin = 'ǫーΫ択来ު'; - $lang->about_upload_file_grant = 'իʦ権ڪҪ来ު(択ʪꡢǪʦ)'; - $lang->about_default_component_grant = 'ǫーǪ⫳ーͫȪʦ権ڪҪ来ު(択ʪꡢǪʦ)'; - $lang->about_editor_height = 'ǫーԪҪު'; - $lang->about_editor_height_resizable = 'ǫーԪ変来誦˪ު'; - $lang->about_enable_html_grant = 'HTML権ڪ与ު'; - $lang->about_enable_autosave = '込ߪΪȪѦ򫪫˪ު'; + $lang->about_editor_skin = 'エディターのスキンの選択が出来ます。'; + $lang->about_upload_file_grant = 'ファイル添付可能な権限の設定が出来ます。(選択なしの場合、誰でも添付が可能)'; + $lang->about_default_component_grant = 'エディターでの基本コンポーネントを使用可能な権限の設定が出来ます。(選択なしの場合、誰でも利用可能)'; + $lang->about_editor_height = 'エディターの基本高さを設定します。'; + $lang->about_editor_height_resizable = 'エディターの高さを直接変更出来るようにします。'; + $lang->about_enable_html_grant = 'HTML編集権限を付与します。'; + $lang->about_enable_autosave = '書き込みのとき、自動保存機能をオンにします。'; - $lang->edit->fontname = 'ի'; - $lang->edit->fontsize = 'իȫ'; - $lang->edit->use_paragraph = 'ӫժѦ'; + $lang->edit->fontname = 'フォント'; + $lang->edit->fontsize = 'フォントサイズ'; + $lang->edit->use_paragraph = '段落機能'; $lang->edit->fontlist = array( - 'ͣ Ыë', - 'ͣ ٥', + 'MS Pゴシック', + 'MS P明朝', 'MS UI Gothic', 'Arial', 'Arial Black', @@ -66,59 +66,59 @@ 'Fantasy', ); - $lang->edit->header = '̸'; + $lang->edit->header = '見出し'; $lang->edit->header_list = array( - 'h1' => '̸󪷣', - 'h2' => '̸󪷣', - 'h3' => '̸󪷣', - 'h4' => '̸󪷣', - 'h5' => '̸󪷣', - 'h6' => '̸󪷣', + 'h1' => '見出し1', + 'h2' => '見出し2', + 'h3' => '見出し3', + 'h4' => '見出し4', + 'h5' => '見出し5', + 'h6' => '見出し6', ); - $lang->edit->submit = ''; + $lang->edit->submit = '送信'; - $lang->edit->help_remove_format = '択洪ΫἪު'; - $lang->edit->help_strike_through = 'ƫȪἪʪƪު'; - $lang->edit->help_align_full = 'Ӫܪ請֪Ǫު'; + $lang->edit->help_remove_format = '選択領域の中のタグを消します。'; + $lang->edit->help_strike_through = 'テキストに取り消し線を表示します。'; + $lang->edit->help_align_full = '左右の余白に合わせて文字列を配置します。'; - $lang->edit->help_fontcolor = 'ƫȪҪު'; - $lang->edit->help_fontbgcolor = 'ƫȪҪު'; - $lang->edit->help_bold = 'ƫȪҪު'; - $lang->edit->help_italic = 'ƫȪ体˪ު'; - $lang->edit->help_underline = 'ƫȪʣー髤󣩪ڪު'; - $lang->edit->help_strike = 'Ἢʪڪު'; + $lang->edit->help_fontcolor = 'テキストの色を指定します。'; + $lang->edit->help_fontbgcolor = 'テキストの背景色を指定します。'; + $lang->edit->help_bold = 'テキストを太字に指定します。'; + $lang->edit->help_italic = 'テキストを斜体にします。'; + $lang->edit->help_underline = 'テキストに下線(アンダーライン)を引きます。'; + $lang->edit->help_strike = '取り消し線を引きます。'; $lang->edit->help_sup = 'Sup'; $lang->edit->help_sub = 'Sub'; - $lang->edit->help_redo = '۪'; - $lang->edit->help_undo = 'ꪪ戻'; - $lang->edit->help_align_left = 'ƫȪ揃ƪު'; - $lang->edit->help_align_center = 'ƫȪ揃ƪު'; - $lang->edit->help_align_right = 'ƫȪ揃ƪު'; - $lang->edit->help_add_indent = 'ǫȪ増䪷ު'; - $lang->edit->help_remove_indent = 'ǫȪ骷ު'; - $lang->edit->help_list_number = 'ӫժ号'; - $lang->edit->help_list_bullet = '条'; - $lang->edit->help_use_paragrapth = 'ӫժѦĪϡCtrl+Enter㪷ުêAlt+S㪹ު'; + $lang->edit->help_redo = '繰り返し'; + $lang->edit->help_undo = '元に戻す'; + $lang->edit->help_align_left = 'テキストを左揃えで表示します。'; + $lang->edit->help_align_center = 'テキストを中央揃えで表示します。'; + $lang->edit->help_align_right = 'テキストを右揃えで表示します。'; + $lang->edit->help_add_indent = 'インデントを増やします。'; + $lang->edit->help_remove_indent = 'インデントを減らします。'; + $lang->edit->help_list_number = '段落番号'; + $lang->edit->help_list_bullet = '箇条書き'; + $lang->edit->help_use_paragrapth = '段落機能を使用する場合は、「Ctrl+Enter」を押します(書き終わった後、「Alt+S」を押すと保存されます)。'; - $lang->edit->upload = ''; - $lang->edit->upload_file = 'ի'; - $lang->edit->link_file = 'ƫ挿'; - $lang->edit->delete_selected = '択꫹'; + $lang->edit->upload = '添付'; + $lang->edit->upload_file = 'ファイル添付'; + $lang->edit->link_file = 'テキスト挿入'; + $lang->edit->delete_selected = '選択リスト削除'; - $lang->edit->icon_align_article = 'ӫժ'; - $lang->edit->icon_align_left = '揃'; - $lang->edit->icon_align_middle = '揃'; - $lang->edit->icon_align_right = '揃'; + $lang->edit->icon_align_article = '一段落'; + $lang->edit->icon_align_left = '左揃え'; + $lang->edit->icon_align_middle = '中央揃え'; + $lang->edit->icon_align_right = '右揃え'; - $lang->about_dblclick_in_editor = 'ءー߾˫ー請֫뫯ëҪǪ뫳ーͫȪƪު'; + $lang->about_dblclick_in_editor = '背景、文字、イメージ、引用文の上にカーソルを合わせ、ダブルクリックすると詳細設定できるコンポーネントを表示します。'; - $lang->edit->rich_editor = ''; - $lang->edit->html_editor = 'HTML'; - $lang->edit->extension ='拡嫳ーͫ'; - $lang->edit->help = 'ث'; - $lang->edit->help_command = 'ーȫë‐ー説٥'; + $lang->edit->rich_editor = 'ウイジウイグ編集'; + $lang->edit->html_editor = 'HTMLタグ編集'; + $lang->edit->extension ='拡張コンポーネント'; + $lang->edit->help = 'ヘルプ'; + $lang->edit->help_command = 'ショートカット‐キーの説明'; From fc3058c6983e7669538dd56a8c1c7f2a259b4e0a Mon Sep 17 00:00:00 2001 From: misol Date: Mon, 5 Jan 2009 07:17:05 +0000 Subject: [PATCH 79/82] =?UTF-8?q?=EC=98=81=EB=AC=B8=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=20=EC=A0=80=EC=9E=A5=20=ED=99=95=EC=9D=B8=20=EB=A9=98=ED=8A=B8?= =?UTF-8?q?=EC=9D=98=20=EC=A4=84=20=EB=B0=94=EA=BF=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5232 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/editor/lang/en.lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/lang/en.lang.php b/modules/editor/lang/en.lang.php index 0def1c8d8..df777412c 100644 --- a/modules/editor/lang/en.lang.php +++ b/modules/editor/lang/en.lang.php @@ -25,7 +25,7 @@ $lang->msg_component_is_inserted = 'Selected component is already inserted'; $lang->msg_component_is_first_order = 'Selected component is located at the first position'; $lang->msg_component_is_last_order = 'Selected component is located at the last position'; - $lang->msg_load_saved_doc = 'There is an automatically saved article. Do you wish to recover it?\nThe auto-saved draft will be discarded after saving current article'; + $lang->msg_load_saved_doc = "There is an automatically saved article. Do you wish to recover it?\nThe auto-saved draft will be discarded after saving current article"; $lang->msg_auto_saved = 'Automatically Saved'; $lang->cmd_disable = 'Inactive'; From 6a0024a47966904a6c3dff0de0480dbfe27bb570 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 07:24:53 +0000 Subject: [PATCH 80/82] =?UTF-8?q?message=20=EB=AA=A8=EB=93=88=EC=9D=98=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9C=84=EC=A0=AF=20=EC=8A=A4?= =?UTF-8?q?=ED=82=A8=20=EC=BB=AC=EB=9F=AC=EC=85=8B=20=EC=A0=9C=EB=8C=80?= =?UTF-8?q?=EB=A1=9C=20=EC=A7=80=EC=A0=95=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5233 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/message/skins/default/system_message.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/message/skins/default/system_message.html b/modules/message/skins/default/system_message.html index 441b4954d..8b0dd22c5 100644 --- a/modules/message/skins/default/system_message.html +++ b/modules/message/skins/default/system_message.html @@ -15,7 +15,7 @@
                - +
                From 215000738a3030e6736aa8cc9a4c4a800c5cc52a Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Jan 2009 07:29:12 +0000 Subject: [PATCH 81/82] =?UTF-8?q?XE=20=EC=84=A4=EC=B9=98=EC=8B=9C=EC=97=90?= =?UTF-8?q?=20message=20=EB=AA=A8=EB=93=88=EC=9D=98=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=AC=B8=EC=9D=B4=20=EB=9C=A8=EB=8D=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5234 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/install/install.controller.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index e4ccd1423..9899c324a 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -216,9 +216,16 @@ // 모듈을 category에 의거 설치 순서를 정함 $install_step = array('base','utility','manager','accessory','service','package'); + // module 모듈은 미리 설치 + $this->installModule('module','./modules/module'); + $oModule = &getClass('module'); + if($oModule->checkUpdate()) $oModule->moduleUpdate(); + + // 나머지 모든 모듈 설치 foreach($install_step as $category) { if(count($modules[$category])) { foreach($modules[$category] as $module) { + if($module == 'module') continue; $this->installModule($module, sprintf('./modules/%s', $module)); $oModule = &getClass($module); From dfe6c0f15d82bfbf5823591dc7452dbd5afc462b Mon Sep 17 00:00:00 2001 From: ngleader Date: Mon, 5 Jan 2009 07:38:16 +0000 Subject: [PATCH 82/82] version update 1.1.4 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5235 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.inc.php b/config/config.inc.php index 83e7b7fa7..2cdc0b252 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -14,7 +14,7 @@ * 이 내용은 XE의 버전을 관리자 페이지에 표시하기 위한 용도이며 * config.inc.php의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야 함 **/ - define('__ZBXE_VERSION__', '1.1.3'); + define('__ZBXE_VERSION__', '1.1.4'); /** * @brief 디버깅 메세지 출력
                {$lang->member_default_info}
                {$lang->user_id} - {$member_info->user_id} - - ({$lang->denied}) - -
                {$lang->user_name} {htmlspecialchars($member_info->user_name)}
                {$val->title} ({$val->module}){$val->title} ({$val->module}) {$lang->module_info}