A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4646
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Diff - Stikked
From Mammoth Meerkat, 13 Years ago, written in Diff-output.
This paste is a reply to Codemirror test from Gracious Treeshrew - view diff
Embed
  1. diff --git a/index.html b/index.html
  2. index c1d9156..7764744 100644
  3. --- a/index.html
  4. +++ b/index.html
  5. @@ -95,7 +95,8 @@ StringStream.prototype = {
  6.      <script>
  7.        var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  8.          lineNumbers: true,
  9. -        autoMatchBrackets: true
  10. +        autoMatchBrackets: true,
  11. +      onGutterClick: function(x){console.log(x);}
  12.        });
  13.      </script>
  14.    </body>
  15. diff --git a/lib/codemirror.js b/lib/codemirror.js
  16. index 04646a9..9a39cc7 100644
  17. --- a/lib/codemirror.js
  18. +++ b/lib/codemirror.js
  19. @@ -399,10 +399,16 @@ var CodeMirror = (function() {
  20.      }
  21.  
  22.      function onMouseDown(e) {
  23. -      var start = posFromMouse(e), last = start;
  24. +      var start = posFromMouse(e), last = start, target = e.target();
  25.        if (!start) return;
  26.        setCursor(start.line, start.ch, false);
  27.        if (e.button() != 1) return;
  28. +      if (target.parentNode == gutter) {
  29. +        if (options.onGutterClick)
  30. +          options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);
  31. +        return;
  32. +      }
  33. +
  34.        if (!focused) onFocus();
  35.  
  36.        e.stop();
  37. @@ -808,7 +814,7 @@ var CodeMirror = (function() {
  38.        for (var i = showingFrom; i < showingTo; ++i) {
  39.          var marker = lines[i].gutterMarker;
  40.          if (marker) html.push('<div class="' + marker.style + '">' + htmlEscape(marker.text) + '</div>');
  41. -        else html.push("<div>" + (options.lineNumbers ? i + 1 : "\u00a0") + "</div>");
  42. +        else html.push("<div>" + (options.lineNumbers ? i + options.firstLineNumber : "\u00a0") + "</div>");
  43.        }
  44.        gutter.style.display = "none"; // TODO test whether this actually helps
  45.        gutter.innerHTML = html.join("");
  46. @@ -1371,10 +1377,8 @@ var CodeMirror = (function() {
  47.          if (option == "parser") setParser(value);
  48.          else if (option === "lineNumbers") setLineNumbers(value);
  49.          else if (option === "gutter") setGutter(value);
  50. -        else if (option === "readOnly") options.readOnly = value;
  51. -        else if (option === "indentUnit") {options.indentUnit = indentUnit = value; setParser(options.parser);}
  52. -        else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;
  53. -        else throw new Error("Can't set option " + option);
  54. +        else if (option === "indentUnit") {options.indentUnit = value; setParser(options.parser);}
  55. +        else options[option] = value;
  56.        },
  57.        cursorCoords: cursorCoords,
  58.        undo: operation(undo),
  59. @@ -1402,7 +1406,8 @@ var CodeMirror = (function() {
  60.        replaceRange: operation(replaceRange),
  61.  
  62.        operation: function(f){return operation(f)();},
  63. -      refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}
  64. +      refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},
  65. +      getInputField: function(){return input;}
  66.      };
  67.      return instance;
  68.    }
  69. @@ -1420,6 +1425,7 @@ var CodeMirror = (function() {
  70.      readOnly: false,
  71.      onChange: null,
  72.      onCursorActivity: null,
  73. +    onGutterClick: null,
  74.      autoMatchBrackets: false,
  75.      workTime: 200,
  76.      workDelay: 300,
  77.