powered by nequal
Home » Ether_Suite » Timeline » 969

Diffs

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Ethna.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Ethna.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Smarty.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Smarty.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Timer.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Timer.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Log.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Log.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Config.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Config.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-EthnaClose.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-EthnaClose.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Info.png

表示できません: バイナリ形式としてマークされたファイルです。
svn:mime-type = image/png
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/images/ethna-debug-switch-Info.png
___________________________________________________________________
名前: svn:mime-type
+ image/png

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/css/ether.css

@@ -0,0 +1,179 @@
+
+.xdebug-var-dump {
+  background: #f0f0f0;
+  padding: 2px;
+  font-family: monospace;
+  line-height: 150%;
+}
+
+/* ethna debug style
+ */
+
+/*
+0 => string 'EMERG' (length=5)
+1 => string 'ALERT' (length=5)
+2 => string 'CRIT' (length=4)
+3 => string 'ERR' (length=3)
+4 => string 'WARNING' (length=7)
+5 => string 'NOTICE' (length=6)
+6 => string 'INFO' (length=4)
+7 => string 'DEBUG' (length=5)
+*/
+.ethna-debug-title ,
+.ethna-debug-subtitle {
+  font-family: "Trebuchet MS", Osaka;
+  font-size: 18px;
+  font-weight: bold;
+}
+
+#ethna-debug-switch-outline {
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  top: 0px;
+  right: 0px;
+  border-left: solid 2px #aaa;
+  border-bottom: solid 2px #aaa;
+}
+.ethna-debug-switch {
+  float:left;
+  margin: 0;
+  padding: 2px 10px;
+  height: 18px;
+  list-style:none;
+  background: #fff;
+  font-size: 12px;
+  z-index: 1000;
+  opacity: 0.6;
+}
+
+#ethna-debug-switch-Ethna {
+}
+#ethna-debug-switch-EthnaClose {
+  background: #fff url(../images/ethna-debug-switch-EthnaClose.png) 0px 4px no-repeat;
+  padding-left: 0;
+  width: 15px;
+  text-indent: -9999px;
+}
+#ethna-debug-switch-Ethna {
+  padding-left: 22px;
+  padding-right:0;
+  background: #fff url(../images/ethna-debug-switch-Ethna.png) 2px 4px no-repeat;
+}
+#ethna-debug-switch-Timer {
+  padding-left: 22px;
+  background: #fff url(../images/ethna-debug-switch-Timer.png) 2px 4px no-repeat;
+}
+#ethna-debug-switch-Log {
+  padding-left: 22px;
+  background: #fff url(../images/ethna-debug-switch-Log.png) 2px 4px no-repeat;
+}
+#ethna-debug-switch-Info {
+  padding-left: 22px;
+  background: #fff url(../images/ethna-debug-switch-Info.png) 2px 4px no-repeat;
+}
+#ethna-debug-switch-SmartyDebug {
+  padding-left: 22px;
+  background: #fff url(../images/ethna-debug-switch-Smarty.png) 2px 4px no-repeat;
+}
+#ethna-debug-switch-Config {
+  padding-left: 22px;
+  background: #fff url(../images/ethna-debug-switch-Config.png) 2px 4px no-repeat;
+}
+.ethna-debug {
+  font-family: arial;
+  position: absolute;
+  top: 0px;
+  width: 100%;
+  padding-top: 20px;
+  padding-bottom: 20px;
+  background: #ccc;
+  display:none;
+  font-size: 12px;
+}
+.ethna-debug div {
+  padding-left: 20px;
+}
+
+#ethna-debug-timewindow {
+}
+#ethna-debug-logwindow {
+}
+
+.ethna-debug-log {
+  margin: 0;
+  padding: 2px 10px;
+  color: #000;
+}
+
+.ethna-debug-log-EMERG {
+}
+.ethna-debug-log-ALERM {
+}
+.ethna-debug-log-CRIT {
+}
+.ethna-debug-log-ERR {
+  background: #ffaaaa;
+}
+.ethna-debug-log-WARNING {
+  background: #ffaaaa;
+}
+.ethna-debug-log-NOTICE {
+  background: #ffcccc;
+}
+.ethna-debug-log-INFO {
+  background: #ccccff;
+}
+.ethna-debug-log-DEBUG {
+  background: #ccc;
+}
+
+.ethna-debug-log-loglevel {
+  font-weight: bold;
+}
+
+.ethna-debug-log-loglevel-EMERG {
+  color: #f00;
+}
+.ethna-debug-log-loglevel-ALERM {
+  color: #f00;
+}
+.ethna-debug-log-loglevel-CRIT {
+  color: #f00;
+}
+.ethna-debug-log-loglevel-ERR {
+  color: #f00;
+}
+.ethna-debug-log-loglevel-WARNING {
+  color: #f00;
+}
+.ethna-debug-log-loglevel-NOTICE {
+  color: #f66;
+}
+.ethna-debug-log-loglevel-INFO {
+  color: #00f;
+}
+.ethna-debug-log-loglevel-DEBUG {
+}
+
+.ethna-debug-window {
+
+}
+
+.ethna-debug-table {
+  border-collapse: collapse;
+  border: solid 1px #333;
+}
+.ethna-debug-table th ,
+.ethna-debug-table td {
+  padding: 3px 5px;
+  border-collapse: collapse;
+  border: solid 1px #333;
+  font-size: 12px;
+}
+.ethna-debug-table th {
+  background: #9c9;
+}
+.ethna-debug-table td.e {
+  background: #aca;
+}
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/css
___________________________________________________________________
名前: svn:mergeinfo
+

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/js/ether.js

