This commit is contained in:
ruben- 2014-08-07 21:51:24 +02:00
parent 76dc53e4dc
commit 1761d17fc1
2 changed files with 13 additions and 4 deletions

View file

@ -11,7 +11,7 @@ include_once(ABSPATH . '/wp-admin/includes/plugin.php');
class MainWPChild
{
private $version = '0.29.14';
private $version = '1.0.0';
private $update_version = '1.0';
private $callableFunctions = array(
@ -2168,21 +2168,30 @@ class MainWPChild
function scanDir($pDir, $pLvl)
{
$output = array();
// $output = '';
if (file_exists($pDir) && is_dir($pDir))
{
if ($pLvl == 0) return $output;
// if ($pLvl == 0) return '[]';
if ($files = @scandir($pDir))
{
// $first = true;
foreach ($files as $file)
{
if (($file == '.') || ($file == '..')) continue;
$newDir = $pDir . $file . DIRECTORY_SEPARATOR;
if (@is_dir($newDir))
{
$output[$file] = $this->scanDir($newDir, $pLvl - 1);
$output[$file] = $this->scanDir($newDir, $pLvl - 1, false);
// if (!$first) $output .= ',';
// else $output .= '{';
// $output .= '"'.$file.'":' . $this->scanDir($newDir, $pLvl - 1);
// $first = false;
}
}
// if ($first) $output .= '[]';
// else $output .= '}';
}
}
return $output;
@ -2258,7 +2267,7 @@ class MainWPChild
$outPost['comment_count'] = $post->comment_count;
$outPost['dts'] = strtotime($post->post_modified_gmt);
$usr = get_user_by('id', $post->post_author);
$outPost['author'] = $usr->user_nicename;
$outPost['author'] = !empty($usr) ? $usr->user_nicename : 'removed';
$categoryObjects = get_the_category($post->ID);
$categories = "";
foreach ($categoryObjects as $cat)

View file

@ -5,7 +5,7 @@
Description: Child Plugin for MainWP. The plugin is used so the installed blog can be securely managed remotely by your network. Plugin documentation and options can be found here http://docs.mainwp.com
Author: MainWP
Author URI: http://mainwp.com
Version: 0.29.14-beta
Version: 1.0.0-beta
*/
header('X-Frame-Options: ALLOWALL');
//header('X-Frame-Options: GOFORIT');