Browse Source

Moving pretty_dump elsewhere

master
Sven Slootweg 10 years ago
parent
commit
bcf3095df8
  1. 19
      public_html/libgit/base.php
  2. 20
      public_html/libgit/class.repository.php

19
public_html/libgit/base.php

@ -1,4 +1,23 @@
<?php
function pretty_dump($input)
{
ob_start();
var_dump($input);
$output = ob_get_contents();
ob_end_clean();
while(preg_match("/^[ ]*[ ]/m", $output) == 1)
{
$output = preg_replace("/^([ ]*)[ ]/m", "$1&nbsp;&nbsp;&nbsp;", $output);
}
$output = nl2br($output);
echo($output);
}
require(dirname(__FILE__) . "/class.repository.php");
require(dirname(__FILE__) . "/class.object.php");
require(dirname(__FILE__) . "/class.commit.php");

20
public_html/libgit/class.repository.php

@ -1,24 +1,4 @@
<?php
function pretty_dump($input)
{
ob_start();
var_dump($input);
$output = ob_get_contents();
ob_end_clean();
while(preg_match("/^[ ]*[ ]/m", $output) == 1)
{
$output = preg_replace("/^([ ]*)[ ]/m", "$1&nbsp;&nbsp;&nbsp;", $output);
}
$output = nl2br($output);
echo($output);
}
class GitRepository
{
public $path = "";

Loading…
Cancel
Save