@@ -0,0 +1,101 @@
+/*
+$(function()
+{
+
+    var buttonOutline = document.createElement('ul');
+    $(buttonOutline).attr('id', 'ethna-debug-switch-outline');
+    $('html > body').append(buttonOutline);
+
+    var buttonEthna = document.createElement('li');
+    $(buttonEthna).attr('id', 'ethna-debug-switch-Ethna');
+    $(buttonEthna).attr('class', 'ethna-debug-switch');
+    $(buttonEthna).text("Ethna");
+    $(buttonOutline).append(buttonEthna);
+
+    var state = {};
+
+    $('.ethna-debug').each(function()
+    {
+        var name = $(this).children('div.ethna-debug-title').text();
+        //var stateName = ^
+
+        var showMessage = ' ' + name;
+        var hideMessage = ' ' + name;
+        state[name] = false;
+
+        var targetId = $(this).attr('id');
+        var buttonId = 'ethna-debug-switch-' + name;
+        var button = document.createElement('li');
+        $(button).attr('id', buttonId);
+        $(button).attr('class', 'ethna-debug-switch');
+        $(button).text(showMessage);
+
+        $(button).click(function()
+        {
+            $('.ethna-debug').each(function()
+            {
+                $(this).hide();
+                var local_name = $(this).children('div.ethna-debug-title').text();
+
+                if (name != local_name) {
+                    state[local_name] = false;
+                    $.cookie(local_name, 0);
+                }
+            });
+
+            if (!state[name]) {
+                $(this).text(hideMessage);
+                //$('#ethna-debug-logwindow').show();
+                $('#' + targetId).show();
+                $.cookie(name, 1);
+                state[name] = true;
+            }
+            else {
+                $(this).text(showMessage);
+                //$('#ethna-debug-logwindow').hide();
+                $('#' + targetId).hide();
+                $.cookie(name, 0);
+                state[name] = false;
+            }
+        });
+
+
+        $(button).hover(function()
+        {
+            $(this).css('cursor', 'pointer');
+        },
+        function()
+        {
+            $(this).css('cursor', 'default');
+        });
+
+        $(buttonOutline).append(button);
+
+        if ($.cookie(name) == 1) {
+            $('#' + targetId).show();
+            state[name] = true;
+        }
+
+        // log window coloring
+        if($('#' + targetId)
+            .is(":has('.ethna-debug-log-EMERG,.ethna-debug-log-ALERM,.ethna-debug-log-CRIT,.ethna-debug-log-ERR,.ethna-debug-log-WARNING,.ethna-debug-log-NOTICE')"))
+        {
+            $(button).css('background-color', "#f00")
+                .css('color', "#fff");
+        }
+    });
+
+
+    // close button
+    var closeButtonEthna = document.createElement('li');
+    $(closeButtonEthna).attr('id', 'ethna-debug-switch-EthnaClose');
+    $(closeButtonEthna).attr('class', 'ethna-debug-switch');
+    $(closeButtonEthna).text("close");
+    $(closeButtonEthna).click(function(e) {
+        $(buttonOutline).hide();
+        return false;
+    });
+    $(buttonOutline).append(closeButtonEthna);
+
+});
+*/

Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/js/jquery.cookie.js

@@ -0,0 +1,96 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ *       used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
+ *                             when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ *                        require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+    if (typeof value != 'undefined') { // name and value given, set cookie
+        options = options || {};
+        if (value === null) {
+            value = '';
+            options.expires = -1;
+        }
+        var expires = '';
+        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+            var date;
+            if (typeof options.expires == 'number') {
+                date = new Date();
+                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+            } else {
+                date = options.expires;
+            }
+            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        }
+        // CAUTION: Needed to parenthesize options.path and options.domain
+        // in the following expressions, otherwise they evaluate to undefined
+        // in the packed version for some reason...
+        var path = options.path ? '; path=' + (options.path) : '';
+        var domain = options.domain ? '; domain=' + (options.domain) : '';
+        var secure = options.secure ? '; secure' : '';
+        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+        var cookieValue = null;
+        if (document.cookie && document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i < cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+};
\ ファイルの末尾に改行がありません
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/js/jquery.cookie.js
___________________________________________________________________
名前: svn:executable
+ *
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar/js
___________________________________________________________________
名前: svn:mergeinfo
+
属性に変更があったパス: Ether_Suite/trunk/data/Ethna/extlib/www/Debugtoolbar
___________________________________________________________________
名前: svn:mergeinfo
+

Ether_Suite/trunk/Plugin/Filter/DebugToolbar.php

