diff --git a/objects/php-ico/README.md b/objects/chrisjean/php-ico/README.md similarity index 100% rename from objects/php-ico/README.md rename to objects/chrisjean/php-ico/README.md diff --git a/objects/php-ico/changelog b/objects/chrisjean/php-ico/changelog similarity index 100% rename from objects/php-ico/changelog rename to objects/chrisjean/php-ico/changelog diff --git a/objects/php-ico/class-php-ico.php b/objects/chrisjean/php-ico/class-php-ico.php similarity index 100% rename from objects/php-ico/class-php-ico.php rename to objects/chrisjean/php-ico/class-php-ico.php diff --git a/objects/php-ico/composer.json b/objects/chrisjean/php-ico/composer.json similarity index 100% rename from objects/php-ico/composer.json rename to objects/chrisjean/php-ico/composer.json diff --git a/objects/php-ico/license.txt b/objects/chrisjean/php-ico/license.txt similarity index 100% rename from objects/php-ico/license.txt rename to objects/chrisjean/php-ico/license.txt diff --git a/objects/configurationUpdate.json.php b/objects/configurationUpdate.json.php index 93e10a57b..57aae7ef5 100644 --- a/objects/configurationUpdate.json.php +++ b/objects/configurationUpdate.json.php @@ -1,112 +1,112 @@ setContactEmail($_POST['contactEmail']); $config->setLanguage($_POST['language']); $config->setWebSiteTitle($_POST['webSiteTitle']); $config->setAuthCanComment($_POST['authCanComment']); $config->setAuthCanUploadVideos($_POST['authCanUploadVideos']); $config->setAuthCanViewChart($_POST['authCanViewChart']); if (empty($global['disableAdvancedConfigurations'])) { $config->setDisable_analytics($_POST['disable_analytics']); $config->setDisable_youtubeupload($_POST['disable_youtubeupload']); $config->setAllow_download($_POST['allow_download']); $config->setSession_timeout($_POST['session_timeout']); $config->setEncoderURL($_POST['encoder_url']); $config->setSmtp($_POST['smtp']); $config->setSmtpAuth($_POST['smtpAuth']); $config->setSmtpSecure($_POST['smtpSecure']); $config->setSmtpHost($_POST['smtpHost']); $config->setSmtpUsername($_POST['smtpUsername']); $config->setSmtpPassword($_POST['smtpPassword']); $config->setSmtpPort($_POST['smtpPort']); } $config->setHead($_POST['head']); $config->setAdsense($_POST['adsense']); $config->setMode('Youtube'); $config->setAutoplay($_POST['autoplay']); $config->setTheme($_POST['theme']); $imagePath = "videos/userPhoto/"; //Check write Access to Directory if (!file_exists($global['systemRootPath'] . $imagePath)) { mkdir($global['systemRootPath'] . $imagePath, 0755, true); } if (!is_writable($global['systemRootPath'] . $imagePath)) { - $response = Array( + $response = array( "status" => 'error', "message" => 'No write Access' ); print json_encode($response); return; } $response = array(); if (!empty($_POST['logoImgBase64'])) { $fileData = base64DataToImage($_POST['logoImgBase64']); $fileName = 'logo.png'; $photoURL = $imagePath . $fileName; $bytes = file_put_contents($global['systemRootPath'] . $photoURL, $fileData); if ($bytes > 10) { $response = array( "status" => 'success', "url" => $global['systemRootPath'] . $photoURL ); $config->setLogo($photoURL); } else { $response = array( "status" => 'error', "msg" => 'We could not save logo', "url" => $global['systemRootPath'] . $photoURL ); } } if (!empty($_POST['faviconBase64'])) { $imagePath = "videos/"; $fileData = base64DataToImage($_POST['faviconBase64']); $fileName = 'favicon.png'; $photoURL = $imagePath . $fileName; $bytes = file_put_contents($global['systemRootPath'] . $photoURL, $fileData); if ($bytes > 10) { $response2 = array( "status" => 'success', "url" => $global['systemRootPath'] . $photoURL ); - require( $global['systemRootPath'] . 'objects/php-ico/class-php-ico.php' ); - + require $global['systemRootPath'] . 'objects/chrisjean/php-ico/class-php-ico.php'; + $sizes = array( array(16, 16), array(24, 24), array(32, 32), array(48, 48), - array(144, 144), + array(144, 144) ); $ico_lib = new PHP_ICO($global['systemRootPath'] . $photoURL, $sizes); $ico_lib->save_ico($global['systemRootPath'] . $imagePath.'favicon.ico'); } else { $response2 = array( "status" => 'error', "msg" => 'We could not save favicon', "url" => $global['systemRootPath'] . $photoURL ); } } echo '{"status":"' . $config->save() . '", "respnseLogo": ' . json_encode($response) . ', "respnseFavicon": ' . json_encode($response2) . '}';