This commit is contained in:
ruben- 2014-04-18 19:25:29 +02:00
parent 2505c48c2f
commit af45d928a4
4 changed files with 18 additions and 25 deletions

View file

@ -494,26 +494,11 @@ class MainWPChild
if (isset($_GET['test']))
{
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
echo '<pre>';
$excludes = (isset($_POST['exclude']) ? explode(',', $_POST['exclude']) : array());
$excludes[] = str_replace(ABSPATH, '', WP_CONTENT_DIR) . '/uploads/mainwp';
$excludes[] = str_replace(ABSPATH, '', WP_CONTENT_DIR) . '/object-cache.php';
if (!ini_get('safe_mode')) set_time_limit(600);
$file_descriptors = 0;
$newExcludes = array();
foreach ($excludes as $exclude)
{
$newExcludes[] = rtrim($exclude, '/');
}
$res = MainWPBackup::get()->createFullBackup($newExcludes, '', false, false, $file_descriptors);
print_r($res);
die('</pre>');
// error_reporting(E_ALL);
// ini_set('display_errors', TRUE);
// ini_set('display_startup_errors', TRUE);
// echo '<pre>';
// die('</pre>');
}
//Register does not require auth, so we register here..
@ -3223,7 +3208,7 @@ class MainWPChild
MainWPChildBranding::Instance()->action();
}
public function code_snippet() {
public function code_snippet() {
$action = $_POST['action'];
$information = array('status' => 'FAIL');
if ($action === 'run_snippet' || $action === 'save_snippet') {
@ -3266,6 +3251,8 @@ class MainWPChild
}
function run_saved_snippets() {
if (!isset($_POST['action']))
return;
$action = $_POST['action'];
if ($action === "run_snippet" || $action === "save_snippet" || $action === "delete_snippet")
return; // do not run saved snippets if in do action snippet

View file

@ -130,7 +130,7 @@ class MainWPChildBranding
add_submenu_page( null, $this->settings['contact_support_label'], $this->settings['contact_support_label'] , 'read', "ContactSupport", array($this, "contact_support") );
add_action('admin_bar_menu', array($this, 'add_support_button'), 100);
}
add_filter('update_footer', array(&$this, 'update_footer'), 15);
add_filter('update_footer', array(&$this, 'update_footer'), 10);
}
public function send_support_mail()
@ -253,7 +253,7 @@ class MainWPChildBranding
return false;
}
function update_footer(){
function update_footer($text){
if (stripos($_SERVER['REQUEST_URI'], 'update-core.php') !== false && $this->is_branding())
{
?>
@ -264,6 +264,8 @@ class MainWPChildBranding
</script>
<?php
}
return $text;
}
public function branding_map_meta_cap($caps, $cap, $user_id, $args)