@@ -1,358 +0,0 @@
-<?php
-/**
- *  Ethna_Plugin_Filter_DebugToolbar.php
- *
- *  @author     Sotaro KARASAWA <sotaro.k@gmail.com>
- *  @package    Ether
- */
-
-/**
- *  DebugToolbar Plugin Filter
- *
- *  @description    DebugToolbar plugin standard set
- *  @author         Sotaro KARASAWA <sotaro.k@gmail.com>
- *  @access         public
- *  @package        Ethna_Plugin_Filter_DebugToolbar
- */
-class Ethna_Plugin_Filter_DebugToolbar extends Ethna_Plugin_Filter
-{
-    var $type_mapping = array(
-        VAR_TYPE_INT      => 'VAR_TYPE_INT',
-        VAR_TYPE_FLOAT    => 'VAR_TYPE_FLOAT',
-        VAR_TYPE_STRING   => 'VAR_TYPE_STRING',
-        VAR_TYPE_DATETIME => 'VAR_TYPE_DATETIME',
-        VAR_TYPE_BOOLEAN  => 'VAR_TYPE_BOOLEAN',
-        VAR_TYPE_FILE     => 'VAR_TYPE_FILE',
-    );
-
-    var $form_type_mapping = array(
-        FORM_TYPE_TEXT     => 'FORM_TYPE_TEXT',
-        FORM_TYPE_PASSWORD => 'FORM_TYPE_PASSWORD',
-        FORM_TYPE_TEXTAREA => 'FORM_TYPE_TEXTAREA',
-        FORM_TYPE_SELECT   => 'FORM_TYPE_SELECT',
-        FORM_TYPE_RADIO    => 'FORM_TYPE_RADIO',
-        FORM_TYPE_CHECKBOX => 'FORM_TYPE_CHECKBOX',
-        FORM_TYPE_SUBMIT   => 'FORM_TYPE_SUBMIT',
-        FORM_TYPE_FILE     => 'FORM_TYPE_FILE',
-        FORM_TYPE_BUTTON   => 'FORM_TYPE_BUTTON',
-        FORM_TYPE_HIDDEN   => 'FORM_TYPE_HIDDEN',
-    );
-
-    /**
-     *  filter which will be executed at the end.
-     *
-     *  @access public
-     */
-    function postFilter()
-    {
-        if (!$this->ctl->view->hasDefaultHeader) {
-            return null;
-        }
-
-        $this->init();
-        $this->dumpInfo();
-        $this->dumpConfig();
-        $this->dumpActionForm();
-        $this->smartyDebug();
-
-    }
-
-    function init()
-    {
-        $url = $this->config->get('url');
-        if (substr($url, -1) != '/') {
-            $url .= '/';
-        }
-        // jquery がロードされてるかどうか調べる
-        // なければ google.load
-        // めんどくせー常にloadでいい?
-
-        echo <<<EOL
-<link rel="stylesheet" href="{$url}DebugToolbar/css/ether.css" type="text/css" />
-<script type="text/javascript" src="http://www.google.com/jsapi"></script>
-<script type="text/javascript">
-    google.load("jquery", "1.2");
-</script>
-<script type="text/javascript" src="{$url}DebugToolbar/js/jquery.cookie.js"></script>
-EOL;
-
-        echo <<<EOL
-<script type="text/javascript">
-//jQuery.noConflict();
-jQuery(function()
-{
-
-    var buttonOutline = document.createElement('ul');
-    jQuery(buttonOutline).attr('id', 'ethna-debug-switch-outline');
-    jQuery('html > body').append(buttonOutline);
-
-    var buttonEthna = document.createElement('li');
-    jQuery(buttonEthna).attr('id', 'ethna-debug-switch-Ethna');
-    jQuery(buttonEthna).attr('class', 'ethna-debug-switch');
-    jQuery(buttonEthna).text("Ethna");
-    jQuery(buttonOutline).append(buttonEthna);
-
-    var state = {};
-
-    jQuery('.ethna-debug').each(function()
-    {
-        var name = jQuery(this).children('div.ethna-debug-title').text();
-        //var stateName = ^
-
-        var showMessage = ' ' + name;
-        var hideMessage = ' ' + name;
-        state[name] = false;
-
-        var targetId = jQuery(this).attr('id');
-        var buttonId = 'ethna-debug-switch-' + name;
-        var button = document.createElement('li');
-        jQuery(button).attr('id', buttonId);
-        jQuery(button).attr('class', 'ethna-debug-switch');
-        jQuery(button).text(showMessage);
-
-        jQuery(button).click(function()
-        {
-            jQuery('.ethna-debug').each(function()
-            {
-                jQuery(this).hide();
-                var local_name = jQuery(this).children('div.ethna-debug-title').text();
-
-                if (name != local_name) {
-                    state[local_name] = false;
-                    jQuery.cookie(local_name, 0);
-                }
-            });
-
-            if (!state[name]) {
-                jQuery(this).text(hideMessage);
-                //jQuery('#ethna-debug-logwindow').show();
-                jQuery('#' + targetId).show();
-                jQuery.cookie(name, 1);
-                state[name] = true;
-            }
-            else {
-                jQuery(this).text(showMessage);
-                //jQuery('#ethna-debug-logwindow').hide();
-                jQuery('#' + targetId).hide();
-                jQuery.cookie(name, 0);
-                state[name] = false;
-            }
-        });
-
-
-        jQuery(button).hover(function()
-        {
-            jQuery(this).css('cursor', 'pointer');
-        },
-        function()
-        {
-            jQuery(this).css('cursor', 'default');
-        });
-
-        jQuery(buttonOutline).append(button);
-
-        if (jQuery.cookie(name) == 1) {
-            jQuery('#' + targetId).show();
-            state[name] = true;
-        }
-
-        // log window coloring
-        if(jQuery('#' + targetId)
-            .is(":has('.ethna-debug-log-EMERG,.ethna-debug-log-ALERM,.ethna-debug-log-CRIT,.ethna-debug-log-ERR,.ethna-debug-log-WARNING,.ethna-debug-log-NOTICE')"))
-        {
-            jQuery(button).css('background-color', "#f00")
-                .css('color', "#fff");
-        }
-    });
-
-
-    // close button
-    var closeButtonEthna = document.createElement('li');
-    jQuery(closeButtonEthna).attr('id', 'ethna-debug-switch-EthnaClose');
-    jQuery(closeButtonEthna).attr('class', 'ethna-debug-switch');
-    jQuery(closeButtonEthna).text("close");
-    jQuery(closeButtonEthna).click(function(e) {
-        jQuery(buttonOutline).hide();
-        return false;
-    });
-    jQuery(buttonOutline).append(closeButtonEthna);
-
-});
-</script>
-EOL;
-        echo '<div class="ethna-debug" id="ethna-debug-evwindow">';
-        echo '<div class="ethna-debug-title">' . ETHNA_VERSION . '</div>';
-        echo "<div class=\"ethna-debug-log\">";
-        echo ETHNA_VERSION;
-        echo "</div> \n";
-        echo '</div>';
-    }
-
-    /**
-     * dump php info
-     *
-     * @access  public
-     */
-    function dumpInfo()
-    {
-        echo '<div class="ethna-debug" id="ethna-debug-infowindow">';
-        echo '<div class="ethna-debug-title">Info</div>';
-        echo "<div class=\"ethna-debug-log\">";
-
-        echo '<div class="ethna-debug-subtitle">PHPINFO</div>';
-        echo '<div class="ethna-debug-subtitle" id="ethna-debug-info-env-title"><a href="javascript:;">Environment &gt;&gt;</a></div>';
-        echo '<div id="ethna-debug-info-env" style="display:none;">';
-        echo $this->parsePHPInfo(INFO_ENVIRONMENT);
-        echo "</div> \n";
-
-        echo '<div class="ethna-debug-subtitle" id="ethna-debug-info-var-title"><a href="javascript:;">Variables &gt;&gt;</a></div>';
-        echo '<div id="ethna-debug-info-var" style="display:none;">';
-        echo $this->parsePHPInfo(INFO_VARIABLES);
-        echo "</div> \n";
-
-        echo '<div class="ethna-debug-subtitle" id="ethna-debug-info-modules-title"><a href="javascript:;">Installed Modules &gt;&gt;</a></div>';
-        echo '<div id="ethna-debug-info-modules" style="display:none;">';
-        echo $this->parsePHPInfo(INFO_MODULES);
-        //$this->dumpArray(get_loaded_extensions());
-        echo "</div> \n";
-
-        echo <<<EOF
-<script type="text/javascript">
-jQuery(function()
-{
-    jQuery("#ethna-debug-info-env-title a").click(function() {
-        jQuery("#ethna-debug-info-env").toggle();
-    });
-    jQuery("#ethna-debug-info-var-title a").click(function() {
-        jQuery("#ethna-debug-info-var").toggle();
-    });
-    jQuery("#ethna-debug-info-modules-title a").click(function() {
-        jQuery("#ethna-debug-info-modules").toggle();
-    });
-});
-</script>
-EOF;
-
-        echo "</div> \n";
-        echo '</div>';
-
-    }
-
-
-    function parsePHPInfo($info)
-    {
-        ob_start();
-        $phpinfo = phpinfo($info);
-        $info = ob_get_contents();
-        ob_end_clean();
-
-        $info_html = @simplexml_import_dom(DOMDOcument::loadHTML($info));
-        $body = $info_html->xpath("//body");
-        return preg_replace("/<table/", "<table class=\"ethna-debug-table ethna-debug-table-info\"", $body[0]->asXML());
-    }
-
-    /**
-     * dump action form defined values and posted values
-     *
-     * @access  public
-     */
-    function dumpActionForm()
-    {
-        echo '<div class="ethna-debug" id="ethna-debug-afwindow">';
-        echo '<div class="ethna-debug-title">ActionForm</div>';
-        echo '<div class="ethna-debug-subtitle">Posted Value</div>';
-        echo "<div class=\"ethna-debug-log\">";
-        //var_dump($this->controller->action_form->getArray());
-        self::dumpArray($this->controller->action_form->getArray());
-        echo "</div> \n";
-        echo '<div class="ethna-debug-subtitle">Definition</div>';
-        echo "<div class=\"ethna-debug-log\">";
-        //var_dump($this->controller->action_form->getArray());
-        self::dumpArray($this->controller->action_form->form);
-        echo "</div> \n";
-        echo '<div class="ethna-debug-subtitle">$_GET</div>';
-        echo "<div class=\"ethna-debug-log\">";
-        //var_dump($this->controller->action_form->getArray());
-        self::dumpArray($_GET);
-        echo "</div> \n";
-        echo '<div class="ethna-debug-subtitle">$_POST</div>';
-        echo "<div class=\"ethna-debug-log\">";
-        //var_dump($this->controller->action_form->getArray());
-        self::dumpArray($_POST);
-        echo "</div> \n";
-        echo '</div>';
-    }
-
-    function dumpConfig()
-    {
-        $config = $this->controller->getConfig();
-        echo '<div class="ethna-debug" id="ethna-debug-configwindow">';
-        echo '<div class="ethna-debug-title">Config</div>';
-        echo "<div class=\"ethna-debug-log\">";
-        //var_dump($this->controller->action_form->getArray());
-        self::dumpArray($config->config);
-        echo "</div> \n";
-        echo '</div>';
-    }
-
-    function smartyDebug()
-    {
-        require_once SMARTY_CORE_DIR . 'core.display_debug_console.php';
-
-        $c =& Ethna_Controller::getInstance();
-
-        // get template directory
-        $r =& $c->getRenderer();
-        $smarty =& $r->engine;
-
-        $smarty_original_debugging = $smarty->debugging;
-        $smarty_original_debugtpl = $smarty->debug_tpl;
-
-        $smarty->debugging = true;
-        $smarty->debug_tpl = $c->getDirectory('template') . "/smarty_debug.tpl";
-        $smarty->assign('_smarty_debug_output', 'html');
-
-        //var_dump($smarty);
-
-        echo '<div class="ethna-debug" id="ethna-debug-smartydebugwindow">';
-        echo '<div class="ethna-debug-title">SmartyDebug</div>';
-        echo "<div class=\"ethna-debug-log\">";
-
-        echo smarty_core_display_debug_console(array() , $smarty);
-
-        echo "</div> \n";
-        echo '</div>';
-
-        $smarty->debugging = $smarty_original_debugging;
-        $smarty->debug_tpl = $smarty_original_debugtpl;
-    }
-
-    function dumpArray(&$array)
-    {
-        echo "<table class=\"ethna-debug-table\">";
-        foreach ($array as $k => $v) {
-            echo "<tr>\n";
-            echo "<th>{$k}</th>";
-            if (is_array($v)) {
-                echo "<td>";
-                self::dumpArray($v);
-                echo "</td>";
-            }
-            else {
-                if (is_bool($v)) {
-                    echo "<td>" . ($v ? '<span style="color: #090;">true</span>' : '<span style="color: #900;">false</span>')  . "</td>";
-                }
-                else if ($k == 'type' or $k == 'form_type') {
-                    echo "<td>{$this->{$k . "_mapping"}[$v]}</td>";
-                }
-                else {
-                    echo "<td>{$v}</td>";
-                }
-            }
-            echo "</tr>\n";
-        }
-        echo "</table>\n";
-    }
-
-}
-?>

