Permalink
Browse files

Removed unused anymore scripts

  • Loading branch information...
1 parent 6d78cb2 commit f6b4e2f5b59792ce32256dc47982f5bc3a7bd0fa @cdujeu cdujeu committed Oct 1, 2016
@@ -1,85 +0,0 @@
-<?php
-/**
- * Created by JetBrains PhpStorm.
- * User: Charles du Jeu
- * Date: 14/10/11
- * Time: 12:20
- * To change this template use File | Settings | File Templates.
- */
-define("CRT_PATH", realpath(dirname(__FILE__)));
-$requiredVersion = $_GET["version"];
-$requiredChannel = (isSet($_GET["channel"])?$_GET["channel"]:"stable");
-$basePackage = isSet($_GET["package"]) ? $_GET["package"] : "ajaxplorer-core";
-$hashMethod = "md5";
-
-function preparePackages($channel, $hashMethod, $basePackage)
-{
- $packages = glob(CRT_PATH."/".$channel."/*.zip");
- $sUrl = detectServerURL().dirname($_SERVER["REQUEST_URI"]);
- $zips = array();
- foreach ($packages as $package) {
- $name = basename($package);
- if (preg_match('/'.$basePackage.'-upgrade-([^-]*)-([^-]*)\.zip/', $name, $matches)) {
- $startV = $matches[1];
- $endV = $matches[2];
- $zips[$startV] = array($sUrl."/".$channel."/".$name, $startV, $endV, hash_file($hashMethod,$package));
- }
- }
- uksort($zips, "version_compare");
- return $zips;
-}
-
-function detectServerURL()
-{
- $protocol = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http' );
- $port = (( $protocol === 'http' && $_SERVER['SERVER_PORT'] == 80 || $protocol === 'https' && $_SERVER['SERVER_PORT'] == 443 ) ? "" : ":".$_SERVER['SERVER_PORT']);
- $name = $_SERVER["SERVER_NAME"];
- return "$protocol://$name$port";
-}
-
-
-$zips = preparePackages($requiredChannel, $hashMethod, $basePackage);
-$upgradePath = array();
-$hashes = array();
-$note = "";
-if (isSet($zips[$requiredVersion])) {
- $nextVersion = $requiredVersion;
- while (isSet($zips[$nextVersion])) {
- $pack = $zips[$nextVersion];
- $upgradePath[] = '"'.$pack[0].'"';
- $hashes[] = '"'.$pack[3].'"';
- $nextVersion = $pack[2];
- }
- if (isSet($pack)) {
- $zip = $pack[0];
- $sUrl = detectServerURL().dirname($_SERVER["REQUEST_URI"]);
- $notefile = CRT_PATH."/$requiredChannel/".str_replace(".zip", ".html", basename($zip));
- if (is_file($notefile)) {
- $note = str_replace(".zip", ".html", $zip);
- }
- }
-}
-
-$var_utmac='UA-XXXXX-Y'; //enter the new urchin code
-$var_utmhn='ajaxplorer.info'; //enter your domain
-$var_utmn=rand(1000000000,9999999999);//random request number
-$var_cookie=rand(10000000,99999999);//random cookie number
-$var_random=rand(1000000000,2147483647); //number under 2147483647
-$var_today=time(); //today
-$var_referer='';//$_SERVER['HTTP_REFERRER']; //referer url
-$var_uservar='-'; //enter your own user defined variable
-$var_utmp='/update/'.$requiredVersion.'/'.$_SERVER['REMOTE_ADDR']; //this example adds a fake page request to the (fake) rss directory (the viewer IP to check for absolute unique RSS readers)
-$urchinUrl='http://www.google-analytics.com/__utm.gif?utmwv=1&utmn='.$var_utmn.'&utmsr=-&utmsc=-&utmul=-&utmje=0&utmfl=-&utmdt=-&utmhn='.$var_utmhn.'&utmr='.$var_referer.'&utmp='.$var_utmp.'&utmac='.$var_utmac.'&utmcc=__utma%3D'.$var_cookie.'.'.$var_random.'.'.$var_today.'.'.$var_today.'.'.$var_today.'.2%3B%2B__utmb%3D'.$var_cookie.'%3B%2B__utmc%3D'.$var_cookie.'%3B%2B__utmz%3D'.$var_cookie.'.'.$var_today.'.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D'.$var_cookie.'.'.$var_uservar.'%3B';
-$handle = fopen ($urchinUrl, "r");
-$test = fgets($handle);
-fclose($handle);
-
-
-header("Content-type:application/json");
-if ($requiredChannel == "test") {
- $sUrl = detectServerURL().dirname($_SERVER["REQUEST_URI"]);
- $upgradePath = array('"'.$sUrl.'/test/'.$basePackage.'-upgrade-0.0.0-0.0.0.zip"');
- $hashes = array('"'.md5_file(CRT_PATH."/test/'.$basePackage.'-upgrade-0.0.0-0.0.0.zip").'"');
- $note = $sUrl."/test/'.$basePackage.'-upgrade-0.0.0-0.0.0.html";
-}
-print("{\"packages\":[".implode(",", $upgradePath)."],\"hashes\":[".implode(",", $hashes)."],\"hash_method\":\"md5\", \"latest_note\":\"".$note."\"}");
@@ -1,53 +0,0 @@
-<?php
-
-$summarizeLines = file($argv[1]);
-$srcDir = $argv[2];
-$patchDir = $argv[3];
-$toDelete = array();
-
-@mkdir ($patchDir);
-@mkdir ($patchDir."/UPGRADE");
-foreach ($summarizeLines as $line) {
- $line = trim($line);
- $letter = substr($line, 0, 1);
- $end = trim(substr($line, 1));
- if ($letter == "D") {
- $toDelete[] = $end;
- continue;
- }
- if (is_dir($srcDir."/".$end)) {
- if(!is_dir($patchDir."/".$end)) mkdir($patchDir."/".$end, 777, true);
- } else {
- if(!is_dir($patchDir."/".dirname($end))) mkdir($patchDir."/".dirname($end), 777, true);
- echo("\n-- Copy ".$srcDir."/".$end ." to ".$patchDir."/".$end);
- copy($srcDir."/".$end, $patchDir."/".$end);
- }
-}
-if (count($toDelete)) {
- file_put_contents($patchDir."/UPGRADE/CLEAN-FILES", implode("\r\n", str_replace("\\", "/", $toDelete)));
-}
-
-function copy_r( $path, $dest )
-{
- if ( is_dir($path) ) {
- @mkdir( $dest );
- $objects = scandir($path);
- if ( sizeof($objects) > 0 ) {
- foreach ($objects as $file) {
- if( $file == "." || $file == ".." )
- continue;
- // go on
- if ( is_dir( $path.DIRECTORY_SEPARATOR.$file ) ) {
- copy_r( $path.DIRECTORY_SEPARATOR.$file, $dest.DIRECTORY_SEPARATOR.$file );
- } else {
- copy( $path.DIRECTORY_SEPARATOR.$file, $dest.DIRECTORY_SEPARATOR.$file );
- }
- }
- }
- return true;
- } elseif ( is_file($path) ) {
- return copy($path, $dest);
- } else {
- return false;
- }
-}
@@ -1,41 +0,0 @@
-set src=ajaxplorer-src
-set log_file=..\logs\upgrade.txt
-set export=ajaxplorer-core-upgrade-%3-%4
-
-rem --- SVN Checkout sources and grab revision number %2
-chdir tmp
-svn co https://ajaxplorer.svn.sourceforge.net/svnroot/ajaxplorer/trunk/core/src %src% -r %2 > %log_file%
-
-chdir %src%
-svn diff --summarize -r%1:%2 > ..\svn_summarize
-
-chdir ..\
-php ..\bin\parse_summarize.php svn_summarize %src% %export%
-
-rem --- Create ZIP
-..\bin\7za.exe a %export%.zip %export% >> %log_file%
-
-rem --- Upload FTP
-echo off
-(
-echo open %FTP_SERVER%
-echo %FTP_LOGIN%
-echo %FTP_PASSWORD%
-echo cd www/update/stable
-echo type binary
-echo put %export%.zip
-echo close
-echo quit
-) > ftp_commands.txt
-ftp -s:ftp_commands.txt >> %log_file%
-
-rem --- Clear Variables and remove tmp folders
-del ftp_commands.txt
-del svn_summarize
-move %export%.zip ..\
-rmdir /S /Q %src%
-rmdir /S /Q %export%
-set src=
-set export=
-chdir ..
-
@@ -1,9 +0,0 @@
-Builder for AjaXplorer core under windows (tested on XP).
-Following Structure must be found
-
-+ EXECUTION FOLDER
- + bin
- + build.bat => the present script
- + 7za.exe => 7zip command line version
- + logs
- + tmp
@@ -1,45 +0,0 @@
-rem --- Compute date and folder
-for /f "tokens=1,2,3 delims=/ " %%a in ('DATE /T') do set date=%%c%%b%%a
-chdir tmp
-set src=ajaxplorer-sources
-set log_file=..\logs\%date%-build.txt
-
-rem --- SVN Checkout sources and grab current revision
-svn co https://ajaxplorer.svn.sourceforge.net/svnroot/ajaxplorer/trunk/core/src %src% > %log_file%
-chdir %src%
-for /f "tokens=*" %%a in ('svnversion') do set revision=%%a
-
-rem --- Export sources
-set export=ajaxplorer-%date%-%revision%
-svn export . ..\%export%
-
-
-rem --- Create ZIP
-chdir ..\
-..\bin\7za.exe a %export%.zip %export% >> %log_file%
-
-rem --- Upload FTP
-echo off
-(
-echo open %FTP_SERVER%
-echo %FTP_LOGIN%
-echo %FTP_PASSWORD%
-echo cd www/build
-echo type binary
-echo put %export%.zip
-echo close
-echo quit
-) > ftp_commands.txt
-ftp -s:ftp_commands.txt >> %log_file%
-
-rem --- Clear Variables and remove tmp folders
-del ftp_commands.txt
-del %export%.zip
-rmdir /S /Q %src%
-rmdir /S /Q %export%
-set src=
-set new=
-set revision=
-set export=
-chdir ..
-

0 comments on commit f6b4e2f

Please sign in to comment.