Ether_Suite/trunk/Plugin/Filter/Debugtoolbar.php

@@ -0,0 +1,358 @@
+<?php
+/**
+ *  Ethna_Plugin_Filter_DebugToolbar.php
+ *
+ *  @author     Sotaro KARASAWA <sotaro.k@gmail.com>
+ *  @package    Ether
+ */
+
+/**
+ *  DebugToolbar Plugin Filter
+ *
+ *  @description    DebugToolbar plugin standard set
+ *  @author         Sotaro KARASAWA <sotaro.k@gmail.com>
+ *  @access         public
+ *  @package        Ethna_Plugin_Filter_DebugToolbar
+ */
+class Ethna_Plugin_Filter_Debugtoolbar extends Ethna_Plugin_Filter
+{
+    var $type_mapping = array(
+        VAR_TYPE_INT      => 'VAR_TYPE_INT',
+        VAR_TYPE_FLOAT    => 'VAR_TYPE_FLOAT',
+        VAR_TYPE_STRING   => 'VAR_TYPE_STRING',
+        VAR_TYPE_DATETIME => 'VAR_TYPE_DATETIME',
+        VAR_TYPE_BOOLEAN  => 'VAR_TYPE_BOOLEAN',
+        VAR_TYPE_FILE     => 'VAR_TYPE_FILE',
+    );
+
+    var $form_type_mapping = array(
+        FORM_TYPE_TEXT     => 'FORM_TYPE_TEXT',
+        FORM_TYPE_PASSWORD => 'FORM_TYPE_PASSWORD',
+        FORM_TYPE_TEXTAREA => 'FORM_TYPE_TEXTAREA',
+        FORM_TYPE_SELECT   => 'FORM_TYPE_SELECT',
+        FORM_TYPE_RADIO    => 'FORM_TYPE_RADIO',
+        FORM_TYPE_CHECKBOX => 'FORM_TYPE_CHECKBOX',
+        FORM_TYPE_SUBMIT   => 'FORM_TYPE_SUBMIT',
+        FORM_TYPE_FILE     => 'FORM_TYPE_FILE',
+        FORM_TYPE_BUTTON   => 'FORM_TYPE_BUTTON',
+        FORM_TYPE_HIDDEN   => 'FORM_TYPE_HIDDEN',
+    );
+
+    /**
+     *  filter which will be executed at the end.
+     *
+     *  @access public
+     */
+    function postFilter()
+    {
+        if (!$this->ctl->view->hasDefaultHeader) {
+            return null;
+        }
+
+        $this->init();
+        $this->dumpInfo();
+        $this->dumpConfig();
+        $this->dumpActionForm();
+        $this->smartyDebug();
+
+    }
+
+    function init()
+    {
+        $url = $this->config->get('url');
+        if (substr($url, -1) != '/') {
+            $url .= '/';
+        }
+        // jquery がロードされてるかどうか調べる
+        // なければ google.load
+        // めんどくせー常にloadでいい?
+
+        echo <<<EOL
+<link rel="stylesheet" href="{$url}Debugtoolbar/css/ether.css" type="text/css" />
+<script type="text/javascript" src="http://www.google.com/jsapi"></script>
+<script type="text/javascript">
+    google.load("jquery", "1.2");
+</script>
+<script type="text/javascript" src="{$url}Debugtoolbar/js/jquery.cookie.js"></script>
+EOL;
+
+        echo <<<EOL
+<script type="text/javascript">
+//jQuery.noConflict();
+jQuery(function()
+{
+
+    var buttonOutline = document.createElement('ul');
+    jQuery(buttonOutline).attr('id', 'ethna-debug-switch-outline');
+    jQuery('html > body').append(buttonOutline);
+
+    var buttonEthna = document.createElement('li');
+    jQuery(buttonEthna).attr('id', 'ethna-debug-switch-Ethna');
+    jQuery(buttonEthna).attr('class', 'ethna-debug-switch');
+    jQuery(buttonEthna).text("Ethna");
+    jQuery(buttonOutline).append(buttonEthna);
+
+    var state = {};
+
+    jQuery('.ethna-debug').each(function()
+    {
+        var name = jQuery(this).children('div.ethna-debug-title').text();
+        //var stateName = ^
+
+        var showMessage = ' ' + name;
+        var hideMessage = ' ' + name;
+        state[name] = false;
+
+        var targetId = jQuery(this).attr('id');
+        var buttonId = 'ethna-debug-switch-' + name;
+        var button = document.createElement('li');
+        jQuery(button).attr('id', buttonId);
+        jQuery(button).attr('class', 'ethna-debug-switch');
+        jQuery(button).text(showMessage);
+
+        jQuery(button).click(function()
+        {
+            jQuery('.ethna-debug').each(function()
+            {
+                jQuery(this).hide();
+                var local_name = jQuery(this).children('div.ethna-debug-title').text();
+
+                if (name != local_name) {
+                    state[local_name] = false;
+                    jQuery.cookie(local_name, 0);
+                }
+            });
+
+            if (!state[name]) {
+                jQuery(this).text(hideMessage);
+                //jQuery('#ethna-debug-logwindow').show();
+                jQuery('#' + targetId).show();
+                jQuery.cookie(name, 1);
+                state[name] = true;
+            }
+            else {
+                jQuery(this).text(showMessage);
+                //jQuery('#ethna-debug-logwindow').hide();
+                jQuery('#' + targetId).hide();
+                jQuery.cookie(name, 0);
+                state[name] = false;
+            }
+        });
+
+
+        jQuery(button).hover(function()
+        {
+            jQuery(this).css('cursor', 'pointer');
+        },
+        function()
+        {
+            jQuery(this).css('cursor', 'default');
+        });
+
+        jQuery(buttonOutline).append(button);
+
+        if (jQuery.cookie(name) == 1) {
+            jQuery('#' + targetId).show();
+            state[name] = true;
+        }
+
+        // log window coloring
+        if(jQuery('#' + targetId)
+            .is(":has('.ethna-debug-log-EMERG,.ethna-debug-log-ALERM,.ethna-debug-log-CRIT,.ethna-debug-log-ERR,.ethna-debug-log-WARNING,.ethna-debug-log-NOTICE')"))
+        {
+            jQuery(button).css('background-color', "#f00")
+                .css('color', "#fff");
+        }
+    });
+
+
+    // close button
+    var closeButtonEthna = document.createElement('li');
+    jQuery(closeButtonEthna).attr('id', 'ethna-debug-switch-EthnaClose');
+    jQuery(closeButtonEthna).attr('class', 'ethna-debug-switch');
+    jQuery(closeButtonEthna).text("close");
+    jQuery(closeButtonEthna).click(function(e) {
+        jQuery(buttonOutline).hide();
+        return false;
+    });
+    jQuery(buttonOutline).append(closeButtonEthna);
+
+});
+</script>
+EOL;
+        echo '<div class="ethna-debug" id="ethna-debug-evwindow">';
+        echo '<div class="ethna-debug-title">' . ETHNA_VERSION . '</div>';
+        echo "<div class=\"ethna-debug-log\">";
+        echo ETHNA_VERSION;
+        echo "</div> \n";
+        echo '</div>';
+    }
+
+    /**
+     * dump php info
+     *
+     * @access  public
+     */
+    function dumpInfo()
+    {
+        echo '<div class="ethna-debug" id="ethna-debug-infowindow">';
+        echo '<div class="ethna-debug-title">Info</div>';
+        echo "<div class=\"ethna-debug-log\">";
+
+        echo '<div class="ethna-debug-subtitle">PHPINFO</div>';
+        echo '<div class="ethna-debug-subtitle" id="ethna-debug-info-env-title"><a href="javascript:;">Environment &gt;&gt;</a></div>';
+        echo '<div id="ethna-debug-info-env" style="display:none;">';
+        echo $this->parsePHPInfo(INFO_ENVIRONMENT);
+        echo "</div> \n";
+
+        echo '<div class="ethna-debug-subtitle" id="ethna-debug-info-var-title"><a href="javascript:;">Variables &gt;&gt;</a></div>';
+        echo '<div id="ethna-debug-info-var" style="display:none;">';
+        echo $this->parsePHPInfo(INFO_VARIABLES);
+        echo "</div> \n";
+
+        echo '<div class="ethna-debug-subtitle" id="ethna-debug-info-modules-title"><a href="javascript:;">Installed Modules &gt;&gt;</a></div>';
+        echo '<div id="ethna-debug-info-modules" style="display:none;">';
+        echo $this->parsePHPInfo(INFO_MODULES);
+        //$this->dumpArray(get_loaded_extensions());
+        echo "</div> \n";
+
+        echo <<<EOF
+<script type="text/javascript">
+jQuery(function()
+{
+    jQuery("#ethna-debug-info-env-title a").click(function() {
+        jQuery("#ethna-debug-info-env").toggle();
+    });
+    jQuery("#ethna-debug-info-var-title a").click(function() {
+        jQuery("#ethna-debug-info-var").toggle();
+    });
+    jQuery("#ethna-debug-info-modules-title a").click(function() {
+        jQuery("#ethna-debug-info-modules").toggle();
+    });
+});
+</script>
+EOF;
+
+        echo "</div> \n";
+        echo '</div>';
+
+    }
+
+
+    function parsePHPInfo($info)
+    {
+        ob_start();
+        $phpinfo = phpinfo($info);
+        $info = ob_get_contents();
+        ob_end_clean();
+
+        $info_html = @simplexml_import_dom(DOMDOcument::loadHTML($info));
+        $body = $info_html->xpath("//body");
+        return preg_replace("/<table/", "<table class=\"ethna-debug-table ethna-debug-table-info\"", $body[0]->asXML());
+    }
+
+    /**
+     * dump action form defined values and posted values
+     *
+     * @access  public
+     */
+    function dumpActionForm()
+    {
+        echo '<div class="ethna-debug" id="ethna-debug-afwindow">';
+        echo '<div class="ethna-debug-title">ActionForm</div>';
+        echo '<div class="ethna-debug-subtitle">Posted Value</div>';
+        echo "<div class=\"ethna-debug-log\">";
+        //var_dump($this->controller->action_form->getArray());
+        self::dumpArray($this->controller->action_form->getArray());
+        echo "</div> \n";
+        echo '<div class="ethna-debug-subtitle">Definition</div>';
+        echo "<div class=\"ethna-debug-log\">";
+        //var_dump($this->controller->action_form->getArray());
+        self::dumpArray($this->controller->action_form->form);
+        echo "</div> \n";
+        echo '<div class="ethna-debug-subtitle">$_GET</div>';
+        echo "<div class=\"ethna-debug-log\">";
+        //var_dump($this->controller->action_form->getArray());
+        self::dumpArray($_GET);
+        echo "</div> \n";
+        echo '<div class="ethna-debug-subtitle">$_POST</div>';
+        echo "<div class=\"ethna-debug-log\">";
+        //var_dump($this->controller->action_form->getArray());
+        self::dumpArray($_POST);
+        echo "</div> \n";
+        echo '</div>';
+    }
+
+    function dumpConfig()
+    {
+        $config = $this->controller->getConfig();
+        echo '<div class="ethna-debug" id="ethna-debug-configwindow">';
+        echo '<div class="ethna-debug-title">Config</div>';
+        echo "<div class=\"ethna-debug-log\">";
+        //var_dump($this->controller->action_form->getArray());
+        self::dumpArray($config->config);
+        echo "</div> \n";
+        echo '</div>';
+    }
+
+    function smartyDebug()
+    {
+        require_once SMARTY_CORE_DIR . 'core.display_debug_console.php';
+
+        $c =& Ethna_Controller::getInstance();
+
+        // get template directory
+        $r =& $c->getRenderer();
+        $smarty =& $r->engine;
+
+        $smarty_original_debugging = $smarty->debugging;
+        $smarty_original_debugtpl = $smarty->debug_tpl;
+
+        $smarty->debugging = true;
+        $smarty->debug_tpl = $c->getDirectory('template') . "/smarty_debug.tpl";
+        $smarty->assign('_smarty_debug_output', 'html');
+
+        //var_dump($smarty);
+
+        echo '<div class="ethna-debug" id="ethna-debug-smartydebugwindow">';
+        echo '<div class="ethna-debug-title">SmartyDebug</div>';
+        echo "<div class=\"ethna-debug-log\">";
+
+        echo smarty_core_display_debug_console(array() , $smarty);
+
+        echo "</div> \n";
+        echo '</div>';
+
+        $smarty->debugging = $smarty_original_debugging;
+        $smarty->debug_tpl = $smarty_original_debugtpl;
+    }
+
+    function dumpArray(&$array)
+    {
+        echo "<table class=\"ethna-debug-table\">";
+        foreach ($array as $k => $v) {
+            echo "<tr>\n";
+            echo "<th>{$k}</th>";
+            if (is_array($v)) {
+                echo "<td>";
+                self::dumpArray($v);
+                echo "</td>";
+            }
+            else {
+                if (is_bool($v)) {
+                    echo "<td>" . ($v ? '<span style="color: #090;">true</span>' : '<span style="color: #900;">false</span>')  . "</td>";
+                }
+                else if ($k == 'type' or $k == 'form_type') {
+                    echo "<td>{$this->{$k . "_mapping"}[$v]}</td>";
+                }
+                else {
+                    echo "<td>{$v}</td>";
+                }
+            }
+            echo "</tr>\n";
+        }
+        echo "</table>\n";
+    }
+
+}
+?>
属性に変更があったパス: Ether_Suite/trunk/Plugin/Filter/Debugtoolbar.php
___________________________________________________________________
名前: svn:mergeinfo
+

Ether_Suite/trunk/Plugin/Logwriter/DebugToolbar.php

@@ -1,148 +0,0 @@
-<?php
-/** Ethna_Plugin_Logwriter_DebugToolbar
- *
- * @author  Sotaro KARASAWA <sotaro.k@gmail.com>
- * @date    2008/12/01
- */
-
-
-class Ethna_Plugin_Logwriter_DebugToolbar extends Ethna_Plugin_Logwriter
-{
-    var $log_array = array();
-
-    /**
-     *  ログを出力する
-     *
-     *  @access public
-     *  @param  int     $level      ログレベル(LOG_DEBUG, LOG_NOTICE...)
-     *  @param  string  $message    ログメッセージ(+引数)
-     */
-    function log($level, $message)
-    {
-        $c =& Ethna_Controller::getInstance();
-
-        $prefix = $this->ident;
-        if (array_key_exists("pid", $this->option)) {
-            $prefix .= sprintf('[%d]', getmypid());
-        }
-        $pre_prefix = '<div class="ethna-debug-log ethna-debug-log-' . $this->_getLogLevelName($level) . '">';
-        $prefix .= sprintf($c->getGateway() != GATEWAY_WWW ? '(%s): ' : '(<span class="ethna-debug-log-loglevel ethna-debug-log-loglevel-' . $this->_getLogLevelName($level) . ' ">%s</span>): ',
-            $this->_getLogLevelName($level)
-        );
-        $post_prefix = '</div>';
-
-        if (array_key_exists("function", $this->option) ||
-            array_key_exists("pos", $this->option)) {
-            $tmp = "";
-            $bt = $this->_getBacktrace();
-            if ($bt && array_key_exists("function", $this->option) && $bt['function']) {
-                $tmp .= $bt['function'];
-            }
-            if ($bt && array_key_exists("pos", $this->option) && $bt['pos']) {
-                $tmp .= $tmp ? sprintf('(%s)', $bt['pos']) : $bt['pos'];
-            }
-            if ($tmp) {
-                $prefix .= $tmp . ": ";
-            }
-        }
-
-        $br = $c->getGateway() != GATEWAY_WWW ? "" : "<br />";
-
-        //var_dump($c);
-        $log_content = ($pre_prefix . $prefix . $message . $post_prefix . "\n");
-        $this->log_array[] = $log_content;
-        //var_dump($this);
-        //echo "hoge";
-
-        return $log_content;
-    }
-
-    function end()
-    {
-        $ctl = Ethna_Controller::getInstance();
-        if (!$ctl->view->hasDefaultHeader) {
-            return null;
-        }
-        echo '<div class="ethna-debug" id="ethna-debug-logwindow">';
-        echo '<div class="ethna-debug-title">Log</div>';
-        foreach ($this->log_array as $log) {
-            echo $log;
-        }
-        echo '</div>';
-    }
-
-    /**
-     *  ログ出力箇所の情報(関数名/ファイル名等)を取得する
-     *
-     *  @access private
-     *  @return array   ログ出力箇所の情報
-     */
-    function _getBacktrace()
-    {
-        $skip_method_list = array(
-            array('ethna', 'raise'),
-            array(null, 'raiseerror'),
-            array(null, 'handleerror'),
-            array('ethna_logger', null),
-            array('ethna_plugin_logwriter', null),
-            array('ethna_error', null),
-            array('ethna_apperror', null),
-            array('ethna_actionerror', null),
-            array('ethna_backend', 'log'),
-            array(null, 'ethna_error_handler'),
-            array(null, 'trigger_error'),
-            array('ether_plugin_logwriter', null), // この1行を足すためにメソッドまるごとコピーですよ・・・
-        );
-
-        if ($this->have_backtrace == false) {
-            return null;
-        }
-
-        $bt = debug_backtrace();
-        $i = 0;
-        while ($i < count($bt)) {
-            if (isset($bt[$i]['class']) == false) {
-                $bt[$i]['class'] = null;
-            }
-            $skip = false;
-
-            // メソッドスキップ処理
-            foreach ($skip_method_list as $method) {
-                $class = $function = true;
-                if ($method[0] != null) {
-                    $class = preg_match("/^$method[0]/i", $bt[$i]['class']);
-                }
-                if ($method[1] != null) {
-                    $function = preg_match("/^$method[1]/i", $bt[$i]['function']);
-                }
-                if ($class && $function) {
-                    $skip = true;
-                    break;
-                }
-            }
-
-            if ($skip) {
-                $i++;
-            } else {
-                break;
-            }
-        }
-
-
-        $c =& Ethna_Controller::getInstance();
-        $basedir = $c->getBasedir();
-
-        $function = sprintf("%s.%s", isset($bt[$i]['class']) ? $bt[$i]['class'] : 'global', $bt[$i]['function']);
-
-        $file = $bt[$i]['file'];
-        if (strncmp($file, $basedir, strlen($basedir)) == 0) {
-            $file = substr($file, strlen($basedir));
-        }
-        if (strncmp($file, ETHNA_BASE, strlen(ETHNA_BASE)) == 0) {
-            $file = preg_replace('#^/+#', '', substr($file, strlen(ETHNA_BASE)));
-        }
-        $line = $bt[$i]['line'];
-        return array('function' => $function, 'pos' => sprintf('%s:%s', $file, $line));
-    }
-}
-

Ether_Suite/trunk/Plugin/Logwriter/Debugtoolbar.php

@@ -0,0 +1,148 @@
+<?php
+/** Ethna_Plugin_Logwriter_DebugToolbar
+ *
+ * @author  Sotaro KARASAWA <sotaro.k@gmail.com>
+ * @date    2008/12/01
+ */
+
+
+class Ethna_Plugin_Logwriter_Debugtoolbar extends Ethna_Plugin_Logwriter
+{
+    var $log_array = array();
+
+    /**
+     *  ログを出力する
+     *
+     *  @access public
+     *  @param  int     $level      ログレベル(LOG_DEBUG, LOG_NOTICE...)
+     *  @param  string  $message    ログメッセージ(+引数)
+     */
+    function log($level, $message)
+    {
+        $c =& Ethna_Controller::getInstance();
+
+        $prefix = $this->ident;
+        if (array_key_exists("pid", $this->option)) {
+            $prefix .= sprintf('[%d]', getmypid());
+        }
+        $pre_prefix = '<div class="ethna-debug-log ethna-debug-log-' . $this->_getLogLevelName($level) . '">';
+        $prefix .= sprintf($c->getGateway() != GATEWAY_WWW ? '(%s): ' : '(<span class="ethna-debug-log-loglevel ethna-debug-log-loglevel-' . $this->_getLogLevelName($level) . ' ">%s</span>): ',
+            $this->_getLogLevelName($level)
+        );
+        $post_prefix = '</div>';
+
+        if (array_key_exists("function", $this->option) ||
+            array_key_exists("pos", $this->option)) {
+            $tmp = "";
+            $bt = $this->_getBacktrace();
+            if ($bt && array_key_exists("function", $this->option) && $bt['function']) {
+                $tmp .= $bt['function'];
+            }
+            if ($bt && array_key_exists("pos", $this->option) && $bt['pos']) {
+                $tmp .= $tmp ? sprintf('(%s)', $bt['pos']) : $bt['pos'];
+            }
+            if ($tmp) {
+                $prefix .= $tmp . ": ";
+            }
+        }
+
+        $br = $c->getGateway() != GATEWAY_WWW ? "" : "<br />";
+
+        //var_dump($c);
+        $log_content = ($pre_prefix . $prefix . $message . $post_prefix . "\n");
+        $this->log_array[] = $log_content;
+        //var_dump($this);
+        //echo "hoge";
+
+        return $log_content;
+    }
+
+    function end()
+    {
+        $ctl = Ethna_Controller::getInstance();
+        if (!$ctl->view->hasDefaultHeader) {
+            return null;
+        }
+        echo '<div class="ethna-debug" id="ethna-debug-logwindow">';
+        echo '<div class="ethna-debug-title">Log</div>';
+        foreach ($this->log_array as $log) {
+            echo $log;
+        }
+        echo '</div>';
+    }
+
+    /**
+     *  ログ出力箇所の情報(関数名/ファイル名等)を取得する
+     *
+     *  @access private
+     *  @return array   ログ出力箇所の情報
+     */
+    function _getBacktrace()
+    {
+        $skip_method_list = array(
+            array('ethna', 'raise'),
+            array(null, 'raiseerror'),
+            array(null, 'handleerror'),
+            array('ethna_logger', null),
+            array('ethna_plugin_logwriter', null),
+            array('ethna_error', null),
+            array('ethna_apperror', null),
+            array('ethna_actionerror', null),
+            array('ethna_backend', 'log'),
+            array(null, 'ethna_error_handler'),
+            array(null, 'trigger_error'),
+            array('ether_plugin_logwriter', null), // この1行を足すためにメソッドまるごとコピーですよ・・・
+        );
+
+        if ($this->have_backtrace == false) {
+            return null;
+        }
+
+        $bt = debug_backtrace();
+        $i = 0;
+        while ($i < count($bt)) {
+            if (isset($bt[$i]['class']) == false) {
+                $bt[$i]['class'] = null;
+            }
+            $skip = false;
+
+            // メソッドスキップ処理
+            foreach ($skip_method_list as $method) {
+                $class = $function = true;
+                if ($method[0] != null) {
+                    $class = preg_match("/^$method[0]/i", $bt[$i]['class']);
+                }
+                if ($method[1] != null) {
+                    $function = preg_match("/^$method[1]/i", $bt[$i]['function']);
+                }
+                if ($class && $function) {
+                    $skip = true;
+                    break;
+                }
+            }
+
+            if ($skip) {
+                $i++;
+            } else {
+                break;
+            }
+        }
+
+
+        $c =& Ethna_Controller::getInstance();
+        $basedir = $c->getBasedir();
+
+        $function = sprintf("%s.%s", isset($bt[$i]['class']) ? $bt[$i]['class'] : 'global', $bt[$i]['function']);
+
+        $file = $bt[$i]['file'];
+        if (strncmp($file, $basedir, strlen($basedir)) == 0) {
+            $file = substr($file, strlen($basedir));
+        }
+        if (strncmp($file, ETHNA_BASE, strlen(ETHNA_BASE)) == 0) {
+            $file = preg_replace('#^/+#', '', substr($file, strlen(ETHNA_BASE)));
+        }
+        $line = $bt[$i]['line'];
+        return array('function' => $function, 'pos' => sprintf('%s:%s', $file, $line));
+    }
+}
+
属性に変更があったパス: Ether_Suite/trunk/Plugin/Logwriter/Debugtoolbar.php
___________________________________________________________________
名前: svn:mergeinfo
+