Compare commits
3 Commits
test_mem
...
tags/start
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fc2f51240 | ||
|
|
5ddee5efc0 | ||
|
|
f46176d6f2 |
1244
atwork/burst_billing/bin/BB_billing.pl
Executable file
282
atwork/burst_billing/bin/BB_main.pl
Executable file
@@ -0,0 +1,282 @@
|
||||
#!/usr/bin/perl -w
|
||||
#############################################################################
|
||||
# $Id: BB_main.pl,v 1.1.1.1 2000-10-23 20:08:03 kevin%perldap.org Exp $
|
||||
#
|
||||
# BB_main.pl
|
||||
#
|
||||
# This is the main control program for the Burst Billing process
|
||||
# It:
|
||||
# 1) Checks the directory setup and permissions.
|
||||
# 2) Archives the log file for the current project.
|
||||
# 3) Launches the Burst Billing program
|
||||
# 4) Runs the monitor program.
|
||||
#
|
||||
# I broke the burst billing and monitor programs out into seperate programs.
|
||||
# This is to handle the event where the burst billing program die's, aborts,
|
||||
# crashes, or whatever - so the main program can run the monitor program afterwards.
|
||||
# Yeah yeah, the main program might crash too, but what can I do...
|
||||
#
|
||||
# History:
|
||||
# Kevin J. McCarthy [10/17/2000] Original Coding
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
use strict;
|
||||
|
||||
BEGIN {require '../inc/BB_include.pl';}
|
||||
require "$INC_DIR/BB_lib.pl";
|
||||
|
||||
|
||||
##############
|
||||
# Begin Code #
|
||||
##############
|
||||
|
||||
&init_program();
|
||||
|
||||
&run_burst_billing();
|
||||
|
||||
&run_monitor();
|
||||
|
||||
&cleanup_program();
|
||||
|
||||
|
||||
|
||||
###################
|
||||
# Local Functions #
|
||||
###################
|
||||
|
||||
########################################
|
||||
# init_program
|
||||
#
|
||||
# Does program initializations, such as:
|
||||
# - Checking directory permissions
|
||||
# - Archiving the log file
|
||||
# - Opening the new log file
|
||||
########################################
|
||||
sub init_program
|
||||
{
|
||||
&check_if_running();
|
||||
|
||||
&check_directories();
|
||||
|
||||
&check_files();
|
||||
|
||||
&archive_log_file();
|
||||
|
||||
&open_log_file();
|
||||
|
||||
&write_log_file($START_STAMP, "BB_main.pl started");
|
||||
}
|
||||
|
||||
|
||||
##########################################################################
|
||||
# check_if_running
|
||||
#
|
||||
# Checks to see if another copy of the program is running. This is
|
||||
# indicated by the presence of the $IN_PROGRESS_FILE
|
||||
# If it is, the program aborts.
|
||||
#
|
||||
# If it isn't:
|
||||
# 1) The $IN_PROGRESS_FILE is created.
|
||||
# 2) An END routine which removes the $IN_PROGRESS_FILE is evaled. I need
|
||||
# to eval this AFTER the check for the file, otherwise I will remove
|
||||
# the $IN_PROGRESS_FILE for the other program!
|
||||
# Note that this function is not used for contention issues - I'm
|
||||
# fully of aware of the test-and-set race condition.
|
||||
##########################################################################
|
||||
sub check_if_running
|
||||
{
|
||||
my ($ip_fh);
|
||||
|
||||
if ( -f $IN_PROGRESS_FILE )
|
||||
{
|
||||
print STDERR "Another copy of BB_main.pl is currently running\n",
|
||||
"If this is not the case, please remove the ",
|
||||
"$IN_PROGRESS_FILE file and rerun the program.\n",
|
||||
"Aboring program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
|
||||
$ip_fh = new IO::File ">$IN_PROGRESS_FILE";
|
||||
$ip_fh->close();
|
||||
|
||||
eval 'END { &remove_running_file(); }';
|
||||
}
|
||||
|
||||
|
||||
################################################################
|
||||
# check_directories
|
||||
#
|
||||
# Basic sanity check, to make sure all the directories exist and
|
||||
# are writable by this process
|
||||
################################################################
|
||||
sub check_directories
|
||||
{
|
||||
my ($directory);
|
||||
|
||||
foreach $directory ( $BILLING_HOME, $REPORT_HOME, $LOG_DIR, $LOG_ARCHIVE_DIR,
|
||||
$RRD_DIR, $BIN_DIR, $INC_DIR )
|
||||
{
|
||||
if ( ! -d $directory )
|
||||
{
|
||||
print STDERR "ERROR: $directory is not a directory\n",
|
||||
"Aborting program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
}
|
||||
foreach $directory ( $BILLING_HOME, $REPORT_HOME, $LOG_DIR,
|
||||
$LOG_ARCHIVE_DIR )
|
||||
{
|
||||
if ( ! -w $directory )
|
||||
{
|
||||
print STDERR "ERROR: $directory is not writable\n",
|
||||
"Aborting program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
################################################################
|
||||
# check_files
|
||||
#
|
||||
# Basic sanity check, to make sure all the programs and files exist
|
||||
# before launching sub-process
|
||||
################################################################
|
||||
sub check_files
|
||||
{
|
||||
my ($file);
|
||||
|
||||
foreach $file ( $BURST_ACCOUNTS_FILE )
|
||||
{
|
||||
if ( ! -e $file )
|
||||
{
|
||||
print STDERR "ERROR: $file does not exist\n.",
|
||||
"Aborting program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
elsif ( ! -r $file )
|
||||
{
|
||||
print STDERR "ERROR: $file is not readable.\n",
|
||||
"Aborting program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
}
|
||||
|
||||
foreach $file ( $BILLING_MODULE, $MONITOR_MODULE )
|
||||
{
|
||||
if ( ! -e "$BIN_DIR/$file" )
|
||||
{
|
||||
print STDERR "ERROR: $BIN_DIR/$file does not exist.\n",
|
||||
"Aborting program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
if ( (! -r "$BIN_DIR/$file") || (! -x "$BIN_DIR/$file") )
|
||||
{
|
||||
print STDERR "ERROR: $BIN_DIR/$file is not runnable.\n",
|
||||
"Aborting program\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##############################################################
|
||||
# archive_log_file
|
||||
#
|
||||
# This copies the previous log file into the archive directory
|
||||
# and then cleans up the archive directory.
|
||||
##############################################################
|
||||
sub archive_log_file
|
||||
{
|
||||
if ( &archive_file($LOG_DIR, $LOG_FILE, $LOG_ARCHIVE_DIR, $LOG_FILE, 0) != $OKAY )
|
||||
{
|
||||
print STDERR "Error archiving log file\n";
|
||||
}
|
||||
|
||||
&purge_old_archives($LOG_ARCHIVE_DIR, $MAX_LOG_ARCHIVE_FILES, $LOG_FILE);
|
||||
}
|
||||
|
||||
|
||||
#####################################################################
|
||||
# run_boss_loader
|
||||
#
|
||||
# This function executes the burst_billing program
|
||||
# programs, checks the return codes, and handles errors.
|
||||
#####################################################################
|
||||
sub run_burst_billing
|
||||
{
|
||||
my ($retcode);
|
||||
|
||||
&write_log_file($LOG_INFO, "BB_main.pl starting to run $BILLING_MODULE");
|
||||
&close_log_file();
|
||||
|
||||
$retcode = system("$BIN_DIR/$BILLING_MODULE");
|
||||
$retcode >>= 8;
|
||||
|
||||
&open_log_file();
|
||||
&write_log_file($LOG_INFO, "$BILLING_MODULE returned exit code $retcode");
|
||||
|
||||
if ( ($retcode != $OKAY) &&
|
||||
($retcode != $ERROR_WARNING) )
|
||||
{
|
||||
&write_log_file($LOG_ERROR, "$BILLING_MODULE had some sort of error");
|
||||
}
|
||||
|
||||
return($retcode);
|
||||
}
|
||||
|
||||
|
||||
#########################################################################
|
||||
# run_monitor
|
||||
#
|
||||
# Runs the monitor module.
|
||||
#########################################################################
|
||||
sub run_monitor
|
||||
{
|
||||
my ($retcode);
|
||||
|
||||
&write_log_file($LOG_INFO, "BB_main.pl starting to run $MONITOR_MODULE");
|
||||
&close_log_file();
|
||||
|
||||
$retcode = system("$BIN_DIR/$MONITOR_MODULE");
|
||||
$retcode >>= 8;
|
||||
|
||||
&open_log_file();
|
||||
&write_log_file($LOG_INFO, "$MONITOR_MODULE returned exit code $retcode");
|
||||
|
||||
if ( ($retcode != $OKAY) &&
|
||||
($retcode != $ERROR_WARNING) )
|
||||
{
|
||||
&write_log_file($LOG_ERROR, "$MONITOR_MODULE had some sort of error");
|
||||
}
|
||||
|
||||
return($retcode);
|
||||
}
|
||||
|
||||
|
||||
#####################################################
|
||||
# cleanup_program
|
||||
#
|
||||
# Perform final cleanup before the program terminates
|
||||
#####################################################
|
||||
sub cleanup_program
|
||||
{
|
||||
&write_log_file($END_STAMP, "BOSS_main.pl ended");
|
||||
|
||||
&close_log_file();
|
||||
}
|
||||
|
||||
|
||||
##########################################################################
|
||||
# remove_running_file
|
||||
#
|
||||
# Removes the $IN_PROGRESS_FILE, just before the program exits. Note that
|
||||
# this function is called by the END{} routine, which runs just as the
|
||||
# perl interpreter exits. In this way, I don't have to worry about
|
||||
# something die()ing and not cleaning up this file.
|
||||
##########################################################################
|
||||
sub remove_running_file
|
||||
{
|
||||
unlink $IN_PROGRESS_FILE;
|
||||
}
|
||||
161
atwork/burst_billing/bin/BB_monitor.pl
Executable file
@@ -0,0 +1,161 @@
|
||||
#!/usr/bin/perl
|
||||
#############################################################################
|
||||
# $Id: BB_monitor.pl,v 1.1.1.1 2000-10-23 20:08:03 kevin%perldap.org Exp $
|
||||
#
|
||||
# BB_monitor.pl
|
||||
#
|
||||
# History:
|
||||
# Kevin J. McCarthy [10/17/2000] Original Coding
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
#
|
||||
# Not using strict so I can play namespace games
|
||||
# Not using warnings because the Mail and Net modules suck.
|
||||
#
|
||||
|
||||
use IO::File;
|
||||
#
|
||||
# I'm not using Mail::Send becuase the current implementation has a bug
|
||||
# with multiple recipients - sent a patch to Graham.
|
||||
#
|
||||
use Mail::Mailer;
|
||||
#
|
||||
# Have to 'use' this here so I can overwrite the
|
||||
# $Net::SMTP::NetConfig{'smtp_hosts'} = [$MAIL_HOST];
|
||||
#
|
||||
use Net::SMTP;
|
||||
|
||||
BEGIN {require '../inc/BB_include.pl';}
|
||||
require "$INC_DIR/BB_lib.pl";
|
||||
|
||||
|
||||
###########
|
||||
# Globals #
|
||||
###########
|
||||
my $errors = 0;
|
||||
my $warnings = 0;
|
||||
|
||||
|
||||
##############
|
||||
# Begin Code #
|
||||
##############
|
||||
|
||||
&init_program();
|
||||
|
||||
&scan_log_file();
|
||||
|
||||
# if ( $errors || $warnings )
|
||||
&send_email();
|
||||
|
||||
exit($OKAY);
|
||||
|
||||
|
||||
###################
|
||||
# Local Functions #
|
||||
###################
|
||||
|
||||
|
||||
#####################################################################
|
||||
# init_program
|
||||
#
|
||||
# Sets the smtp server to use and the mail from address.
|
||||
# Closes STDOUT and STDERR to prevent junk messages from STMP modules
|
||||
#####################################################################
|
||||
sub init_program
|
||||
{
|
||||
#
|
||||
# Set the SMTP server to use.
|
||||
# This is cheating, but it works.
|
||||
#
|
||||
$Net::SMTP::NetConfig{'smtp_hosts'} = $MAIL_HOSTS;
|
||||
|
||||
#
|
||||
# Set the from address
|
||||
#
|
||||
$ENV{'MAILADDRESS'} = $MAIL_FROM;
|
||||
|
||||
#
|
||||
# Unfortunately, the SMTP modules are noisy in the case of errors.
|
||||
#
|
||||
close(STDOUT);
|
||||
close(STDERR);
|
||||
}
|
||||
|
||||
|
||||
###########################################################
|
||||
# scan_log_file
|
||||
#
|
||||
# Records the number of errors and warnings in the log file
|
||||
###########################################################
|
||||
sub scan_log_file
|
||||
{
|
||||
my ($log_fh, $log_line);
|
||||
|
||||
$log_fh = new IO::File "<$LOG_DIR/$LOG_FILE";
|
||||
return if ( ! $log_fh );
|
||||
|
||||
while ( defined($log_line = <$log_fh>) )
|
||||
{
|
||||
$errors++ if ( $log_line =~ /^\s*$LOG_ERROR/o );
|
||||
$warnings++ if ( $log_line =~ /^\s*$LOG_WARNING/o );
|
||||
}
|
||||
|
||||
$log_fh->close();
|
||||
}
|
||||
|
||||
|
||||
#############################
|
||||
# send_email
|
||||
#
|
||||
# Sends out the summary email
|
||||
#############################
|
||||
sub send_email
|
||||
{
|
||||
my ($mailer, $timestamp);
|
||||
my ($log_fh, $log_line);
|
||||
|
||||
$timestamp = &get_time_stamp();
|
||||
|
||||
$mailer = new Mail::Mailer('smtp');
|
||||
if ( ! $mailer )
|
||||
{
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
|
||||
eval {$mailer->open({
|
||||
'To' => $ERROR_MAIL_TO,
|
||||
'Subject' => "Burst Billing summary for $timestamp",
|
||||
});
|
||||
};
|
||||
if ( $@ )
|
||||
{
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
|
||||
print $mailer "Burst Billing summary for $timestamp\n\n";
|
||||
print $mailer "ERRORS: $errors\n";
|
||||
print $mailer "WARNINGS: $warnings\n";
|
||||
|
||||
print $mailer "Contents of log file:\n\n";
|
||||
|
||||
$log_fh = new IO::File "<$LOG_DIR/$LOG_FILE";
|
||||
if ( $log_fh )
|
||||
{
|
||||
while ( defined($log_line = <$log_fh>) )
|
||||
{
|
||||
if ( ($log_line =~ /^\s*$START_STAMP/o) ||
|
||||
($log_line =~ /^\s*$END_STAMP/o) ||
|
||||
($log_line =~ /^\s*$LOG_INFO/o) ||
|
||||
($log_line =~ /^\s*$LOG_WARNING/o) ||
|
||||
($log_line =~ /^\s*$LOG_ERROR/o) ||
|
||||
($log_line eq "\n") )
|
||||
{
|
||||
print $mailer $log_line;
|
||||
}
|
||||
}
|
||||
$log_fh->close();
|
||||
}
|
||||
|
||||
$mailer->close();
|
||||
}
|
||||
188
atwork/burst_billing/inc/BB_include.pl
Normal file
@@ -0,0 +1,188 @@
|
||||
#!/usr/bin/perl -w
|
||||
###########################################################################
|
||||
# $Id: BB_include.pl,v 1.1.1.1 2000-10-23 20:08:18 kevin%perldap.org Exp $
|
||||
#
|
||||
# BB_include.pl
|
||||
#
|
||||
# This include file contains global variables used across programs.
|
||||
#
|
||||
# History:
|
||||
# Kevin J. McCarthy [10/17/2000] Original Coding
|
||||
###########################################################################
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
######################################################################
|
||||
# Set this variable to 1 only if the failsafe triggers, to temporarily
|
||||
# override it.
|
||||
# TODO: command line switch to over-ride.
|
||||
######################################################################
|
||||
use vars qw{$FAILSAFE_OVERRIDE};
|
||||
$FAILSAFE_OVERRIDE = 0;
|
||||
# $FAILSAFE_OVERRIDE = 1;
|
||||
|
||||
#####################################################################
|
||||
# This controls the maximum number of days we will attempt to recover
|
||||
# data for.
|
||||
#####################################################################
|
||||
use vars qw($MAX_RECOVER_DAYS);
|
||||
$MAX_RECOVER_DAYS = 500;
|
||||
|
||||
|
||||
###############
|
||||
# Directories #
|
||||
###############
|
||||
use vars qw{$BILLING_HOME $RRD_DIR $REPORT_HOME $LOG_DIR $LOG_ARCHIVE_DIR
|
||||
$BIN_DIR $INC_DIR};
|
||||
|
||||
#$BILLING_HOME = "/usr/local/root/apache/cgi-bin/Burstable";
|
||||
$BILLING_HOME = "/home/kevinmc/excite/burst_billing/code";
|
||||
|
||||
$RRD_DIR = "/usr/local/nme/polling/www";
|
||||
|
||||
$REPORT_HOME = "$BILLING_HOME/data";
|
||||
|
||||
$LOG_DIR = "$BILLING_HOME/log";
|
||||
$LOG_ARCHIVE_DIR = "$LOG_DIR/archive";
|
||||
|
||||
$BIN_DIR = "$BILLING_HOME/bin";
|
||||
|
||||
$INC_DIR = "$BILLING_HOME/inc";
|
||||
|
||||
|
||||
##############
|
||||
# File Names #
|
||||
##############
|
||||
use vars qw{$BURST_ACCOUNTS_FILE $LOG_FILE $LAST_RUN_FILE $IN_DATA_FILE $OUT_DATA_FILE
|
||||
$CIRCUIT_HEADER_FILE $IN_PROGRESS_FILE $REPORT_FILE};
|
||||
$BURST_ACCOUNTS_FILE = "$INC_DIR/burst_accounts.txt";
|
||||
|
||||
$LOG_FILE = "log";
|
||||
|
||||
$LAST_RUN_FILE = "lastrun.txt";
|
||||
|
||||
#
|
||||
# Network data is dumped to these files
|
||||
#
|
||||
$IN_DATA_FILE = "in.log";
|
||||
$OUT_DATA_FILE = "out.log";
|
||||
|
||||
#
|
||||
# This contains information about the circuit
|
||||
#
|
||||
$CIRCUIT_HEADER_FILE = "header.txt";
|
||||
|
||||
#
|
||||
# This file is used to mark when this program is running. We don't
|
||||
# want to allow to loads to take place at the same time
|
||||
#
|
||||
$IN_PROGRESS_FILE = "$BILLING_HOME/.running";
|
||||
|
||||
#
|
||||
# The monthly 95/5 report
|
||||
#
|
||||
$REPORT_FILE = "95_5_report.xls";
|
||||
|
||||
|
||||
############
|
||||
# Programs #
|
||||
############
|
||||
use vars qw{$BILLING_MODULE $MONITOR_MODULE};
|
||||
$BILLING_MODULE = "BB_billing.pl";
|
||||
$MONITOR_MODULE = "BB_monitor.pl";
|
||||
|
||||
|
||||
##################
|
||||
# Log File Codes #
|
||||
##################
|
||||
use vars qw{$START_STAMP $END_STAMP $LOG_NOTE $LOG_INFO $LOG_WARNING
|
||||
$LOG_ERROR};
|
||||
$START_STAMP = "START_STAMP";
|
||||
$END_STAMP = "END_STAMP";
|
||||
$LOG_NOTE = "NOTE";
|
||||
#
|
||||
# Info error messages get included in the monitor email. Note messages don't
|
||||
#
|
||||
$LOG_INFO = "INFO";
|
||||
$LOG_WARNING = "WARNING";
|
||||
$LOG_ERROR = "ERROR";
|
||||
|
||||
|
||||
#################################################
|
||||
# Number of archives to keep for each directory #
|
||||
#################################################
|
||||
use vars qw{$MAX_LOG_ARCHIVE_FILES};
|
||||
$MAX_LOG_ARCHIVE_FILES = 10000;
|
||||
|
||||
|
||||
###############
|
||||
# Error Codes #
|
||||
###############
|
||||
use vars qw{$OKAY $ERROR_WARNING $ERROR_CRITICAL};
|
||||
$OKAY = 0;
|
||||
$ERROR_WARNING = 1;
|
||||
$ERROR_CRITICAL = 2;
|
||||
|
||||
|
||||
#################
|
||||
# Email Setting #
|
||||
#################
|
||||
use vars qw{$MAIL_HOSTS $MAIL_FROM $ERROR_MAIL_TO $REPORT_MAIL_TO};
|
||||
$MAIL_HOSTS = ['localhost',
|
||||
'mail.excitehome.net'];
|
||||
$MAIL_FROM = 'burstbilling@excitehome.net';
|
||||
$ERROR_MAIL_TO = ['mccarthy@excitehome.net',
|
||||
'tunacat@yahoo.com',
|
||||
# 'michael@excitehome.net',
|
||||
];
|
||||
|
||||
# $REPORT_MAIL_TO = 'burstbilling@excitehome.net';
|
||||
$REPORT_MAIL_TO = 'mccarthy@excitehome.net';
|
||||
|
||||
|
||||
#####################
|
||||
# Data Error Checking
|
||||
#####################
|
||||
use vars qw{$MAX_ZERO_DATA_PERCENT $MAX_NAN_DATA_PERCENT $MIN_RRD_STEP_SIZE};
|
||||
#
|
||||
# Maximum percentage of 0's to put up with in the data before I log an error
|
||||
# Use values from 0 - 100
|
||||
#
|
||||
$MAX_ZERO_DATA_PERCENT = 50;
|
||||
|
||||
#
|
||||
# Maximum percentage of NaN's to put up with in the data before I log an error
|
||||
# Use values from 0 - 100
|
||||
#
|
||||
$MAX_NAN_DATA_PERCENT = 0;
|
||||
|
||||
#
|
||||
# This is the smallest step size returned by the RRDs - equal to a 5 minute
|
||||
# granularity.
|
||||
#
|
||||
$MIN_RRD_STEP_SIZE = 300;
|
||||
|
||||
|
||||
###############################
|
||||
# Monitor Time List Hash Keys #
|
||||
###############################
|
||||
use vars qw{$MTL_START_EPOCH $MTL_END_EPOCH $MTL_FIRST_OF_MONTH
|
||||
$MTL_YEAR $MTL_MONTH $MTL_MDAY};
|
||||
$MTL_START_EPOCH = 'MTL_START_EPOCH';
|
||||
$MTL_END_EPOCH = 'MTL_END_EPOCH';
|
||||
$MTL_FIRST_OF_MONTH = 'MTL_FIRST_OF_MONTH';
|
||||
$MTL_YEAR = 'MTL_YEAR';
|
||||
$MTL_MONTH = 'MTL_MONTH';
|
||||
$MTL_MDAY = 'MTL_MDAY';
|
||||
|
||||
|
||||
###########################
|
||||
# Circuit Entry Hash Keys #
|
||||
###########################
|
||||
use vars qw{$CIRCUIT_COMPANY_NAME $CIRCUIT_IP_ADDRESS
|
||||
$CIRCUIT_PORT_NAME $CIRCUIT_ID};
|
||||
$CIRCUIT_COMPANY_NAME = 'CIRCUIT_COMPANY_NAME';
|
||||
$CIRCUIT_IP_ADDRESS = 'CIRCUIT_IP_ADDRESS';
|
||||
$CIRCUIT_PORT_NAME = 'CIRCUIT_PORT_NAME';
|
||||
$CIRCUIT_ID = 'CIRCUIT_ID';
|
||||
213
atwork/burst_billing/inc/BB_lib.pl
Normal file
@@ -0,0 +1,213 @@
|
||||
#!/usr/bin/perl -w
|
||||
#####################################################################
|
||||
# $Id: BB_lib.pl,v 1.1.1.1 2000-10-23 20:08:17 kevin%perldap.org Exp $
|
||||
#
|
||||
# BB_lib.pl
|
||||
#
|
||||
# This file contains functions shared amongst the programs
|
||||
#
|
||||
# History:
|
||||
# Kevin J. McCarthy [10/17/2000] Original Coding
|
||||
#####################################################################
|
||||
|
||||
use strict;
|
||||
|
||||
use DirHandle;
|
||||
use IO::File;
|
||||
use File::Copy;
|
||||
|
||||
BEGIN {require '../inc/BB_include.pl';}
|
||||
|
||||
|
||||
###########
|
||||
# Globals #
|
||||
###########
|
||||
my $LOG_FH;
|
||||
|
||||
|
||||
##################################################################
|
||||
# get_time_stamp
|
||||
#
|
||||
# This returns the current timestamp, in the logfile format.
|
||||
##################################################################
|
||||
sub get_time_stamp
|
||||
{
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
|
||||
|
||||
$mon += 1;
|
||||
$year += 1900;
|
||||
|
||||
$mon = "0" . $mon if ( $mon < 10 );
|
||||
$mday = "0" . $mday if ( $mday < 10 );
|
||||
$hour = "0" . $hour if ( $hour < 10 );
|
||||
$min = "0" . $min if ( $min < 10 );
|
||||
$sec = "0" . $sec if ( $sec < 10 );
|
||||
|
||||
return "$year$mon$mday-$hour$min$sec";
|
||||
}
|
||||
|
||||
|
||||
######################################################
|
||||
# get_file_timestamp
|
||||
#
|
||||
# This returns the 'modification' timestamp of a file,
|
||||
# used for file archving.
|
||||
######################################################
|
||||
sub get_file_timestamp
|
||||
{
|
||||
my ($filename) = @_;
|
||||
|
||||
my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size);
|
||||
my ($atime, $mtime, $ctime, $blksize, $blocks);
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst);
|
||||
|
||||
($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
|
||||
$atime, $mtime, $ctime, $blksize, $blocks) = stat $filename;
|
||||
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($mtime);
|
||||
|
||||
$mon += 1;
|
||||
$year += 1900;
|
||||
|
||||
$mon = "0" . $mon if ( $mon < 10 );
|
||||
$mday = "0" . $mday if ( $mday < 10 );
|
||||
$hour = "0" . $hour if ( $hour < 10 );
|
||||
$min = "0" . $min if ( $min < 10 );
|
||||
$sec = "0" . $sec if ( $sec < 10 );
|
||||
|
||||
return "$year$mon$mday-$hour$min$sec";
|
||||
}
|
||||
|
||||
|
||||
###############################################################
|
||||
# archive_file
|
||||
#
|
||||
# This routine moves a file into a backup directory.
|
||||
#
|
||||
# Arguments:
|
||||
# $dir => source directory to archive from
|
||||
# $filename => file to archive
|
||||
# $archive_dir => destination directory to archive to
|
||||
# $archive_filename => destination filename (wihout datestamp -
|
||||
# that is appended automatically)
|
||||
# $copy => optional parameter. If == 1 then the files
|
||||
# are copied, not moved to $archive_dir.
|
||||
# Returns: $OKAY on success
|
||||
###############################################################
|
||||
sub archive_file
|
||||
{
|
||||
my ($dir, $filename, $archive_dir, $archive_filename, $copy) = @_;
|
||||
|
||||
my ($full_filename, $timestamp, $full_archive_filename);
|
||||
|
||||
|
||||
$full_filename = "$dir/$filename";
|
||||
## $timestamp = &get_time_stamp();
|
||||
$timestamp = &get_file_timestamp($full_filename);
|
||||
|
||||
$full_archive_filename = "$archive_dir/$archive_filename.$timestamp";
|
||||
|
||||
if ( -f $full_filename )
|
||||
{
|
||||
if ( defined($copy) && $copy )
|
||||
{
|
||||
if ( ! copy($full_filename, $full_archive_filename) )
|
||||
{
|
||||
return($ERROR_WARNING);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! move($full_filename, $full_archive_filename) )
|
||||
{
|
||||
return($ERROR_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return($OKAY);
|
||||
}
|
||||
|
||||
|
||||
###########################################################################
|
||||
# purge_old_archives
|
||||
#
|
||||
# This routine deletes old archive files - it sorts the files in the
|
||||
# directory and deletes the oldest files until there are at most $max_files
|
||||
# in the directory
|
||||
###########################################################################
|
||||
sub purge_old_archives
|
||||
{
|
||||
my ($archive_dir, $max_files, $prefix) = @_;
|
||||
|
||||
my ($dirhandle, @allfiles, @delfiles);
|
||||
local($_);
|
||||
|
||||
$dirhandle = new DirHandle $archive_dir;
|
||||
if ( ! $dirhandle )
|
||||
{
|
||||
return ($ERROR_WARNING);
|
||||
}
|
||||
|
||||
@allfiles = grep /^\Q$prefix\E/,
|
||||
reverse sort $dirhandle->read();
|
||||
$dirhandle->close();
|
||||
|
||||
@delfiles = splice @allfiles, $max_files;
|
||||
unlink map {"$archive_dir/$_"} @delfiles;
|
||||
}
|
||||
|
||||
|
||||
###############################
|
||||
# open_log_file
|
||||
#
|
||||
# Opens the log file for append
|
||||
###############################
|
||||
sub open_log_file
|
||||
{
|
||||
$LOG_FH = new IO::File ">>$LOG_DIR/$LOG_FILE";
|
||||
if ( ! $LOG_FH )
|
||||
{
|
||||
print STDERR "Error opening log file\n";
|
||||
exit($ERROR_CRITICAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
################
|
||||
# close_log_file
|
||||
################
|
||||
sub close_log_file
|
||||
{
|
||||
$LOG_FH->close();
|
||||
}
|
||||
|
||||
|
||||
##################################
|
||||
# write_log_file
|
||||
#
|
||||
# Writes a message to the log file
|
||||
##################################
|
||||
sub write_log_file
|
||||
{
|
||||
my ($code, $desc) = @_;
|
||||
|
||||
my ($timestamp);
|
||||
|
||||
$timestamp = &get_time_stamp();
|
||||
|
||||
if ( $code eq $START_STAMP )
|
||||
{
|
||||
print $LOG_FH "\n$code<$timestamp>: $desc\n";
|
||||
}
|
||||
elsif ( $code eq $END_STAMP )
|
||||
{
|
||||
print $LOG_FH "$code<$timestamp>: $desc\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print $LOG_FH "\t$code<$timestamp>: $desc\n";
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
71
atwork/burst_billing/inc/burst_accounts.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
Comcast_Online_Towson:209.19.8.1:r1.twsn1.md.home.net:45233
|
||||
Cox_AV:209.218.23.21:w4.rdc2.occa.home.net:44204
|
||||
Cox_AZ:10.252.40.193:w1.rdc1.az.home.net:43195
|
||||
Cox_NE:10.252.136.17:w1.rdc1.ne.home.net:45621
|
||||
Cox_SD:10.252.20.97:w2.rdc1.sdca.home.net:44118
|
||||
Cox_VA:10.252.60.5:w1.rdc1.va.home.net:43711
|
||||
Cox_Fibernet:10.252.64.5:w1.rdc1.ok.home.net:44119
|
||||
Befirst:216.217.177.69:w1.pop1.fl.home.net:46820
|
||||
Internap:216.217.218.129:wbb1.rdc1.wa.home.net:48891
|
||||
Merril_Lynch:10.252.172.1:w1.pop1.nj.home.net:47549
|
||||
Siebel:10.252.9.113:w4.rdc1.sfba.home.net:46653
|
||||
Vertex:10.252.140.1:w1.pop1.ca.home.net:44176
|
||||
COX_COMM:10.252.96.17:w1.pop1.la.home.net:42782
|
||||
FUSION_NETWORKS:10.252.148.53:w1.pop1.fl.home.net:40378
|
||||
ISP_ALLIANCE:10.252.168.17:w1.pop1.ga.home.net:42968
|
||||
Akamai:64.232.139.5:wbb1.pop1.va.home.net:44435
|
||||
MICROCAST:24.7.70.65:c1.cmbrma1.home.net:44698
|
||||
MICROCAST:24.7.70.81:c1.sttlwa1.home.net:44699
|
||||
MICROCAST:24.7.70.77:c1.snfcca1.home.net:44700
|
||||
MICROCAST:24.7.70.69:c2.chcgil1.home.net:44704
|
||||
MICROCAST:24.7.70.85:c2.washdc1.home.net:44702
|
||||
MICROCAST:24.7.70.73:c1.dllstx1.home.net:44703
|
||||
STREAMING_MEDIA:10.253.0.1:wbb1.pop1.va.home.net:45382
|
||||
INTELLISPACE_INTELLIGENT_INTERNET:10.252.156.33:w1.pop1.ny.home.net:44449
|
||||
Speedera:209.219.187.1:wbb1.pop2.ca.home.net:46034
|
||||
Speedera:64.232.139.1:wbb1.pop1.va.home.net:46035
|
||||
IBeam:10.253.64.49:wbb1.pop2.ca.home.net:43891
|
||||
COX_COMM:10.252.168.21:w1.pop1.ga.home.net:44619
|
||||
Apptus:10.253.0.33:wbb1.pop1.va.home.net:46080
|
||||
SADDLEBACK_COLLEGE:10.252.25.109:w1.rdc2.occa.home.net:37266
|
||||
Cox_VA:10.252.60.1:w1.rdc1.va.home.net:37085
|
||||
Cox_AV:209.218.23.21:wbb1.rdc2.occa.home.net:36842
|
||||
SEGASOFT:209.19.34.33:w4.rdc1.sfba.home.net:36658
|
||||
AT&T_NCS_ITS:10.252.1.25:w5.rdc1.nj.home.net:35004
|
||||
LUCENT_TECHNOLOGIES:10.252.0.117:w1.rdc1.nj.home.net:38002
|
||||
BROADCOM:10.252.24.9:w1.rdc2.occa.home.net:38442
|
||||
NETWORK_PLUS:10.252.49.73:w2.pop1.ma.home.net:38786
|
||||
GLOBAL_MUSIC_OUTLET:10.252.27.9:w2.rdc2.occa.home.net:34780
|
||||
SIMPLE_NETWORK_COMM:10.252.144.1:w1.sndgca1.home.net:35837
|
||||
TELEBEAM:209.125.212.9:w1.pop1.pa.home.net:34908
|
||||
INTERTAINER:10.252.24.209:w1.rdc2.occa.home.net:39622
|
||||
INTEL_CORP:10.252.160.9:w1.pop1.or.home.net:38387
|
||||
AT&T_MEDIA_SERVICES:10.252.84.161:w4.rdc1.sfba.home.net:39715
|
||||
NET_CARRIER:209.125.212.13:w1.pop1.pa.home.net:36901
|
||||
COMCAST_ONLINE:216.217.0.1:w3.rdc1.nj.home.net:40728
|
||||
REAL_NETWORKS:216.216.93.5:wbb1.rdc1.wa.home.net:40961
|
||||
INTEL_CORP:10.252.41.13:w2.pop1.az.home.net:38798
|
||||
IDEAL:10.252.56.5:wbb1.pop1.mi.home.net:40235
|
||||
IMALL:10.252.180.17:w1.pop2.ut.home.net:39762
|
||||
PRIME:10.252.25.189:w2.rdc2.occa.home.net:41036
|
||||
ETRACKS.COM:10.252.11.73:w4.rdc1.sfba.home.net:39479
|
||||
NEW_JERSEY_LINKED:10.252.172.5:w1.pop1.nj.home.net:40679
|
||||
AT&T_FIBER_WHOLESALE:10.252.84.245:w4.rdc1.sfba.home.net:39998
|
||||
NORTHPOINT_PVC_IRVINE:10.252.32.165:w3.rdc2.occa.home.net:43108
|
||||
NORTHPOINT_PVC_CHICAGO:10.252.14.149:w3.rdc1.il.home.net:43102
|
||||
NORTHPOINT_PVC_WASHINGTON:10.252.88.21:w1.pop1.dc.home.net:43103
|
||||
NORTHPOINT_PVC_ATLANTA:10.252.168.13:w1.pop1.ga.home.net:43097
|
||||
NORTHPOINT_PVC_NEW_JERSEY:10.252.80.125:w4.rdc1.nj.home.net:43105
|
||||
NORTHPOINT_PVC_FT_LAUD:10.252.148.33:w1.pop1.fl.home.net:43101
|
||||
AIRPOWER_COMM:216.216.30.213:wbb1.rdc2.occa.home.net:42072
|
||||
REAL_NETWORKS:10.252.116.53:w1.pop1.or.home.net:42946
|
||||
AKAMAI:10.253.112.33:wbb1.pop1.il.home.net:44426
|
||||
AKAMAI:10.253.132.33:wbb1.pop1.ny.home.net:44434
|
||||
AKAMAI:10.253.80.33:wbb1.pop2.wa.home.net:44427
|
||||
AKAMAI:10.253.96.33:wbb1.pop1.ca.home.net:44429
|
||||
AKAMAI:10.253.64.37:wbb1.pop2.ca.home.net:44423
|
||||
COX_COMM:10.252.168.9:w1.pop1.ga.home.net:41756
|
||||
STREAMING_MEDIA:10.253.64.33:wbb1.pop2.ca.home.net:45381
|
||||
INTUIT:216.216.48.141:w1.sndgca1.home.net:46576
|
||||
AT&T_UGN_KANSAS:10.252.152.33:w1.pop1.il.home.net:43861
|
||||
WEBUSENET:10.253.64.45:wbb1.pop2.ca.home.net:45791
|
||||
48
mozilla/mozilla.kdevprj
Normal file
@@ -0,0 +1,48 @@
|
||||
# KDE Config File
|
||||
[mozilla.lsm]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[Config for BinMakefileAm]
|
||||
ldflags=
|
||||
cxxflags=-O0 -g3 -Wall
|
||||
bin_program=mozilla
|
||||
[po/Makefile.am]
|
||||
sub_dirs=
|
||||
type=po
|
||||
[LFV Groups]
|
||||
Dialogs=*.kdevdlg,
|
||||
Others=*,
|
||||
Translations=*.po,
|
||||
groups=Headers,Sources,Dialogs,Translations,Others,
|
||||
Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l,
|
||||
Headers=*.h,*.hh,*.hxx,*.hpp,*.H,
|
||||
[mozilla.kdevprj]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[mozilla/docs/en/Makefile.am]
|
||||
sub_dirs=
|
||||
type=normal
|
||||
[mozilla/Makefile.am]
|
||||
sub_dirs=
|
||||
type=prog_main
|
||||
[General]
|
||||
makefiles=Makefile.am,mozilla/Makefile.am,mozilla/docs/Makefile.am,mozilla/docs/en/Makefile.am,po/Makefile.am,
|
||||
version_control=CVS
|
||||
author=Heikki Toivonen
|
||||
project_type=normal_empty
|
||||
sub_dir=mozilla/
|
||||
version=0.1
|
||||
project_name=Mozilla
|
||||
email=heikki@netscape.com
|
||||
kdevprj_version=1.2
|
||||
[Makefile.am]
|
||||
files=mozilla.kdevprj,mozilla.lsm,
|
||||
sub_dirs=mozilla,
|
||||
type=normal
|
||||
[mozilla/docs/Makefile.am]
|
||||
sub_dirs=
|
||||
type=normal
|
||||
14
mozilla/mozilla.lsm
Normal file
@@ -0,0 +1,14 @@
|
||||
Begin3
|
||||
Title: Mozilla
|
||||
Version: 0.1
|
||||
Entered-date:
|
||||
Description:
|
||||
Keywords:
|
||||
Author: Heikki Toivonen <heikki@netscape.com>
|
||||
Maintained-by: Heikki Toivonen <heikki@netscape.com>
|
||||
Primary-site:
|
||||
Home-page: http://
|
||||
Original-site:
|
||||
Platforms: Linux and other Unices
|
||||
Copying-policy: GNU Public License
|
||||
End
|
||||
20
mozilla/mozilla/templates/cpp_template
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
20
mozilla/mozilla/templates/header_template
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
@@ -1 +0,0 @@
|
||||
Clobbering because preed says it'll fix the red.
|
||||
@@ -1,19 +0,0 @@
|
||||
#
|
||||
## hostname: fxdbug-linux-tbox.build.mozilla.org
|
||||
## uname: Linux fxdbug-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
|
||||
#
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=browser
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
|
||||
ac_add_options --disable-optimize
|
||||
ac_add_options --enable-debug
|
||||
|
||||
ac_add_options --enable-canvas
|
||||
ac_add_options --enable-svg
|
||||
ac_add_options --enable-pango
|
||||
|
||||
ac_add_options --enable-trace-malloc
|
||||
ac_add_options --disable-libxul
|
||||
@@ -1,190 +0,0 @@
|
||||
#
|
||||
## hostname: fxdbug-linux-tbox.build.mozilla.org
|
||||
## uname: Linux fxdbug-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
|
||||
#
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
#$ENV{PATH} = "/usr/local/binutils-2.13.2.1/bin:/usr/local/gcc-3.4.3/bin:" . $ENV{PATH};
|
||||
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
# Disable the Gnome Bug Buddy so that it doesn't block us getting stacks
|
||||
$ENV{GNOME_DISABLE_CRASH_DIALOG} = '1';
|
||||
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Firefox";
|
||||
$VendorName = "Mozilla";
|
||||
$ENV{NO_EM_RESTART} = '1';
|
||||
|
||||
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
$BloatTest = 1; # warren memory bloat test
|
||||
$BloatTest2 = 1; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 1; # Should test report back to server?
|
||||
#$results_server = "axolotl.mozilla.org"; # was tegu
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
|
||||
#$CreateProfileTimeout = 45;
|
||||
$RegxpcomTestTimeout = 60;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
$BloatTestTimeout = 1800; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 60; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
# This sets the value of the XPCOM_DEBUG_BREAK environment variable. We
|
||||
# default to 'warn', which suppresses the assertion dialogs on Windows
|
||||
# and gives platform parity. Use 'abort' for fatal assertions.
|
||||
$MozAssertBehavior = 'stack-and-abort';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
$moz_cvsroot = ':ext:ffxbld@cvs.mozilla.org:/cvsroot';
|
||||
#$moz_cvsroot = ":pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot";
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj';
|
||||
|
||||
# Extra build name, if needed.
|
||||
#$BuildNameExtra = 'GTK1 (gcc 3.4)';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
#$BuildTree = 'MozillaTest';
|
||||
$BuildTree = 'Firefox3.0';
|
||||
|
||||
#$BuildName = '';
|
||||
#$BuildTag = '';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# allow override of timezone value (for win32 POSIX::strftime)
|
||||
#$Timezone = '';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
$LogCompression = 'bzip2';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
$LogEncoding = 'uuencode';
|
||||
@@ -1 +0,0 @@
|
||||
- trigger another clobber to test bug 388691
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xservex08.build.mozilla.org
|
||||
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
#. $topsrcdir/build/macosx/universal/mozconfig
|
||||
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
mk_add_options MOZ_CO_PROJECT="browser"
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
|
||||
ac_add_app_options ppc --enable-prebinding
|
||||
|
||||
ac_add_options --disable-optimize
|
||||
ac_add_options --enable-debug
|
||||
|
||||
ac_add_options --enable-canvas
|
||||
ac_add_options --enable-svg
|
||||
|
||||
ac_add_options --enable-trace-malloc
|
||||
ac_add_options --enable-libxul
|
||||
@@ -1,192 +0,0 @@
|
||||
#
|
||||
## hostname: bm-xserve08.build.mozilla.org
|
||||
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
|
||||
#
|
||||
|
||||
#
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
#$ENV{PATH} = "/usr/local/binutils-2.13.2.1/bin:/usr/local/gcc-3.4.3/bin:" . $ENV{PATH};
|
||||
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
|
||||
#$MacUniversalBinary = 1;
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
$BuildDebug = 1; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "GranParadiso";
|
||||
$VendorName = "";
|
||||
$ENV{NO_EM_RESTART} = '1';
|
||||
|
||||
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
$BloatTest = 1; # warren memory bloat test
|
||||
$BloatTest2 = 1; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
|
||||
$TestsPhoneHome = 1; # Should test report back to server?
|
||||
#$results_server = "axolotl.mozilla.org"; # was tegu
|
||||
#$pageload_server = "spider"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
|
||||
#$CreateProfileTimeout = 45;
|
||||
$RegxpcomTestTimeout = 60;
|
||||
|
||||
#$AliveTestTimeout = 45;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
$BloatTestTimeout = 300; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 60; # seconds
|
||||
#$XULWindowOpenTestTimeout = 150; # seconds
|
||||
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
# This sets the value of the XPCOM_DEBUG_BREAK environment variable. We
|
||||
# default to 'warn', which suppresses the assertion dialogs on Windows
|
||||
# and gives platform parity. Use 'abort' (or, on trunk after 2007-08-10,
|
||||
# 'stack-and-abort') for fatal assertions.
|
||||
$MozAssertBehavior = 'stack-and-abort';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
#$Make = 'gmake'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
#$blat = 'c:/nstools/bin/blat';
|
||||
#$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
$moz_cvsroot = ':ext:ffxbld@cvs.mozilla.org:/cvsroot';
|
||||
#$moz_cvsroot = ":pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot";
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = '../build';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Debug + Leak Test';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
#$BuildTree = 'MozillaTest';
|
||||
$BuildTree = 'Firefox3.0';
|
||||
|
||||
#$BuildName = '';
|
||||
#$BuildTag = '';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox-bin';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# allow override of timezone value (for win32 POSIX::strftime)
|
||||
#$Timezone = '';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
$LogCompression = 'bzip2';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
$LogEncoding = 'uuencode';
|
||||
@@ -1 +0,0 @@
|
||||
Clobber in case the intermittant leak is cruft-buildup
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
## hostname: fxdbug-win32-tbox
|
||||
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
|
||||
#
|
||||
|
||||
mk_add_options MOZ_CO_PROJECT=browser
|
||||
mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j5"
|
||||
mk_add_options MOZ_PACKAGE_NSIS=1
|
||||
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --disable-optimize
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-trace-malloc
|
||||
@@ -1,221 +0,0 @@
|
||||
#
|
||||
## hostname: fxdbug-win32-tbox
|
||||
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
|
||||
#
|
||||
|
||||
#- tinder-config.pl - Tinderbox configuration file.
|
||||
#- Uncomment the variables you need to set.
|
||||
#- The default values are the same as the commented variables.
|
||||
|
||||
$ENV{MOZ_INSTALLER_USE_7ZIP} = '1';
|
||||
$ENV{MOZ_PACKAGE_NSIS} = '1';
|
||||
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
|
||||
$ENV{NO_EM_RESTART} = '1';
|
||||
|
||||
# $ENV{MOZ_PACKAGE_MSI}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: 0
|
||||
# Values: 0 | 1
|
||||
# Purpose: Controls whether a MSI package is made.
|
||||
# Requires: Windows and a local MakeMSI installation.
|
||||
#$ENV{MOZ_PACKAGE_MSI} = 0;
|
||||
|
||||
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Default: scp
|
||||
# Values: scp | rsync
|
||||
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
|
||||
# Requires: The selected type requires the command be available both locally
|
||||
# and on the Talkback server.
|
||||
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
|
||||
|
||||
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
|
||||
$BuildAdministrator = 'build@mozilla.org';
|
||||
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
|
||||
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
|
||||
|
||||
#- You'll need to change these to suit your machine's needs
|
||||
#$DisplayServer = ':0.0';
|
||||
|
||||
#- Default values of command-line opts
|
||||
#-
|
||||
#$BuildDepend = 1; # Depend or Clobber
|
||||
#$BuildDebug = 0; # Debug or Opt (Darwin)
|
||||
#$ReportStatus = 1; # Send results to server, or not
|
||||
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
|
||||
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
|
||||
#$BuildOnce = 0; # Build once, don't send results to server
|
||||
#$TestOnly = 0; # Only run tests, don't pull/build
|
||||
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
|
||||
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
#$BuildLocales = 0; # Do l10n packaging?
|
||||
|
||||
# Tests
|
||||
$CleanProfile = 1;
|
||||
#$ResetHomeDirForTests = 1;
|
||||
$ProductName = "Firefox";
|
||||
$VendorName = "Mozilla";
|
||||
|
||||
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
|
||||
#$RegxpcomTest = 1;
|
||||
#$AliveTest = 1;
|
||||
#$JavaTest = 0;
|
||||
#$ViewerTest = 0;
|
||||
$BloatTest = 1; # warren memory bloat test
|
||||
$BloatTest2 = 1; # dbaron memory bloat test, require tracemalloc
|
||||
#$DomToTextConversionTest = 0;
|
||||
#$XpcomGlueTest = 0;
|
||||
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
|
||||
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
|
||||
#$MailBloatTest = 0;
|
||||
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
|
||||
#$LayoutPerformanceTest = 0; # Tp
|
||||
#$DHTMLPerformanceTest = 0; # Tdhtml
|
||||
#$QATest = 0;
|
||||
#$XULWindowOpenTest = 0; # Txul
|
||||
#$StartupPerformanceTest = 0; # Ts
|
||||
#$NeckoUnitTest = 0;
|
||||
#$RenderPerformanceTest = 0; # Tgfx
|
||||
|
||||
$TestsPhoneHome = 1; # Should test report back to server?
|
||||
#$GraphNameOverride = 'fxdbug-win32-tbox';
|
||||
|
||||
# $results_server
|
||||
#----------------------------------------------------------------------------
|
||||
# Server on which test results will be accessible. This was originally tegu,
|
||||
# then became axolotl. Once we moved services from axolotl, it was time
|
||||
# to give this service its own hostname to make future transitions easier.
|
||||
# - cmp@mozilla.org
|
||||
#$results_server = "build-graphs.mozilla.org";
|
||||
|
||||
$pageload_server = "pageload.build.mozilla.org"; # localhost
|
||||
|
||||
#
|
||||
# Timeouts, values are in seconds.
|
||||
#
|
||||
#$CVSCheckoutTimeout = 3600;
|
||||
#$CreateProfileTimeout = 45;
|
||||
#$RegxpcomTestTimeout = 120;
|
||||
|
||||
#$AliveTestTimeout = 30;
|
||||
#$ViewerTestTimeout = 45;
|
||||
#$EmbedTestTimeout = 45;
|
||||
$BloatTestTimeout = 1800; # seconds
|
||||
#$MailBloatTestTimeout = 120; # seconds
|
||||
#$JavaTestTimeout = 45;
|
||||
#$DomTestTimeout = 45; # seconds
|
||||
#$XpcomGlueTestTimeout = 15;
|
||||
#$CodesizeTestTimeout = 900; # seconds
|
||||
#$CodesizeTestType = "auto"; # {"auto"|"base"}
|
||||
$LayoutPerformanceTestTimeout = 800; # entire test, seconds
|
||||
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
|
||||
#$QATestTimeout = 1200; # entire test, seconds
|
||||
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
|
||||
#$StartupPerformanceTestTimeout = 20; # seconds
|
||||
#$XULWindowOpenTestTimeout = 90; # seconds
|
||||
#$NeckoUnitTestTimeout = 30; # seconds
|
||||
$RenderPerformanceTestTimeout = 1800; # seconds
|
||||
|
||||
#$MozConfigFileName = 'mozconfig';
|
||||
|
||||
#$UseMozillaProfile = 1;
|
||||
#$MozProfileName = 'default';
|
||||
|
||||
# This sets the value of the XPCOM_DEBUG_BREAK environment variable. We
|
||||
# default to 'warn', which suppresses the assertion dialogs on Windows
|
||||
# and gives platform parity. Use 'abort' (or, on trunk after 2007-08-10,
|
||||
# 'stack-and-abort') for fatal assertions.
|
||||
$MozAssertBehavior = 'stack-and-abort';
|
||||
|
||||
#- Set these to what makes sense for your system
|
||||
$Make = 'make'; # Must be GNU make
|
||||
#$MakeOverrides = '';
|
||||
#$mail = '/bin/mail';
|
||||
#$CVS = 'cvs -q';
|
||||
#$CVSCO = 'checkout -P';
|
||||
|
||||
# win32 usually doesn't have /bin/mail
|
||||
$blat = '/d/mozilla-build/blat261/full/blat';
|
||||
$use_blat = 0;
|
||||
|
||||
# Set moz_cvsroot to something like:
|
||||
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
|
||||
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
|
||||
#
|
||||
# Note that win32 may not need \@, depends on ' or ".
|
||||
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
|
||||
|
||||
#$moz_cvsroot = $ENV{CVSROOT};
|
||||
$moz_cvsroot = ':ext:ffxbld@cvs.mozilla.org:/cvsroot';
|
||||
|
||||
#- Set these proper values for your tinderbox server
|
||||
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
|
||||
|
||||
# Allow for non-client builds, e.g. camino.
|
||||
#$moz_client_mk = 'client.mk';
|
||||
|
||||
#- Set if you want to build in a separate object tree
|
||||
$ObjDir = 'obj-fx-trunk';
|
||||
|
||||
# Extra build name, if needed.
|
||||
$BuildNameExtra = 'Debug + Leak Test';
|
||||
|
||||
# User comment, eg. ip address for dhcp builds.
|
||||
# ex: $UserComment = "ip = 208.12.36.108";
|
||||
#$UserComment = 0;
|
||||
|
||||
#-
|
||||
#- The rest should not need to be changed
|
||||
#-
|
||||
|
||||
#- Minimum wait period from start of build to start of next build in minutes.
|
||||
#$BuildSleep = 10;
|
||||
|
||||
#- Until you get the script working. When it works,
|
||||
#- change to the tree you're actually building
|
||||
#$BuildTree = 'MozillaTest';
|
||||
$BuildTree = 'Firefox3.0';
|
||||
|
||||
#$BuildName = '';
|
||||
#$BuildTag = '';
|
||||
#$BuildConfigDir = 'mozilla/config';
|
||||
#$Topsrcdir = 'mozilla';
|
||||
|
||||
$BinaryName = 'firefox.exe';
|
||||
|
||||
#
|
||||
# For embedding app, use:
|
||||
#$EmbedBinaryName = 'TestGtkEmbed';
|
||||
#$EmbedDistDir = 'dist/bin'
|
||||
|
||||
|
||||
#$ShellOverride = ''; # Only used if the default shell is too stupid
|
||||
#$ConfigureArgs = '';
|
||||
#$ConfigureEnvArgs = '';
|
||||
#$Compiler = 'gcc';
|
||||
#$NSPRArgs = '';
|
||||
#$ShellOverride = '';
|
||||
|
||||
# allow override of timezone value (for win32 POSIX::strftime)
|
||||
#$Timezone = '';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
#$RebootSystem = 0;
|
||||
|
||||
# LogCompression specifies the type of compression used on the log file.
|
||||
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
|
||||
# for 'gzip' or 'bzip2' are in the user's path before setting this
|
||||
# option.
|
||||
#$LogCompression = '';
|
||||
|
||||
# LogEncoding specifies the encoding format used for the logs. Valid
|
||||
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
|
||||
# this needs to be set to 'base64' or 'uuencode' to ensure that the
|
||||
# binary data is transferred properly.
|
||||
#$LogEncoding = '';
|
||||
14
mozilla/webtools/aus/README
Normal file
@@ -0,0 +1,14 @@
|
||||
AUS Lite
|
||||
--------
|
||||
Great taste, less filling. (tm)
|
||||
|
||||
Installation
|
||||
------------
|
||||
Copy ./inc/config-dist.php to ./inc/config.php. Configure it properly following the comments.
|
||||
Set up the ./data symlink to point to the right location (/opt/aus2/incoming, for example).
|
||||
Referencing ./ with the right parameters will get you the correct XML file.
|
||||
|
||||
NOTE: source files must follow a naming convention:
|
||||
SOURCE_DIR/[product]/[platform]/[locale].txt
|
||||
|
||||
NOTE: adjust the .htaccess file's RewriteBase if you are having problems.
|
||||
8
mozilla/webtools/aus/htaccess.dist
Normal file
@@ -0,0 +1,8 @@
|
||||
# TODO: Replace this with something simpler (Alias).
|
||||
# TODO: Then use PHP to parse path using pathinfo() instead.
|
||||
RewriteEngine On
|
||||
RewriteBase /~morgamic/aus
|
||||
RewriteRule ^update2/(.*)$ index.php?path=$1
|
||||
RewriteRule ^update/(.*)$ index.php?path=$1
|
||||
php_value error_reporting 2047
|
||||
php_value display_errors 1
|
||||
68
mozilla/webtools/aus/inc/aus.class.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Generic class definition for all AUS objects.
|
||||
*
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
class AUS_Object {
|
||||
|
||||
function AUS_Object() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an object parameter.
|
||||
* @param string $key
|
||||
* @param mixed $val
|
||||
* @param bool $overwrite
|
||||
* @return boolean
|
||||
*/
|
||||
function setVar($key,$val,$overwrite=false) {
|
||||
if (!isset($this->$key) || (isset($this->$key) && $overwrite)) {
|
||||
$this->$key = $val;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
88
mozilla/webtools/aus/inc/config-dist.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Configuration file.
|
||||
* @package auslite
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
// define('SOURCE_DIR','/home/morgamic/public_html/auslite/source');
|
||||
define('SOURCE_DIR',getcwd().'/data');
|
||||
|
||||
// This is the directory containin channel-specific updates.
|
||||
// Snippets in this directory override normal updates.
|
||||
define('OVERRIDE_DIR',getcwd().'/data/3');
|
||||
|
||||
// Uncomment this line in order to echo text debug information.
|
||||
define('DEBUG',false);
|
||||
|
||||
// Define default for Update blocks.
|
||||
define('UPDATE_TYPE','minor');
|
||||
define('UPDATE_VERSION','1.0+');
|
||||
define('UPDATE_EXTENSION_VERSION','1.0+');
|
||||
|
||||
// These are channels that have access to nightly updates.
|
||||
// All other channels only have access to the OVERRIDE_DIR for update info.
|
||||
$nightlyChannels = array(
|
||||
'nightly'
|
||||
);
|
||||
|
||||
// This hash defines the version->patch relationships.
|
||||
// It determines which patches are associated to which incoming client versions.
|
||||
// @todo replace this with a better datasource that can be easily managed via a GUI.
|
||||
$branchVersions = array(
|
||||
'1.0+' => '1.5',
|
||||
'1.4' => '1.5',
|
||||
'1.4.1'=> '1.5',
|
||||
'1.5' => '1.5',
|
||||
'1.5.0.1' => '1.5.0.1',
|
||||
'1.5.0.2' => '1.5.0.2',
|
||||
'1.5.0.3' => '1.5.0.3',
|
||||
'1.5.0.4' => '1.5.0.4',
|
||||
'1.6a1'=> 'trunk',
|
||||
'2.0'=>'2.0',
|
||||
'2.0a1'=>'2.0',
|
||||
'2.0a2'=>'2.0',
|
||||
'2.0b1'=>'2.0',
|
||||
'2.0b2'=>'2.0',
|
||||
'2.0a3'=>'2.0',
|
||||
'3.0a1'=>'trunk'
|
||||
);
|
||||
?>
|
||||
56
mozilla/webtools/aus/inc/init.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Initialization script.
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*
|
||||
* This script reads config and includes core libraries.
|
||||
* At no point should this ever output or modify data.
|
||||
*/
|
||||
ini_set('display_errors',1);
|
||||
ini_set('error_reporting',E_ALL);
|
||||
require_once('config.php'); // Read config file.
|
||||
require_once('aus.class.php'); // Generic object definition.
|
||||
require_once('xml.class.php'); // XML class for output generation.
|
||||
require_once('update.class.php'); // Update class for each update.
|
||||
require_once('patch.class.php'); // Patch class for update patches.
|
||||
?>
|
||||
331
mozilla/webtools/aus/inc/patch.class.php
Normal file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* AUS Patch class.
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*
|
||||
* This class is for handling patch objects.
|
||||
* These carry relevant information about partial or complete patches.
|
||||
*/
|
||||
class Patch extends AUS_Object {
|
||||
|
||||
// Patch metadata.
|
||||
var $type;
|
||||
var $url;
|
||||
var $hashFunction;
|
||||
var $hashValue;
|
||||
var $size;
|
||||
var $build;
|
||||
|
||||
// Array that maps versions onto their respective branches.
|
||||
var $branchVersions;
|
||||
|
||||
// Array the defines which channels are flagged as 'nightly' channels.
|
||||
var $nightlyChannels;
|
||||
|
||||
// Valid patch flag.
|
||||
var $isPatch;
|
||||
|
||||
// Is this patch a complete or partial patch?
|
||||
var $patchType;
|
||||
|
||||
// Update metadata, read from patch file.
|
||||
var $updateType;
|
||||
var $updateVersion;
|
||||
var $updateExtensionVersion;
|
||||
|
||||
// Do we have Update metadata information?
|
||||
var $hasUpdateInfo;
|
||||
var $hasDetailsUrl;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function Patch($branchVersions=array(),$nightlyChannels,$type='complete') {
|
||||
$this->setBranchVersions($branchVersions);
|
||||
$this->setNightlyChannels($nightlyChannels);
|
||||
$this->setVar('isPatch',false);
|
||||
$this->setVar('patchType',$type);
|
||||
$this->setVar('hasUpdateInfo',false);
|
||||
$this->setVar('hasDetailsUrl',false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the filepath for the snippet based on product/platform/locale and
|
||||
* SOURCE_DIR, which is set in config.
|
||||
*
|
||||
* @param string $product
|
||||
* @param string $platform
|
||||
* @param string $locale
|
||||
* @param string $version
|
||||
* @param string $build
|
||||
* @param string $buildSource
|
||||
* @param string $channel
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function setPath ($product,$platform,$locale,$version=null,$build,$buildSource,$channel) {
|
||||
switch($buildSource) {
|
||||
case 3:
|
||||
return $this->setVar('path',OVERRIDE_DIR.'/'.$product.'/'.$version.'/'.$platform.'/'.$build.'/'.$locale.'/'.$channel.'/'.$this->patchType.'.txt',true);
|
||||
break;
|
||||
case 2:
|
||||
return $this->setVar('path',SOURCE_DIR.'/'.$buildSource.'/'.$product.'/'.$version.'/'.$platform.'/'.$build.'/'.$locale.'/'.$this->patchType.'.txt',true);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the given file and store its contents in our Patch object.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function setSnippet ($path) {
|
||||
if ($file = explode("\n",file_get_contents($path,true))) {
|
||||
$this->setVar('type',$file[0]);
|
||||
$this->setVar('url',$file[1]);
|
||||
$this->setVar('hashFunction',$file[2]);
|
||||
$this->setVar('hashValue',$file[3]);
|
||||
$this->setVar('size',$file[4]);
|
||||
$this->setVar('build',$file[5]);
|
||||
|
||||
// Attempt to read update information.
|
||||
// @TODO Add ability to set updateType, once it exists in the build snippet.
|
||||
if ($this->isComplete() && isset($file[6]) && isset($file[7])) {
|
||||
$this->setVar('updateVersion',$file[6],true);
|
||||
$this->setVar('updateExtensionVersion',$file[7],true);
|
||||
$this->setVar('hasUpdateInfo',true,true);
|
||||
}
|
||||
|
||||
if ($this->isComplete() && isset($file[8])) {
|
||||
$this->setVar('detailsUrl',$file[8],true);
|
||||
$this->setVar('hasDetailsUrl',true,true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to read and parse the designated source file.
|
||||
* How and where the file is read depends on the client version.
|
||||
*
|
||||
* For more information on why this is a little complicated, see:
|
||||
* https://intranet.mozilla.org/AUS:Version2:Roadmap:Multibranch
|
||||
*
|
||||
* @param string $product
|
||||
* @param string $platform
|
||||
* @param string $locale
|
||||
* @param string $version
|
||||
* @param string $build
|
||||
* @param string $channel
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function findPatch($product,$platform,$locale,$version,$build,$channel=null) {
|
||||
|
||||
// Determine the branch of the client's version.
|
||||
$branchVersion = $this->getBranch($version);
|
||||
|
||||
// If a specific update exists for the specified channel, it takes priority over the branch update.
|
||||
if (!empty($channel) && $this->setPath($product,$platform,$locale,$branchVersion,$build,3,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Otherwise, if it is a complete patch and a nightly channel, force the complete update to take the user to the latest build.
|
||||
elseif ($this->isComplete() && $this->isNightlyChannel($channel)) {
|
||||
|
||||
// Get the latest build for this branch.
|
||||
$latestbuild = $this->getLatestBuild($product,$branchVersion,$platform);
|
||||
|
||||
if ($this->setPath($product,$platform,$locale,$branchVersion,$latestbuild,2,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Otherwise, check for the partial snippet info. If an update exists, pass it along.
|
||||
elseif ($this->isNightlyChannel($channel) && $this->setPath($product,$platform,$locale,$branchVersion,$build,2,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Note: Other data sets were made obsolete in 0.6. May incoming/0,1 rest in peace.
|
||||
|
||||
// If we get here, we know for sure that no updates exist for the current request..
|
||||
// Return false by default, which prompts the "no updates" XML output.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare passed build to build in snippet.
|
||||
* Returns true if the snippet build is newer than the client build.
|
||||
*
|
||||
* @param string $build
|
||||
* @return boolean
|
||||
*/
|
||||
function isNewBuild($build) {
|
||||
return ($this->build>$build) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the branch versions array.
|
||||
*
|
||||
* @param array $branchVersions
|
||||
* @return boolean
|
||||
*/
|
||||
function setBranchVersions($branchVersions) {
|
||||
return $this->setVar('branchVersions',$branchVersions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the nightly channels array.
|
||||
*
|
||||
* @param array $branchVersions
|
||||
* @return boolean
|
||||
*/
|
||||
function setNightlyChannels($nightlyChannels) {
|
||||
return $this->setVar('nightlyChannels',$nightlyChannels);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not the given channel is flagged as nightly.
|
||||
*
|
||||
* @param string $channel
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isNightlyChannel($channel) {
|
||||
return in_array($channel,$this->nightlyChannels);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether or not the incoming version is a product BRANCH.
|
||||
*
|
||||
* @param string $version
|
||||
* @return string|false
|
||||
*/
|
||||
function getBranch($version) {
|
||||
return (isset($this->branchVersions[$version])) ? $this->branchVersions[$version] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not something is Trunk.
|
||||
*
|
||||
* @param string $version
|
||||
* @return boolean
|
||||
*/
|
||||
function isTrunk($version) {
|
||||
return ($version == 'trunk') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this object contain a valid patch file?
|
||||
*/
|
||||
function isPatch() {
|
||||
return $this->isPatch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not this patch is complete.
|
||||
*/
|
||||
function isComplete() {
|
||||
return ($this->patchType === 'complete') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not this patch has a details URL.
|
||||
*/
|
||||
function hasDetailsUrl() {
|
||||
return $this->hasDetailsUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not this patch has update information.
|
||||
*/
|
||||
function hasUpdateInfo() {
|
||||
return $this->hasUpdateInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not the to_build matches the latest build for a partial patch.
|
||||
* @param string $build
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isOneStepFromLatest($build) {
|
||||
return ($this->build == $build) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest build for this branch.
|
||||
* @param string $product
|
||||
* @param string $branchVersion
|
||||
* @param string $platform
|
||||
*/
|
||||
function getLatestBuild($product,$branchVersion,$platform) {
|
||||
$files = array();
|
||||
$fp = opendir(SOURCE_DIR.'/2/'.$product.'/'.$branchVersion.'/'.$platform);
|
||||
while (false !== ($filename = readdir($fp))) {
|
||||
if ($filename!='.' && $filename!='..') {
|
||||
$files[] = $filename;
|
||||
}
|
||||
}
|
||||
closedir($fp);
|
||||
|
||||
rsort($files,SORT_NUMERIC);
|
||||
|
||||
return $files[1];
|
||||
}
|
||||
}
|
||||
?>
|
||||
124
mozilla/webtools/aus/inc/update.class.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
class Update extends AUS_Object {
|
||||
var $type;
|
||||
var $version;
|
||||
var $extensionVersion;
|
||||
var $build;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
function Update($type=UPDATE_TYPE,$version=UPDATE_VERSION,$extensionVersion=UPDATE_EXTENSION_VERSION) {
|
||||
$this->setType($type);
|
||||
$this->setVersion($version);
|
||||
$this->setExtensionVersion($extensionVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set type.
|
||||
* @param string $type
|
||||
*/
|
||||
function setType($type) {
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set verison.
|
||||
* @param string $type
|
||||
*/
|
||||
function setVersion($version) {
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set extensionVersion.
|
||||
* @param string $extensionVersion
|
||||
*/
|
||||
function setExtensionVersion($extensionVersion) {
|
||||
$this->extensionVersion = $extensionVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the build.
|
||||
* @param string $build
|
||||
*/
|
||||
function setBuild($build) {
|
||||
return $this->setVar('build',$build);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the details URL.
|
||||
* @param string $details
|
||||
*/
|
||||
function setDetails($details) {
|
||||
return $this->setVar('details',$details);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type.
|
||||
* @return string
|
||||
*/
|
||||
function getType() {
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version.
|
||||
* @return string
|
||||
*/
|
||||
function getVersion() {
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extension version.
|
||||
* @return string
|
||||
*/
|
||||
function getExtensionVersion() {
|
||||
return $this->extensionVersion;
|
||||
}
|
||||
}
|
||||
?>
|
||||
143
mozilla/webtools/aus/inc/xml.class.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
class Xml extends AUS_Object {
|
||||
var $xmlOutput;
|
||||
var $xmlHeader;
|
||||
var $xmlFooter;
|
||||
var $xmlPatchLines;
|
||||
|
||||
/**
|
||||
* Constructor, sets overall header and footer.
|
||||
*/
|
||||
function Xml() {
|
||||
$this->xmlHeader = '<?xml version="1.0"?>'."\n".'<updates>';
|
||||
$this->xmlFooter = "\n".'</updates>';
|
||||
$this->xmlOutput = $this->xmlHeader;
|
||||
$this->xmlPatchLines = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Start an update block.
|
||||
* @param object $update
|
||||
*/
|
||||
function startUpdate($update) {
|
||||
$type = htmlentities($update->type);
|
||||
$version = htmlentities($update->version);
|
||||
$extensionVersion = htmlentities($update->extensionVersion);
|
||||
$build = htmlentities($update->build);
|
||||
$details = htmlentities($update->details);
|
||||
|
||||
$details_xml = "";
|
||||
if (strlen($details) > 0) {
|
||||
$details_xml = " detailsURL=\"{$details}\"";
|
||||
}
|
||||
|
||||
$this->xmlOutput .= <<<startUpdate
|
||||
|
||||
<update type="{$type}" version="{$version}" extensionVersion="{$extensionVersion}" buildID="{$build}" {$details_xml}>
|
||||
startUpdate;
|
||||
|
||||
/**
|
||||
* @TODO Add buildID attribute to <update> element.
|
||||
*
|
||||
* Right now it is pending QA on the client side, so we will leave it
|
||||
* out for now.
|
||||
*
|
||||
* buildID="{$build}"
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a patch line. This pulls info from a patch object.
|
||||
* @param object $patch
|
||||
*/
|
||||
function setPatchLine($patch) {
|
||||
$type = htmlentities($patch->type);
|
||||
$url = htmlentities($patch->url);
|
||||
$hashFunction = htmlentities($patch->hashFunction);
|
||||
$hashValue = htmlentities($patch->hashValue);
|
||||
$size = htmlentities($patch->size);
|
||||
|
||||
$this->xmlPatchLines .= <<<patchLine
|
||||
|
||||
<patch type="{$type}" URL="{$url}" hashFunction="{$hashFunction}" hashValue="{$hashValue}" size="{$size}"/>
|
||||
patchLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether or not patchLines have been set.
|
||||
* @return bool
|
||||
*/
|
||||
function hasPatchLine() {
|
||||
return (empty($this->xmlPatchLines)) ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* End an update block.
|
||||
*/
|
||||
function endUpdate() {
|
||||
$this->xmlOutput .= <<<endUpdate
|
||||
|
||||
</update>
|
||||
endUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add patchLines to output.
|
||||
*/
|
||||
function drawPatchLines() {
|
||||
$this->xmlOutput .= $this->xmlPatchLines;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get XML output.
|
||||
* @return $string $this->xmlOutput
|
||||
*/
|
||||
function getOutput() {
|
||||
$this->xmlOutput .= $this->xmlFooter;
|
||||
return $this->xmlOutput;
|
||||
}
|
||||
}
|
||||
?>
|
||||
217
mozilla/webtools/aus/index.php
Normal file
@@ -0,0 +1,217 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* AUS Lite main script.
|
||||
* @package auslite
|
||||
* @subpackage docs
|
||||
* @author Mike Morgan
|
||||
*
|
||||
* This script handles incoming requests, reads the related build
|
||||
* snippet and returns a properly formatted XML file for testing.
|
||||
*/
|
||||
|
||||
// Require config and supporting libraries.
|
||||
require_once('./inc/init.php');
|
||||
|
||||
// Instantiate XML object.
|
||||
$xml = new Xml();
|
||||
|
||||
// Find everything between our CWD and 255 in QUERY_STRING.
|
||||
$rawPath = substr(urldecode($_SERVER['QUERY_STRING']),5,255);
|
||||
|
||||
// Munge he resulting string and store it in $path.
|
||||
$path = explode('/',$rawPath);
|
||||
|
||||
// Determine incoming request and clean inputs.
|
||||
// These are common URL elements, agreed upon in revision 0.
|
||||
$clean = Array();
|
||||
$clean['updateVersion'] = isset($path[0]) ? intval($path[0]) : null;
|
||||
$clean['product'] = isset($path[1]) ? trim($path[1]) : null;
|
||||
$clean['version'] = isset($path[2]) ? urlencode($path[2]) : null;
|
||||
$clean['build'] = isset($path[3]) ? trim($path[3]) : null;
|
||||
$clean['platform'] = isset($path[4]) ? trim($path[4]) : null;
|
||||
$clean['locale'] = isset($path[5]) ? trim($path[5]) : null;
|
||||
|
||||
// For each updateVersion, we will run separate code.
|
||||
switch ($clean['updateVersion']) {
|
||||
|
||||
/*
|
||||
* This is for the second revision of the URL schema, with %CHANNEL% added.
|
||||
* /update2/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml
|
||||
*/
|
||||
case 1:
|
||||
|
||||
// Check for a set channel.
|
||||
$clean['channel'] = isset($path[6]) ? trim($path[6]) : null;
|
||||
|
||||
// Instantiate Update object and set updateVersion.
|
||||
$update = new Update();
|
||||
|
||||
// Instantiate our complete patch.
|
||||
$completePatch = new Patch($branchVersions,$nightlyChannels,'complete');
|
||||
|
||||
// Find our complete patch.
|
||||
$completePatch->findPatch($clean['product'],$clean['platform'],$clean['locale'],$clean['version'],$clean['build'],$clean['channel']);
|
||||
|
||||
// If our complete patch is valid, set the patch line.
|
||||
if ($completePatch->isPatch() && $completePatch->isNewBuild($clean['build'])) {
|
||||
|
||||
// Set our patchLine.
|
||||
$xml->setPatchLine($completePatch);
|
||||
|
||||
// If available, pull update information from the build snippet.
|
||||
// @TODO Add ability to set updateType.
|
||||
if ($completePatch->hasUpdateInfo()) {
|
||||
$update->setVersion($completePatch->updateVersion);
|
||||
$update->setExtensionVersion($completePatch->updateExtensionVersion);
|
||||
$update->setBuild($completePatch->build);
|
||||
}
|
||||
|
||||
if ($completePatch->hasDetailsUrl()) {
|
||||
$update->setDetails($completePatch->detailsUrl);
|
||||
}
|
||||
}
|
||||
|
||||
// We only check for a partial patch if the complete patch was successfully retrieved.
|
||||
if ($completePatch->isPatch()) {
|
||||
|
||||
// Instantiate our partial patch.
|
||||
$partialPatch = new Patch($branchVersions,$nightlyChannels,'partial');
|
||||
$partialPatch->findPatch($clean['product'],$clean['platform'],$clean['locale'],$clean['version'],$clean['build'],$clean['channel']);
|
||||
|
||||
// If our partial patch is valid, set the patch line.
|
||||
// We only want to deliver the partial patch if the destination build for the partial patch is equal to the build in the complete patch (which will always point to the latest).
|
||||
if ($partialPatch->isPatch() && $partialPatch->isNewBuild($clean['build']) && $partialPatch->isOneStepFromLatest($completePatch->build)) {
|
||||
$xml->setPatchLine($partialPatch);
|
||||
}
|
||||
}
|
||||
|
||||
// If we have valid patchLine(s), set up our output.
|
||||
if ($xml->hasPatchLine()) {
|
||||
$xml->startUpdate($update);
|
||||
$xml->drawPatchLines();
|
||||
$xml->endUpdate();
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* This is for the first revision of the URL schema.
|
||||
* /update2/0/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/update.xml
|
||||
*/
|
||||
case 0:
|
||||
default:
|
||||
|
||||
// Instantiate Update object and set updateVersion.
|
||||
$update = new Update();
|
||||
|
||||
// Instantiate Patch object and set Path based on passed args.
|
||||
$patch = new Patch($branchVersions,$nightlyChannels,'complete');
|
||||
|
||||
$patch->findPatch($clean['product'],$clean['platform'],$clean['locale'],$clean['version'],$clean['build'],null);
|
||||
|
||||
if ($patch->isPatch()) {
|
||||
$xml->setPatchLine($patch);
|
||||
}
|
||||
|
||||
// If we have a new build, draw the update block and patch line.
|
||||
// If there is no valid patch file, client will receive no updates by default.
|
||||
if ($xml->hasPatchLine() && $patch->isNewBuild($clean['build'])) {
|
||||
$xml->startUpdate($update);
|
||||
$xml->drawPatchLines();
|
||||
$xml->endUpdate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// If we are debugging output plaintext and exit.
|
||||
if ( defined('DEBUG') && DEBUG == true ) {
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
|
||||
echo '<head>'."\n";
|
||||
echo '<title>AUS Debug Information</title>'."\n";
|
||||
echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
echo '<h1>AUS Debug Information</h1>'."\n";
|
||||
|
||||
echo '<h2>XML Output</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
echo htmlentities($xml->getOutput());
|
||||
echo '</pre>'."\n";
|
||||
|
||||
if (!empty($clean)) {
|
||||
echo '<h2>Inputs</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
print_r($clean);
|
||||
echo '</pre>'."\n";
|
||||
}
|
||||
|
||||
echo '<h2>Patch Objects</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
if (!empty($patch)) {
|
||||
print_r($patch);
|
||||
}
|
||||
if (!empty($completePatch)) {
|
||||
print_r($completePatch);
|
||||
}
|
||||
if (!empty($partialPatch)) {
|
||||
print_r($partialPatch);
|
||||
}
|
||||
echo '</pre>'."\n";
|
||||
|
||||
if (!empty($update)) {
|
||||
echo '<h2>Update Object</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
print_r($update);
|
||||
echo '</pre>'."\n";
|
||||
}
|
||||
|
||||
echo '</body>'."\n";
|
||||
echo '</html>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set header and send info.
|
||||
// Default output will be a blank document (no updates available).
|
||||
header('Content-type: text/xml;');
|
||||
echo $xml->getOutput();
|
||||
exit;
|
||||
?>
|
||||
7
mozilla/webtools/aus/sanity/control/AUS2_Prod/Fx_1.5b1_Linux.xml
Executable file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
<update type="minor" version="1.4.1" extensionVersion="1.4.1" buildID="2005100606" >
|
||||
<patch type="complete" URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/update/complete/en-US/firefox-1.5b2.mac.mar" hashFunction="MD5" hashValue="18851d4672da119c1f77168f36031246" size="8775022"/>
|
||||
<patch type="partial" URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/update/partial/en-US/firefox-1.5b1-1.5b2.mac.mar" hashFunction="MD5" hashValue="1ec26f92ac972827082763ec1680602a" size="1112776"/>
|
||||
</update>
|
||||
</updates>
|
||||
7
mozilla/webtools/aus/sanity/control/AUS2_Prod/Fx_1.5b1_Mac.xml
Executable file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
<update type="minor" version="1.4.1" extensionVersion="1.4.1" buildID="2005100604" >
|
||||
<patch type="complete" URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/update/complete/en-US/firefox-1.5b2.linux-i686.mar" hashFunction="SHA1" hashValue="57ce3fab1b25906a59d1962bdc4a3d56db5ca3e8" size="7948446"/>
|
||||
<patch type="partial" URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/update/partial/en-US/firefox-1.5b1-1.5b2.linux-i686.mar" hashFunction="SHA1" hashValue="f386ef102b7723f417ca7d250bd460321478ae21" size="781040"/>
|
||||
</update>
|
||||
</updates>
|
||||
7
mozilla/webtools/aus/sanity/control/AUS2_Prod/Fx_1.5b1_Win.xml
Executable file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
<update type="minor" version="1.4.1" extensionVersion="1.4.1" buildID="2005100614" >
|
||||
<patch type="complete" URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/update/complete/en-US/firefox-1.5b2.win32.mar" hashFunction="SHA1" hashValue="b7ed4485e991b2e19c5d57757ace4a5fd8311db9" size="6306511"/>
|
||||
<patch type="partial" URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5b2/update/partial/en-US/firefox-1.5b1-1.5b2.win32.mar" hashFunction="SHA1" hashValue="e8c61fa7523a34cd8cb5b395e73f5c411ca1a941" size="801010"/>
|
||||
</update>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Fx_1.5b2_Linux.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Fx_1.5b2_Mac.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Fx_1.5b2_Win.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Tb_1.5b1_Linux.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Tb_1.5b1_Mac.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Tb_1.5b1_Win.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Tb_1.5b2_Linux.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Tb_1.5b2_Mac.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
3
mozilla/webtools/aus/sanity/control/AUS2_Prod/Tb_1.5b2_Win.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<updates>
|
||||
</updates>
|
||||
241
mozilla/webtools/aus/sanity/index.php
Normal file
@@ -0,0 +1,241 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* AUS sanity check intro page.
|
||||
*
|
||||
* @package aus
|
||||
* @subpackage sanity
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
|
||||
// Read .ini file for config options.
|
||||
$config = parse_ini_file('./sanity.ini',true);
|
||||
|
||||
// Include common functions.
|
||||
require_once('./sanity.inc.php');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Redirect to log or reports if they have been requested.
|
||||
*/
|
||||
if (!empty($_POST['redirect'])) {
|
||||
$path = (isset($_POST['logs'])) ? './log/' : './reports/';
|
||||
header('Location: '.$path.$_POST['redirect']);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Regenerate control files.
|
||||
*/
|
||||
if (!empty($_POST['control']) && !empty($_POST['controlName'])) {
|
||||
|
||||
// Set destination directory.
|
||||
$dir = $config['sources']['controlFiles'].str_replace(' ','_',$_POST['controlName']);
|
||||
|
||||
// If this directory does not exist, create it.
|
||||
if (!is_dir($dir)) {
|
||||
mkdir($dir);
|
||||
}
|
||||
|
||||
$msg = array('Added control files successfully...');
|
||||
|
||||
// For each test case, grab and store results.
|
||||
foreach ($config['testCases'] as $name=>$url) {
|
||||
$result = trim(file_get_contents($_POST['control'].$url));
|
||||
$file = $dir.'/'.str_replace(' ','_',$name).'.xml';
|
||||
write($file,$result);
|
||||
$msg[] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Read log and reports directories.
|
||||
*/
|
||||
|
||||
// Gather possible options for controls.
|
||||
$controls_select = '';
|
||||
$controls = ls($config['sources']['controlFiles'],'/^[^.].*/');
|
||||
foreach ($controls as $dir) {
|
||||
$controls_select .= '<option value="'.$dir.'">'.$dir.'</option>'."\n";
|
||||
}
|
||||
|
||||
// Gather possible targets for select list.
|
||||
$targets_select = '';
|
||||
if (!empty($config['targets']) && is_array($config['targets'])) {
|
||||
foreach ($config['targets'] as $name=>$val) {
|
||||
$targets_select .= '<option value="'.$val.'">'.$name.'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
// Log files from the log directory defined in our config.
|
||||
$logs_select = '';
|
||||
$logs = ls($config['sources']['log'],'/^.*log$/','asc');
|
||||
foreach ($logs as $filename) {
|
||||
$buf = explode('.',$filename);
|
||||
$readable = timify($buf[0]);
|
||||
$logs_select .= '<option value="'.$filename.'">'.$readable.'</option>'."\n";
|
||||
}
|
||||
|
||||
// HTML Reports from the reports directory defined in our config.
|
||||
$reports_select = '';
|
||||
$reports = ls($config['sources']['reports'],'/^.*html$/','asc');
|
||||
foreach ($reports as $filename) {
|
||||
$buf = explode('.',$filename);
|
||||
$readable = timify($buf[0],false);
|
||||
$reports_select .= '<option value="'.$filename.'">'.$readable.'</option>'."\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate HTML.
|
||||
*/
|
||||
$html = '';
|
||||
$html .= <<<HEADER
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>AUS Regression Tests :: mozilla.org</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<meta name="rating" content="General"/>
|
||||
<meta name="robots" content="All"/>
|
||||
<style type="text/css">
|
||||
.control { display: block; float: left; width: 15em; }
|
||||
.test { display: block; float: left; width: 8em; }
|
||||
.msg { color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>AUS Regression Testing</h1>
|
||||
<p>All tests use the defined test cases in <kbd>sanity.ini</kbd>.</p>
|
||||
HEADER;
|
||||
|
||||
// Messages, if any.
|
||||
if (!empty($msg) && is_array($msg)) {
|
||||
$html .= '<ul class="msg">'."\n";
|
||||
foreach ($msg as $li) {
|
||||
$html .= '<li>'.$li.'</li>'."\n";
|
||||
}
|
||||
$html .= '</ul>'."\n";
|
||||
}
|
||||
|
||||
$html .= <<<PAGE
|
||||
<h2>Run a New Test</h2>
|
||||
<p>To begin a test, choose a <kbd>Control</kbd> and a <kbd>Target</kbd> then hit
|
||||
<kbd>Begin Test</kbd>. You will be redirected to a static HTML report.</p>
|
||||
<form action="./sanity.php" method="post">
|
||||
<div>
|
||||
<label for="testControl" class="test">Control</label>
|
||||
<select name="testControl" id="testControl">
|
||||
{$controls_select}
|
||||
</select>
|
||||
</div><br/>
|
||||
<fieldset>
|
||||
<legend>Target</legend>
|
||||
<div>
|
||||
<label for="testTarget" class="test">Defined Target</label>
|
||||
<select name="testTarget" id="testTarget">
|
||||
{$targets_select}
|
||||
</select>
|
||||
</div>
|
||||
<p>-- OR --</p>
|
||||
<div>
|
||||
<label for="testTargetOverride" class="test">Custom Target</label>
|
||||
<input type="text" name="testTargetOverride" id="testTargetOverride" value="" size="77"/>
|
||||
</div>
|
||||
<p><em>Note:</em> If a <kbd>Custom Target</kbd> is defined, it will override any selected <kbd>Defined Targets</kbd>.</p>
|
||||
</fieldset><br/>
|
||||
<div>
|
||||
<input type="submit" name="submit" value="Begin Test »"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h2>Generate New Control Files</h2>
|
||||
<form action="./" method="post">
|
||||
<div>
|
||||
<label for="controlName" class="control">Name of control source</label>
|
||||
<input type="text" name="controlName" id="controlName" value="{$config['defaults']['controlName']}" size="77"/>
|
||||
<input type="hidden" name="action" value="control" />
|
||||
</div><br/>
|
||||
<div>
|
||||
<label for="control" class="control">Location of control source</label>
|
||||
<input type="text" name="control" id="control" value="{$config['defaults']['control']}" size="77"/>
|
||||
</div><br/>
|
||||
<div>
|
||||
<input type="submit" name="submit" value="Generate New Control Files »"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h2>Logs & Reports</h2>
|
||||
<form action="./" method="post">
|
||||
<h3>Logs</h3>
|
||||
<div>
|
||||
<select name="redirect" id="logs">
|
||||
{$logs_select}
|
||||
</select>
|
||||
<input type="submit" name="logs" value="View Log »"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h3>Reports</h3>
|
||||
<form action="./" method="post">
|
||||
<div>
|
||||
<select name="redirect" id="reports">
|
||||
{$reports_select}
|
||||
</select>
|
||||
<input type="submit" name="reports" value="View Report »"/>
|
||||
</div>
|
||||
</form>
|
||||
PAGE;
|
||||
|
||||
$html .= <<<FOOTER
|
||||
</body>
|
||||
</html>
|
||||
FOOTER;
|
||||
|
||||
echo $html;
|
||||
?>
|
||||
106
mozilla/webtools/aus/sanity/sanity.inc.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Common functions
|
||||
*
|
||||
* @package aus
|
||||
* @subpackage sanity
|
||||
*/
|
||||
|
||||
/**
|
||||
* Read a directory and return a sorted array of its contents.
|
||||
* @string $dir path to directory
|
||||
* @string $pattern pattern matching valid filenames
|
||||
* @return array
|
||||
*/
|
||||
function ls($dir,$pattern, $sort='desc') {
|
||||
$files = array();
|
||||
$fp = opendir($dir);
|
||||
while (false !== ($filename = readdir($fp))) {
|
||||
if (preg_match($pattern,$filename)) {
|
||||
$files[] = $filename;
|
||||
}
|
||||
}
|
||||
closedir($fp);
|
||||
|
||||
if ($sort=='asc') {
|
||||
rsort($files);
|
||||
} else {
|
||||
sort($files);
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a string to a file.
|
||||
* @string $file file
|
||||
* @string $string string
|
||||
*/
|
||||
function write($file,$string) {
|
||||
if ($fp = fopen($file,'w')) {
|
||||
fwrite($fp,$string);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date.
|
||||
* @param string $datestring
|
||||
* @param boolean $fuzzy
|
||||
* @return string
|
||||
*/
|
||||
function timify($datestring,$fuzzy=true) {
|
||||
$year = substr($datestring,0,4);
|
||||
$month = substr($datestring,4,2);
|
||||
$day = substr($datestring,6,2);
|
||||
|
||||
if (!$fuzzy) {
|
||||
$hour = substr($datestring,8,2);
|
||||
$minute = substr($datestring,10,2);
|
||||
$second = substr($datestring,12,2);
|
||||
|
||||
return date( 'D F j, Y, g:i a', mktime($hour, $minute, $second, $month, $day, $year));
|
||||
} else {
|
||||
|
||||
return date( 'D F j, Y', mktime(0, 0, 0, $month, $day, $year));
|
||||
}
|
||||
}
|
||||
?>
|
||||
85
mozilla/webtools/aus/sanity/sanity.ini
Normal file
@@ -0,0 +1,85 @@
|
||||
; ***** BEGIN LICENSE BLOCK *****
|
||||
;
|
||||
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
;
|
||||
; The contents of this file are subject to the Mozilla Public License Version
|
||||
; 1.1 (the "License"); you may not use this file except in compliance with
|
||||
; the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS" basis,
|
||||
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
; for the specific language governing rights and limitations under the
|
||||
; License.
|
||||
;
|
||||
; The Original Code is AUS.
|
||||
;
|
||||
; The Initial Developer of the Original Code is Mike Morgan.
|
||||
;
|
||||
; Portions created by the Initial Developer are Copyright (C) 2006
|
||||
; the Initial Developer. All Rights Reserved.
|
||||
;
|
||||
; Contributor(s):
|
||||
; Mike Morgan <morgamic@mozilla.com>
|
||||
;
|
||||
; Alternatively, the contents of this file may be used under the terms of
|
||||
; either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
; in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
; of those above. If you wish to allow use of your version of this file only
|
||||
; under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
; use your version of this file under the terms of the MPL, indicate your
|
||||
; decision by deleting the provisions above and replace them with the notice
|
||||
; and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
; the provisions above, a recipient may use your version of this file under
|
||||
; the terms of any one of the MPL, the GPL or the LGPL.
|
||||
;
|
||||
; ***** END LICENSE BLOCK *****
|
||||
;
|
||||
; This file defines test cases for AUS.
|
||||
;
|
||||
; Each test case is a URL. Examples:
|
||||
; [testCases]
|
||||
; FooBar = 1/Firefox/1.4/2005090806/Darwin_ppc-gcc3/en-US/beta/update.xml
|
||||
; FOOTOO = 1/Firefox/1.4/2005090806/WINNT_x86-msvc/en-US/beta/update.xml
|
||||
; Zoinks! = 1/Firefox/1.4/2005090805/Linux_x86-gcc3/en-US/beta/update.xml
|
||||
;
|
||||
; The test names lead the test script to look in [files]/testname.xml for the
|
||||
; control source.
|
||||
;
|
||||
; NOTE: Test names with spaces will be written to files with '_'. Example:
|
||||
; Foo Foo Test -> [files]/Foo_Foo_Test.xml
|
||||
;
|
||||
; The test script tests output between a control and a new version of AUS.
|
||||
;
|
||||
; By comparing output, we can test for regressions.
|
||||
;
|
||||
; Explanations for these test-case parameters can be found at:
|
||||
; https://intranet.mozilla.org/AUS:Version2:Test_Cases
|
||||
;
|
||||
;
|
||||
[defaults]
|
||||
control = https://aus2.mozilla.org/update/
|
||||
controlName = AUS2_Prod
|
||||
target = https://aus2-staging.mozilla.org:8711/update/
|
||||
|
||||
[targets]
|
||||
AUS2 Staging = https://aus2-staging.mozilla.org:8711/update/
|
||||
AUS2 Dev = https://aus2-dev.mozilla.org:7777/update/
|
||||
AUS2 Production = https://aus2.mozilla.org/update/
|
||||
morgamic's Patch = "https://update-staging.mozilla.org/~morgamic/aus/update/"
|
||||
|
||||
[sources]
|
||||
controlFiles = /home/morgamic/public_html/sanity/control/
|
||||
reports = /home/morgamic/public_html/sanity/reports/
|
||||
log = /home/morgamic/public_html/sanity/log/
|
||||
|
||||
[testCases]
|
||||
Fx 1.5.0.3 Mac Univ = 1/Firefox/1.5.0.3/2006042618/Darwin_Universal-gcc3/en-US/releasetest/update.xml
|
||||
Fx 3.0a1 Mac PPC 1-off = 1/Firefox/3.0a1/2006052405/Darwin_ppc-gcc3/en-US/nightly/update.xml
|
||||
Fx 3.0a1 Win 1-off = 1/Firefox/3.0a1/2006052404/WINNT_x86-msvc/en-US/nightly/update.xml
|
||||
Fx 3.0a1 Linux 1-off = 1/Firefox/3.0a1/2006052404/Linux_x86-gcc3/en-US/nightly/update.xml
|
||||
Fx 3.0a1 Mac PPC 3-off = 1/Firefox/3.0a1/2006052204/Darwin_ppc-gcc3/en-US/nightly/update.xml
|
||||
Fx 3.0a1 Win 3-off = 1/Firefox/3.0a1/2006052205/WINNT_x86-msvc/en-US/nightly/update.xml
|
||||
Fx 3.0a1 Linux 3-off = 1/Firefox/3.0a1/2006052204/Linux_x86-gcc3/en-US/nightly/update.xml
|
||||
|
||||
216
mozilla/webtools/aus/sanity/sanity.php
Normal file
@@ -0,0 +1,216 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* AUS sanity check.
|
||||
*
|
||||
* @package aus
|
||||
* @subpackage sanity
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
|
||||
/**
|
||||
* Process test cases and config file.
|
||||
*/
|
||||
$config = parse_ini_file('./sanity.ini',true);
|
||||
|
||||
// Variables.
|
||||
$results = array(); // Results array.
|
||||
$count = 1; // Test count.
|
||||
$filename = date('YmdHis'); // Date-based filename for log and report file.
|
||||
|
||||
// For each test case, compare output and store results.
|
||||
foreach ($config['testCases'] as $name=>$url) {
|
||||
$time = date('r'); // Time of actual test.
|
||||
|
||||
$control = (!empty($_POST['testControl'])) ? $config['sources']['controlFiles'].$_POST['testControl'].'/'.str_replace(' ','_',$name).'.xml' : $config['sources']['controlFiles'].$config['defaults']['controlName'].'/'.str_replace(' ','_',$name).'.xml';
|
||||
|
||||
$target = (!empty($_POST['testTargetOverride'])) ? $_POST['testTargetOverride'].$url : ((!empty($_POST['testTarget'])) ? $_POST['testTarget'].$url : $config['defaults']['target'].$url);
|
||||
|
||||
$controlResult = trim(file_get_contents($control));
|
||||
$targetResult = trim(file_get_contents($target));
|
||||
|
||||
|
||||
// @TODO Would be nice to diff this instead.
|
||||
// There is a PHP implementation of diff, might try that, time allowing:
|
||||
// http://pear.php.net/package/Text_Diff
|
||||
if ($controlResult == $targetResult) {
|
||||
$result = 'OK';
|
||||
} else {
|
||||
$result = 'FAILED';
|
||||
}
|
||||
|
||||
// Store results.
|
||||
$results[] = array(
|
||||
'count' => $count,
|
||||
'name' => $name,
|
||||
'result' => $result,
|
||||
'controlResult' => $controlResult,
|
||||
'controlURL' => $control,
|
||||
'targetResult' => $targetResult,
|
||||
'targetURL' => $target.$url,
|
||||
'url' => $url,
|
||||
'time' => $time
|
||||
);
|
||||
|
||||
// If using the CLI, output to STDOUT.
|
||||
if (empty($_SERVER['HTTP_HOST'])) {
|
||||
if ($count == 1) {
|
||||
echo 'AUS Regression Test Started '.date('YmdHis').' ...'."\n";
|
||||
}
|
||||
echo "{$count} {$name} {$time} {$result} {$url}\n";
|
||||
}
|
||||
|
||||
$count++;
|
||||
}
|
||||
|
||||
if (empty($_SERVER['HTTP_HOST'])) {
|
||||
echo 'Test Completed. See ./log/'.date('Ymd').'.log for more information, or ./reports/'.date('YmdHis').'.html for an HTML report.'."\n\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate HTML for display/write.
|
||||
*/
|
||||
$html = '';
|
||||
$html .= <<<HEADER
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>AUS Regression Tests :: mozilla.org</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<meta name="rating" content="General"/>
|
||||
<meta name="robots" content="All"/>
|
||||
<style type="text/css" media="all">
|
||||
table { border: 1px solid #666; }
|
||||
td { border: 1px solid #666; white-space: nowrap; }
|
||||
td.xml { white-space: normal; }
|
||||
th { font-weight: bold; background-color: #999; white-space: nowrap; }
|
||||
.row1 { background-color: #ccc; }
|
||||
.row2 { background-color: #eee; }
|
||||
.OK { background-color: #9f9; }
|
||||
.FAILED { background-color: #f99; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Regression Test Results</h1>
|
||||
HEADER;
|
||||
|
||||
$html .= <<<TABLETOP
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th nowrap="nowrap">Test Name</th>
|
||||
<th nowrap="nowrap">Time</th>
|
||||
<th nowrap="nowrap">Test Result</th>
|
||||
<th nowrap="nowrap">Params</th>
|
||||
<th nowrap="nowrap">Control ({$control})</th>
|
||||
<th nowrap="nowrap">Result ({$target})</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
TABLETOP;
|
||||
|
||||
foreach ($results as $row) {
|
||||
$controlResultHTML = htmlentities($row['controlResult']);
|
||||
$targetResultHTML = htmlentities($row['targetResult']);
|
||||
|
||||
$class = $row['count']%2;
|
||||
|
||||
|
||||
$html .= <<<TABLEROW
|
||||
<tr class="row{$class}">
|
||||
<td>{$row['count']}</td>
|
||||
<td>{$row['name']}</td>
|
||||
<td>{$row['time']}</td>
|
||||
<td class="{$row['result']}">{$row['result']}</td>
|
||||
<td>{$row['url']}</td>
|
||||
<td class="xml"><pre>{$controlResultHTML}</pre></td>
|
||||
<td class="xml"><pre>{$targetResultHTML}</pre></td>
|
||||
</tr>
|
||||
TABLEROW;
|
||||
}
|
||||
|
||||
$html .= <<<TABLEBOTTOM
|
||||
</tbody>
|
||||
</table>
|
||||
TABLEBOTTOM;
|
||||
|
||||
$html .= <<<FOOTER
|
||||
</body>
|
||||
</html>
|
||||
FOOTER;
|
||||
|
||||
// Write HTML report file.
|
||||
$fp = fopen('./reports/'.$filename.'.html','w+');
|
||||
fwrite($fp, $html);
|
||||
fclose($fp);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Store all results to log file in ./log directory.
|
||||
* Log filenames are date-based.
|
||||
*/
|
||||
$log = '';
|
||||
foreach ($results as $row) {
|
||||
$log .= <<<LINE
|
||||
{$row['count']} {$row['name']} {$row['time']} {$row['result']} {$row['url']}
|
||||
|
||||
LINE;
|
||||
}
|
||||
|
||||
// Write the log file.
|
||||
// Log files will be written per-day.
|
||||
$fp = fopen('./log/'.date('Ymd').'.log', 'a');
|
||||
fwrite($fp, $log);
|
||||
fclose($fp);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* If the request is over HTTP, redirect to HTML report.
|
||||
*/
|
||||
if (!empty($_SERVER['HTTP_HOST']) && !empty($_POST['submit'])) {
|
||||
header('Location: ./reports/'.$filename.'.html');
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
14
mozilla/webtools/aus/xml/README
Normal file
@@ -0,0 +1,14 @@
|
||||
AUS Lite
|
||||
--------
|
||||
Great taste, less filling. (tm)
|
||||
|
||||
Installation
|
||||
------------
|
||||
Copy ./inc/config-dist.php to ./inc/config.php. Configure it properly following the comments.
|
||||
Set up the ./data symlink to point to the right location (/opt/aus2/incoming, for example).
|
||||
Referencing ./ with the right parameters will get you the correct XML file.
|
||||
|
||||
NOTE: source files must follow a naming convention:
|
||||
SOURCE_DIR/[product]/[platform]/[locale].txt
|
||||
|
||||
NOTE: adjust the .htaccess file's RewriteBase if you are having problems.
|
||||
8
mozilla/webtools/aus/xml/htaccess.dist
Normal file
@@ -0,0 +1,8 @@
|
||||
# TODO: Replace this with something simpler (Alias).
|
||||
# TODO: Then use PHP to parse path using pathinfo() instead.
|
||||
RewriteEngine On
|
||||
RewriteBase /~morgamic/aus
|
||||
RewriteRule ^update2/(.*)$ index.php?path=$1
|
||||
RewriteRule ^update/(.*)$ index.php?path=$1
|
||||
php_value error_reporting 2047
|
||||
php_value display_errors 1
|
||||
68
mozilla/webtools/aus/xml/inc/aus.class.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Generic class definition for all AUS objects.
|
||||
*
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
class AUS_Object {
|
||||
|
||||
function AUS_Object() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an object parameter.
|
||||
* @param string $key
|
||||
* @param mixed $val
|
||||
* @param bool $overwrite
|
||||
* @return boolean
|
||||
*/
|
||||
function setVar($key,$val,$overwrite=false) {
|
||||
if (!isset($this->$key) || (isset($this->$key) && $overwrite)) {
|
||||
$this->$key = $val;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
88
mozilla/webtools/aus/xml/inc/config-dist.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Configuration file.
|
||||
* @package auslite
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
// define('SOURCE_DIR','/home/morgamic/public_html/auslite/source');
|
||||
define('SOURCE_DIR',getcwd().'/data');
|
||||
|
||||
// This is the directory containin channel-specific updates.
|
||||
// Snippets in this directory override normal updates.
|
||||
define('OVERRIDE_DIR',getcwd().'/data/3');
|
||||
|
||||
// Uncomment this line in order to echo text debug information.
|
||||
define('DEBUG',false);
|
||||
|
||||
// Define default for Update blocks.
|
||||
define('UPDATE_TYPE','minor');
|
||||
define('UPDATE_VERSION','1.0+');
|
||||
define('UPDATE_EXTENSION_VERSION','1.0+');
|
||||
|
||||
// These are channels that have access to nightly updates.
|
||||
// All other channels only have access to the OVERRIDE_DIR for update info.
|
||||
$nightlyChannels = array(
|
||||
'nightly'
|
||||
);
|
||||
|
||||
// This hash defines the version->patch relationships.
|
||||
// It determines which patches are associated to which incoming client versions.
|
||||
// @todo replace this with a better datasource that can be easily managed via a GUI.
|
||||
$branchVersions = array(
|
||||
'1.0+' => '1.5',
|
||||
'1.4' => '1.5',
|
||||
'1.4.1'=> '1.5',
|
||||
'1.5' => '1.5',
|
||||
'1.5.0.1' => '1.5.0.1',
|
||||
'1.5.0.2' => '1.5.0.2',
|
||||
'1.5.0.3' => '1.5.0.3',
|
||||
'1.5.0.4' => '1.5.0.4',
|
||||
'1.6a1'=> 'trunk',
|
||||
'2.0'=>'2.0',
|
||||
'2.0a1'=>'2.0',
|
||||
'2.0a2'=>'2.0',
|
||||
'2.0b1'=>'2.0',
|
||||
'2.0b2'=>'2.0',
|
||||
'2.0a3'=>'2.0',
|
||||
'3.0a1'=>'trunk'
|
||||
);
|
||||
?>
|
||||
56
mozilla/webtools/aus/xml/inc/init.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* Initialization script.
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*
|
||||
* This script reads config and includes core libraries.
|
||||
* At no point should this ever output or modify data.
|
||||
*/
|
||||
ini_set('display_errors',1);
|
||||
ini_set('error_reporting',E_ALL);
|
||||
require_once('config.php'); // Read config file.
|
||||
require_once('aus.class.php'); // Generic object definition.
|
||||
require_once('xml.class.php'); // XML class for output generation.
|
||||
require_once('update.class.php'); // Update class for each update.
|
||||
require_once('patch.class.php'); // Patch class for update patches.
|
||||
?>
|
||||
331
mozilla/webtools/aus/xml/inc/patch.class.php
Normal file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* AUS Patch class.
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*
|
||||
* This class is for handling patch objects.
|
||||
* These carry relevant information about partial or complete patches.
|
||||
*/
|
||||
class Patch extends AUS_Object {
|
||||
|
||||
// Patch metadata.
|
||||
var $type;
|
||||
var $url;
|
||||
var $hashFunction;
|
||||
var $hashValue;
|
||||
var $size;
|
||||
var $build;
|
||||
|
||||
// Array that maps versions onto their respective branches.
|
||||
var $branchVersions;
|
||||
|
||||
// Array the defines which channels are flagged as 'nightly' channels.
|
||||
var $nightlyChannels;
|
||||
|
||||
// Valid patch flag.
|
||||
var $isPatch;
|
||||
|
||||
// Is this patch a complete or partial patch?
|
||||
var $patchType;
|
||||
|
||||
// Update metadata, read from patch file.
|
||||
var $updateType;
|
||||
var $updateVersion;
|
||||
var $updateExtensionVersion;
|
||||
|
||||
// Do we have Update metadata information?
|
||||
var $hasUpdateInfo;
|
||||
var $hasDetailsUrl;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function Patch($branchVersions=array(),$nightlyChannels,$type='complete') {
|
||||
$this->setBranchVersions($branchVersions);
|
||||
$this->setNightlyChannels($nightlyChannels);
|
||||
$this->setVar('isPatch',false);
|
||||
$this->setVar('patchType',$type);
|
||||
$this->setVar('hasUpdateInfo',false);
|
||||
$this->setVar('hasDetailsUrl',false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the filepath for the snippet based on product/platform/locale and
|
||||
* SOURCE_DIR, which is set in config.
|
||||
*
|
||||
* @param string $product
|
||||
* @param string $platform
|
||||
* @param string $locale
|
||||
* @param string $version
|
||||
* @param string $build
|
||||
* @param string $buildSource
|
||||
* @param string $channel
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function setPath ($product,$platform,$locale,$version=null,$build,$buildSource,$channel) {
|
||||
switch($buildSource) {
|
||||
case 3:
|
||||
return $this->setVar('path',OVERRIDE_DIR.'/'.$product.'/'.$version.'/'.$platform.'/'.$build.'/'.$locale.'/'.$channel.'/'.$this->patchType.'.txt',true);
|
||||
break;
|
||||
case 2:
|
||||
return $this->setVar('path',SOURCE_DIR.'/'.$buildSource.'/'.$product.'/'.$version.'/'.$platform.'/'.$build.'/'.$locale.'/'.$this->patchType.'.txt',true);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the given file and store its contents in our Patch object.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function setSnippet ($path) {
|
||||
if ($file = explode("\n",file_get_contents($path,true))) {
|
||||
$this->setVar('type',$file[0]);
|
||||
$this->setVar('url',$file[1]);
|
||||
$this->setVar('hashFunction',$file[2]);
|
||||
$this->setVar('hashValue',$file[3]);
|
||||
$this->setVar('size',$file[4]);
|
||||
$this->setVar('build',$file[5]);
|
||||
|
||||
// Attempt to read update information.
|
||||
// @TODO Add ability to set updateType, once it exists in the build snippet.
|
||||
if ($this->isComplete() && isset($file[6]) && isset($file[7])) {
|
||||
$this->setVar('updateVersion',$file[6],true);
|
||||
$this->setVar('updateExtensionVersion',$file[7],true);
|
||||
$this->setVar('hasUpdateInfo',true,true);
|
||||
}
|
||||
|
||||
if ($this->isComplete() && isset($file[8])) {
|
||||
$this->setVar('detailsUrl',$file[8],true);
|
||||
$this->setVar('hasDetailsUrl',true,true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to read and parse the designated source file.
|
||||
* How and where the file is read depends on the client version.
|
||||
*
|
||||
* For more information on why this is a little complicated, see:
|
||||
* https://intranet.mozilla.org/AUS:Version2:Roadmap:Multibranch
|
||||
*
|
||||
* @param string $product
|
||||
* @param string $platform
|
||||
* @param string $locale
|
||||
* @param string $version
|
||||
* @param string $build
|
||||
* @param string $channel
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function findPatch($product,$platform,$locale,$version,$build,$channel=null) {
|
||||
|
||||
// Determine the branch of the client's version.
|
||||
$branchVersion = $this->getBranch($version);
|
||||
|
||||
// If a specific update exists for the specified channel, it takes priority over the branch update.
|
||||
if (!empty($channel) && $this->setPath($product,$platform,$locale,$branchVersion,$build,3,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Otherwise, if it is a complete patch and a nightly channel, force the complete update to take the user to the latest build.
|
||||
elseif ($this->isComplete() && $this->isNightlyChannel($channel)) {
|
||||
|
||||
// Get the latest build for this branch.
|
||||
$latestbuild = $this->getLatestBuild($product,$branchVersion,$platform);
|
||||
|
||||
if ($this->setPath($product,$platform,$locale,$branchVersion,$latestbuild,2,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Otherwise, check for the partial snippet info. If an update exists, pass it along.
|
||||
elseif ($this->isNightlyChannel($channel) && $this->setPath($product,$platform,$locale,$branchVersion,$build,2,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Note: Other data sets were made obsolete in 0.6. May incoming/0,1 rest in peace.
|
||||
|
||||
// If we get here, we know for sure that no updates exist for the current request..
|
||||
// Return false by default, which prompts the "no updates" XML output.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare passed build to build in snippet.
|
||||
* Returns true if the snippet build is newer than the client build.
|
||||
*
|
||||
* @param string $build
|
||||
* @return boolean
|
||||
*/
|
||||
function isNewBuild($build) {
|
||||
return ($this->build>$build) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the branch versions array.
|
||||
*
|
||||
* @param array $branchVersions
|
||||
* @return boolean
|
||||
*/
|
||||
function setBranchVersions($branchVersions) {
|
||||
return $this->setVar('branchVersions',$branchVersions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the nightly channels array.
|
||||
*
|
||||
* @param array $branchVersions
|
||||
* @return boolean
|
||||
*/
|
||||
function setNightlyChannels($nightlyChannels) {
|
||||
return $this->setVar('nightlyChannels',$nightlyChannels);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not the given channel is flagged as nightly.
|
||||
*
|
||||
* @param string $channel
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isNightlyChannel($channel) {
|
||||
return in_array($channel,$this->nightlyChannels);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether or not the incoming version is a product BRANCH.
|
||||
*
|
||||
* @param string $version
|
||||
* @return string|false
|
||||
*/
|
||||
function getBranch($version) {
|
||||
return (isset($this->branchVersions[$version])) ? $this->branchVersions[$version] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not something is Trunk.
|
||||
*
|
||||
* @param string $version
|
||||
* @return boolean
|
||||
*/
|
||||
function isTrunk($version) {
|
||||
return ($version == 'trunk') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this object contain a valid patch file?
|
||||
*/
|
||||
function isPatch() {
|
||||
return $this->isPatch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not this patch is complete.
|
||||
*/
|
||||
function isComplete() {
|
||||
return ($this->patchType === 'complete') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not this patch has a details URL.
|
||||
*/
|
||||
function hasDetailsUrl() {
|
||||
return $this->hasDetailsUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not this patch has update information.
|
||||
*/
|
||||
function hasUpdateInfo() {
|
||||
return $this->hasUpdateInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether or not the to_build matches the latest build for a partial patch.
|
||||
* @param string $build
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isOneStepFromLatest($build) {
|
||||
return ($this->build == $build) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest build for this branch.
|
||||
* @param string $product
|
||||
* @param string $branchVersion
|
||||
* @param string $platform
|
||||
*/
|
||||
function getLatestBuild($product,$branchVersion,$platform) {
|
||||
$files = array();
|
||||
$fp = opendir(SOURCE_DIR.'/2/'.$product.'/'.$branchVersion.'/'.$platform);
|
||||
while (false !== ($filename = readdir($fp))) {
|
||||
if ($filename!='.' && $filename!='..') {
|
||||
$files[] = $filename;
|
||||
}
|
||||
}
|
||||
closedir($fp);
|
||||
|
||||
rsort($files,SORT_NUMERIC);
|
||||
|
||||
return $files[1];
|
||||
}
|
||||
}
|
||||
?>
|
||||
124
mozilla/webtools/aus/xml/inc/update.class.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
class Update extends AUS_Object {
|
||||
var $type;
|
||||
var $version;
|
||||
var $extensionVersion;
|
||||
var $build;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
function Update($type=UPDATE_TYPE,$version=UPDATE_VERSION,$extensionVersion=UPDATE_EXTENSION_VERSION) {
|
||||
$this->setType($type);
|
||||
$this->setVersion($version);
|
||||
$this->setExtensionVersion($extensionVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set type.
|
||||
* @param string $type
|
||||
*/
|
||||
function setType($type) {
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set verison.
|
||||
* @param string $type
|
||||
*/
|
||||
function setVersion($version) {
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set extensionVersion.
|
||||
* @param string $extensionVersion
|
||||
*/
|
||||
function setExtensionVersion($extensionVersion) {
|
||||
$this->extensionVersion = $extensionVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the build.
|
||||
* @param string $build
|
||||
*/
|
||||
function setBuild($build) {
|
||||
return $this->setVar('build',$build);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the details URL.
|
||||
* @param string $details
|
||||
*/
|
||||
function setDetails($details) {
|
||||
return $this->setVar('details',$details);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type.
|
||||
* @return string
|
||||
*/
|
||||
function getType() {
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version.
|
||||
* @return string
|
||||
*/
|
||||
function getVersion() {
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extension version.
|
||||
* @return string
|
||||
*/
|
||||
function getExtensionVersion() {
|
||||
return $this->extensionVersion;
|
||||
}
|
||||
}
|
||||
?>
|
||||
143
mozilla/webtools/aus/xml/inc/xml.class.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* @package aus
|
||||
* @subpackage inc
|
||||
* @author Mike Morgan
|
||||
*/
|
||||
class Xml extends AUS_Object {
|
||||
var $xmlOutput;
|
||||
var $xmlHeader;
|
||||
var $xmlFooter;
|
||||
var $xmlPatchLines;
|
||||
|
||||
/**
|
||||
* Constructor, sets overall header and footer.
|
||||
*/
|
||||
function Xml() {
|
||||
$this->xmlHeader = '<?xml version="1.0"?>'."\n".'<updates>';
|
||||
$this->xmlFooter = "\n".'</updates>';
|
||||
$this->xmlOutput = $this->xmlHeader;
|
||||
$this->xmlPatchLines = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Start an update block.
|
||||
* @param object $update
|
||||
*/
|
||||
function startUpdate($update) {
|
||||
$type = htmlentities($update->type);
|
||||
$version = htmlentities($update->version);
|
||||
$extensionVersion = htmlentities($update->extensionVersion);
|
||||
$build = htmlentities($update->build);
|
||||
$details = htmlentities($update->details);
|
||||
|
||||
$details_xml = "";
|
||||
if (strlen($details) > 0) {
|
||||
$details_xml = " detailsURL=\"{$details}\"";
|
||||
}
|
||||
|
||||
$this->xmlOutput .= <<<startUpdate
|
||||
|
||||
<update type="{$type}" version="{$version}" extensionVersion="{$extensionVersion}" buildID="{$build}" {$details_xml}>
|
||||
startUpdate;
|
||||
|
||||
/**
|
||||
* @TODO Add buildID attribute to <update> element.
|
||||
*
|
||||
* Right now it is pending QA on the client side, so we will leave it
|
||||
* out for now.
|
||||
*
|
||||
* buildID="{$build}"
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a patch line. This pulls info from a patch object.
|
||||
* @param object $patch
|
||||
*/
|
||||
function setPatchLine($patch) {
|
||||
$type = htmlentities($patch->type);
|
||||
$url = htmlentities($patch->url);
|
||||
$hashFunction = htmlentities($patch->hashFunction);
|
||||
$hashValue = htmlentities($patch->hashValue);
|
||||
$size = htmlentities($patch->size);
|
||||
|
||||
$this->xmlPatchLines .= <<<patchLine
|
||||
|
||||
<patch type="{$type}" URL="{$url}" hashFunction="{$hashFunction}" hashValue="{$hashValue}" size="{$size}"/>
|
||||
patchLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether or not patchLines have been set.
|
||||
* @return bool
|
||||
*/
|
||||
function hasPatchLine() {
|
||||
return (empty($this->xmlPatchLines)) ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* End an update block.
|
||||
*/
|
||||
function endUpdate() {
|
||||
$this->xmlOutput .= <<<endUpdate
|
||||
|
||||
</update>
|
||||
endUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add patchLines to output.
|
||||
*/
|
||||
function drawPatchLines() {
|
||||
$this->xmlOutput .= $this->xmlPatchLines;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get XML output.
|
||||
* @return $string $this->xmlOutput
|
||||
*/
|
||||
function getOutput() {
|
||||
$this->xmlOutput .= $this->xmlFooter;
|
||||
return $this->xmlOutput;
|
||||
}
|
||||
}
|
||||
?>
|
||||
217
mozilla/webtools/aus/xml/index.php
Normal file
@@ -0,0 +1,217 @@
|
||||
<?php
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
//
|
||||
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
//
|
||||
// The contents of this file are subject to the Mozilla Public License Version
|
||||
// 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// the License. You may obtain a copy of the License at
|
||||
// http://www.mozilla.org/MPL/
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// for the specific language governing rights and limitations under the
|
||||
// License.
|
||||
//
|
||||
// The Original Code is AUS.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Mike Morgan.
|
||||
//
|
||||
// Portions created by the Initial Developer are Copyright (C) 2006
|
||||
// the Initial Developer. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
// Mike Morgan <morgamic@mozilla.com>
|
||||
//
|
||||
// Alternatively, the contents of this file may be used under the terms of
|
||||
// either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
// in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
// of those above. If you wish to allow use of your version of this file only
|
||||
// under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
// use your version of this file under the terms of the MPL, indicate your
|
||||
// decision by deleting the provisions above and replace them with the notice
|
||||
// and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
// the provisions above, a recipient may use your version of this file under
|
||||
// the terms of any one of the MPL, the GPL or the LGPL.
|
||||
//
|
||||
// ***** END LICENSE BLOCK *****
|
||||
|
||||
/**
|
||||
* AUS Lite main script.
|
||||
* @package auslite
|
||||
* @subpackage docs
|
||||
* @author Mike Morgan
|
||||
*
|
||||
* This script handles incoming requests, reads the related build
|
||||
* snippet and returns a properly formatted XML file for testing.
|
||||
*/
|
||||
|
||||
// Require config and supporting libraries.
|
||||
require_once('./inc/init.php');
|
||||
|
||||
// Instantiate XML object.
|
||||
$xml = new Xml();
|
||||
|
||||
// Find everything between our CWD and 255 in QUERY_STRING.
|
||||
$rawPath = substr(urldecode($_SERVER['QUERY_STRING']),5,255);
|
||||
|
||||
// Munge he resulting string and store it in $path.
|
||||
$path = explode('/',$rawPath);
|
||||
|
||||
// Determine incoming request and clean inputs.
|
||||
// These are common URL elements, agreed upon in revision 0.
|
||||
$clean = Array();
|
||||
$clean['updateVersion'] = isset($path[0]) ? intval($path[0]) : null;
|
||||
$clean['product'] = isset($path[1]) ? trim($path[1]) : null;
|
||||
$clean['version'] = isset($path[2]) ? urlencode($path[2]) : null;
|
||||
$clean['build'] = isset($path[3]) ? trim($path[3]) : null;
|
||||
$clean['platform'] = isset($path[4]) ? trim($path[4]) : null;
|
||||
$clean['locale'] = isset($path[5]) ? trim($path[5]) : null;
|
||||
|
||||
// For each updateVersion, we will run separate code.
|
||||
switch ($clean['updateVersion']) {
|
||||
|
||||
/*
|
||||
* This is for the second revision of the URL schema, with %CHANNEL% added.
|
||||
* /update2/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml
|
||||
*/
|
||||
case 1:
|
||||
|
||||
// Check for a set channel.
|
||||
$clean['channel'] = isset($path[6]) ? trim($path[6]) : null;
|
||||
|
||||
// Instantiate Update object and set updateVersion.
|
||||
$update = new Update();
|
||||
|
||||
// Instantiate our complete patch.
|
||||
$completePatch = new Patch($branchVersions,$nightlyChannels,'complete');
|
||||
|
||||
// Find our complete patch.
|
||||
$completePatch->findPatch($clean['product'],$clean['platform'],$clean['locale'],$clean['version'],$clean['build'],$clean['channel']);
|
||||
|
||||
// If our complete patch is valid, set the patch line.
|
||||
if ($completePatch->isPatch() && $completePatch->isNewBuild($clean['build'])) {
|
||||
|
||||
// Set our patchLine.
|
||||
$xml->setPatchLine($completePatch);
|
||||
|
||||
// If available, pull update information from the build snippet.
|
||||
// @TODO Add ability to set updateType.
|
||||
if ($completePatch->hasUpdateInfo()) {
|
||||
$update->setVersion($completePatch->updateVersion);
|
||||
$update->setExtensionVersion($completePatch->updateExtensionVersion);
|
||||
$update->setBuild($completePatch->build);
|
||||
}
|
||||
|
||||
if ($completePatch->hasDetailsUrl()) {
|
||||
$update->setDetails($completePatch->detailsUrl);
|
||||
}
|
||||
}
|
||||
|
||||
// We only check for a partial patch if the complete patch was successfully retrieved.
|
||||
if ($completePatch->isPatch()) {
|
||||
|
||||
// Instantiate our partial patch.
|
||||
$partialPatch = new Patch($branchVersions,$nightlyChannels,'partial');
|
||||
$partialPatch->findPatch($clean['product'],$clean['platform'],$clean['locale'],$clean['version'],$clean['build'],$clean['channel']);
|
||||
|
||||
// If our partial patch is valid, set the patch line.
|
||||
// We only want to deliver the partial patch if the destination build for the partial patch is equal to the build in the complete patch (which will always point to the latest).
|
||||
if ($partialPatch->isPatch() && $partialPatch->isNewBuild($clean['build']) && $partialPatch->isOneStepFromLatest($completePatch->build)) {
|
||||
$xml->setPatchLine($partialPatch);
|
||||
}
|
||||
}
|
||||
|
||||
// If we have valid patchLine(s), set up our output.
|
||||
if ($xml->hasPatchLine()) {
|
||||
$xml->startUpdate($update);
|
||||
$xml->drawPatchLines();
|
||||
$xml->endUpdate();
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* This is for the first revision of the URL schema.
|
||||
* /update2/0/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/update.xml
|
||||
*/
|
||||
case 0:
|
||||
default:
|
||||
|
||||
// Instantiate Update object and set updateVersion.
|
||||
$update = new Update();
|
||||
|
||||
// Instantiate Patch object and set Path based on passed args.
|
||||
$patch = new Patch($branchVersions,$nightlyChannels,'complete');
|
||||
|
||||
$patch->findPatch($clean['product'],$clean['platform'],$clean['locale'],$clean['version'],$clean['build'],null);
|
||||
|
||||
if ($patch->isPatch()) {
|
||||
$xml->setPatchLine($patch);
|
||||
}
|
||||
|
||||
// If we have a new build, draw the update block and patch line.
|
||||
// If there is no valid patch file, client will receive no updates by default.
|
||||
if ($xml->hasPatchLine() && $patch->isNewBuild($clean['build'])) {
|
||||
$xml->startUpdate($update);
|
||||
$xml->drawPatchLines();
|
||||
$xml->endUpdate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// If we are debugging output plaintext and exit.
|
||||
if ( defined('DEBUG') && DEBUG == true ) {
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
|
||||
echo '<head>'."\n";
|
||||
echo '<title>AUS Debug Information</title>'."\n";
|
||||
echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
echo '<h1>AUS Debug Information</h1>'."\n";
|
||||
|
||||
echo '<h2>XML Output</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
echo htmlentities($xml->getOutput());
|
||||
echo '</pre>'."\n";
|
||||
|
||||
if (!empty($clean)) {
|
||||
echo '<h2>Inputs</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
print_r($clean);
|
||||
echo '</pre>'."\n";
|
||||
}
|
||||
|
||||
echo '<h2>Patch Objects</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
if (!empty($patch)) {
|
||||
print_r($patch);
|
||||
}
|
||||
if (!empty($completePatch)) {
|
||||
print_r($completePatch);
|
||||
}
|
||||
if (!empty($partialPatch)) {
|
||||
print_r($partialPatch);
|
||||
}
|
||||
echo '</pre>'."\n";
|
||||
|
||||
if (!empty($update)) {
|
||||
echo '<h2>Update Object</h2>'."\n";
|
||||
echo '<pre>'."\n";
|
||||
print_r($update);
|
||||
echo '</pre>'."\n";
|
||||
}
|
||||
|
||||
echo '</body>'."\n";
|
||||
echo '</html>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set header and send info.
|
||||
// Default output will be a blank document (no updates available).
|
||||
header('Content-type: text/xml;');
|
||||
echo $xml->getOutput();
|
||||
exit;
|
||||
?>
|
||||
5
mozilla/webtools/bouncer/.htaccess
Normal file
@@ -0,0 +1,5 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ webroot/ [L]
|
||||
RewriteRule (.*) webroot/$1 [L]
|
||||
</IfModule>
|
||||
48
mozilla/webtools/bouncer/README
Normal file
@@ -0,0 +1,48 @@
|
||||
Mozilla Firefox Uninstall Survey
|
||||
================================
|
||||
|
||||
|
||||
How To Install
|
||||
--------------
|
||||
|
||||
Assumptions:
|
||||
1) You've got a working database with the appropriate schema
|
||||
2) You've got cake setup on your server already. The code you're looking at now
|
||||
is just what is in the /app/ directory - everything else will have to be on your
|
||||
server already.
|
||||
|
||||
Steps:
|
||||
|
||||
1) Copy config/database.php.default to config/database.php and fill in your database
|
||||
values (if you're only doing production, just fill in the production area).
|
||||
|
||||
2) Edit /webroot/index.php.
|
||||
Define ROOT:
|
||||
If you're installing this in your home directory, ROOT should be:
|
||||
|
||||
DS.'home'.DS.'username'.DS.'public_html'
|
||||
|
||||
Define APP_DIR:
|
||||
ROOT is the parent directory of the app, this is the actual app.
|
||||
Continuing the example above, if people are going to go to:
|
||||
http://server.com/~username/bouncer/ to get to the app, APP_DIR should be:
|
||||
|
||||
bouncer
|
||||
|
||||
Define CAKE_CORE_INCLUDE_PATH:
|
||||
This is the path to the actual cake install on your server. For example:
|
||||
|
||||
DS.'usr'.DS.'local'.DS.'lib'.DS.'php'.DS.'cake'
|
||||
|
||||
3) Edit /webroot/.htaccess. Add a RewriteBase line below the line that says 'RewriteEngine On'.
|
||||
For our example, we would add the line:
|
||||
|
||||
RewriteBase /~username/bouncer
|
||||
|
||||
4) Edit /.htaccess. Add the same RewriteBase line from step 3 directly below the
|
||||
'RewriteEngine On' line.
|
||||
|
||||
|
||||
|
||||
|
||||
Questions? Email clouserw@mozilla.com
|
||||
76
mozilla/webtools/bouncer/config/acl.ini.php
Normal file
@@ -0,0 +1,76 @@
|
||||
;<?php die() ?>
|
||||
; SVN FILE: $Id: acl.ini.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $
|
||||
;/**
|
||||
; * Short description for file.
|
||||
; *
|
||||
; *
|
||||
; * PHP versions 4 and 5
|
||||
; *
|
||||
; * CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
; * Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
; * 1785 E. Sahara Avenue, Suite 490-204
|
||||
; * Las Vegas, Nevada 89104
|
||||
; *
|
||||
; * Licensed under The MIT License
|
||||
; * Redistributions of files must retain the above copyright notice.
|
||||
; *
|
||||
; * @filesource
|
||||
; * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
; * @package cake
|
||||
; * @subpackage cake.app.config
|
||||
; * @since CakePHP v 0.10.0.1076
|
||||
; * @version $Revision: 1.1.1.1 $
|
||||
; * @modifiedby $LastChangedBy: phpnut $
|
||||
; * @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
; * @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
; */
|
||||
|
||||
; acl.ini.php - Cake ACL Configuration
|
||||
; ---------------------------------------------------------------------
|
||||
; Use this file to specify user permissions.
|
||||
; aco = access control object (something in your application)
|
||||
; aro = access request object (something requesting access)
|
||||
;
|
||||
; User records are added as follows:
|
||||
;
|
||||
; [uid]
|
||||
; groups = group1, group2, group3
|
||||
; allow = aco1, aco2, aco3
|
||||
; deny = aco4, aco5, aco6
|
||||
;
|
||||
; Group records are added in a similar manner:
|
||||
;
|
||||
; [gid]
|
||||
; allow = aco1, aco2, aco3
|
||||
; deny = aco4, aco5, aco6
|
||||
;
|
||||
; The allow, deny, and groups sections are all optional.
|
||||
; NOTE: groups names *cannot* ever be the same as usernames!
|
||||
;
|
||||
; ACL permissions are checked in the following order:
|
||||
; 1. Check for user denies (and DENY if specified)
|
||||
; 2. Check for user allows (and ALLOW if specified)
|
||||
; 3. Gather user's groups
|
||||
; 4. Check group denies (and DENY if specified)
|
||||
; 5. Check group allows (and ALLOW if specified)
|
||||
; 6. If no aro, aco, or group information is found, DENY
|
||||
;
|
||||
; ---------------------------------------------------------------------
|
||||
|
||||
;-------------------------------------
|
||||
;Users
|
||||
;-------------------------------------
|
||||
|
||||
[username-goes-here]
|
||||
groups = group1, group2
|
||||
deny = aco1, aco2
|
||||
allow = aco3, aco4
|
||||
|
||||
;-------------------------------------
|
||||
;Groups
|
||||
;-------------------------------------
|
||||
|
||||
[groupname-goes-here]
|
||||
deny = aco5, aco6
|
||||
allow = aco7, aco8
|
||||
46
mozilla/webtools/bouncer/config/bootstrap.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: bootstrap.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
* Long description for file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.config
|
||||
* @since CakePHP v 0.10.8.2117
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php is loaded
|
||||
* This is an application wide file to load any function that is not used within a class define.
|
||||
* You can also use this to include or require any files in your application.
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* The settings below can be used to set additional paths to models, views and controllers.
|
||||
* This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)
|
||||
*
|
||||
* $modelPaths = array('full path to models', 'second full path to models', 'etc...');
|
||||
* $viewPaths = array('this path to views', 'second full path to views', 'etc...');
|
||||
* $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...');
|
||||
*
|
||||
*/
|
||||
//EOF
|
||||
?>
|
||||
147
mozilla/webtools/bouncer/config/core.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: core.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* This is core configuration file.
|
||||
*
|
||||
* Use it to configure core behaviour ofCake.
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.config
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
* If you do not have mod rewrite on your system
|
||||
* or if you prefer to use CakePHP pretty urls.
|
||||
* uncomment the line below.
|
||||
* Note: If you do have mod rewrite but prefer the
|
||||
* CakePHP pretty urls, you also have to remove the
|
||||
* .htaccess files
|
||||
* release/.htaccess
|
||||
* release/app/.htaccess
|
||||
* release/app/webroot/.htaccess
|
||||
*/
|
||||
// define ('BASE_URL', env('SCRIPT_NAME'));
|
||||
/**
|
||||
* Set debug level here:
|
||||
* - 0: production
|
||||
* - 1: development
|
||||
* - 2: full debug with sql
|
||||
* - 3: full debug with sql and dump of the current object
|
||||
*
|
||||
* In production, the "flash messages" redirect after a time interval.
|
||||
* With the other debug levels you get to click the "flash message" to continue.
|
||||
*
|
||||
*/
|
||||
define('DEBUG', 2);
|
||||
/**
|
||||
* Turn of caching checking wide.
|
||||
* You must still use the controller var cacheAction inside you controller class.
|
||||
* You can either set it controller wide, or in each controller method.
|
||||
* use var $cacheAction = true; or in the controller method $this->cacheAction = true;
|
||||
*/
|
||||
define('CACHE_CHECK', false);
|
||||
/**
|
||||
* Error constant. Used for differentiating error logging and debugging.
|
||||
* Currently PHP supports LOG_DEBUG
|
||||
*/
|
||||
define('LOG_ERROR', 2);
|
||||
/**
|
||||
* CakePHP includes 3 types of session saves
|
||||
* database or file. Set this to your preferred method.
|
||||
* If you want to use your own save handler place it in
|
||||
* app/config/name.php DO NOT USE file or database as the name.
|
||||
* and use just the name portion below.
|
||||
*
|
||||
* Setting this to cake will save files to /cakedistro/tmp directory
|
||||
* Setting it to php will use the php default save path
|
||||
* Setting it to database will use the database
|
||||
*
|
||||
*
|
||||
*/
|
||||
define('CAKE_SESSION_SAVE', 'php');
|
||||
/**
|
||||
* If using you own table name for storing sessions
|
||||
* set the table name here.
|
||||
* DO NOT INCLUDE PREFIX IF YOU HAVE SET ONE IN database.php
|
||||
*
|
||||
*/
|
||||
define('CAKE_SESSION_TABLE', 'cake_sessions');
|
||||
/**
|
||||
* Set a random string of used in session.
|
||||
*
|
||||
*/
|
||||
define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
||||
/**
|
||||
* Set the name of session cookie
|
||||
*
|
||||
*/
|
||||
define('CAKE_SESSION_COOKIE', 'CAKEPHP');
|
||||
/**
|
||||
* Set level of Cake security.
|
||||
*
|
||||
*/
|
||||
define('CAKE_SECURITY', 'high');
|
||||
/**
|
||||
* Set Cake Session time out.
|
||||
* If CAKE_SECURITY define is set
|
||||
* high: multiplied by 10
|
||||
* medium: is multiplied by 100
|
||||
* low is: multiplied by 300
|
||||
*
|
||||
* Number below is seconds.
|
||||
*/
|
||||
define('CAKE_SESSION_TIMEOUT', '120');
|
||||
/**
|
||||
* Uncomment the define below to use cake built in admin routes.
|
||||
* You can set this value to anything you want.
|
||||
* All methods related to the admin route should be prefixed with the
|
||||
* name you set CAKE_ADMIN to.
|
||||
* For example: admin_index, admin_edit
|
||||
*/
|
||||
// define('CAKE_ADMIN', 'admin');
|
||||
/**
|
||||
* The define below is used to turn cake built webservices
|
||||
* on or off. Default setting is off.
|
||||
*/
|
||||
define('WEBSERVICES', 'off');
|
||||
/**
|
||||
* Compress output CSS (removing comments, whitespace, repeating tags etc.)
|
||||
* This requires a/var/cache directory to be writable by the web server (caching).
|
||||
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag().
|
||||
*/
|
||||
define('COMPRESS_CSS', false);
|
||||
/**
|
||||
* If set to true, helpers would output data instead of returning it.
|
||||
*/
|
||||
define('AUTO_OUTPUT', false);
|
||||
/**
|
||||
* If set to false, session would not automatically be started.
|
||||
*/
|
||||
define('AUTO_SESSION', true);
|
||||
/**
|
||||
* Set the max size of file to use md5() .
|
||||
*/
|
||||
define('MAX_MD5SIZE', (5 * 1024) * 1024);
|
||||
/**
|
||||
* To use Access Control Lists with Cake...
|
||||
*/
|
||||
define('ACL_CLASSNAME', 'DB_ACL');
|
||||
define('ACL_FILENAME', 'dbacl' . DS . 'db_acl');
|
||||
?>
|
||||
74
mozilla/webtools/bouncer/config/database.php.default
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: database.php.default,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* This is core configuration file.
|
||||
*
|
||||
* Use it to configure core behaviour ofCake.
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.config
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
* In this file you set up your database connection details.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
/**
|
||||
* Database configuration class.
|
||||
* You can specify multiple configurations for production, development and testing.
|
||||
*
|
||||
* driver =>
|
||||
* mysql, postgres, sqlite, adodb-drivername, pear-drivername
|
||||
*
|
||||
* connect =>
|
||||
* MySQL set the connect to either mysql_pconnect of mysql_connect
|
||||
* PostgreSQL set the connect to either pg_pconnect of pg_connect
|
||||
* SQLite set the connect to sqlite_popen sqlite_open
|
||||
* ADOdb set the connect to one of these
|
||||
* (http://phplens.com/adodb/supported.databases.html) and
|
||||
* append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
|
||||
*
|
||||
* host =>
|
||||
* the host you connect to the database
|
||||
* MySQL 'localhost' to add a port number use 'localhost:port#'
|
||||
* PostgreSQL 'localhost' to add a port number use 'localhost port=5432'
|
||||
*
|
||||
*/
|
||||
class DATABASE_CONFIG
|
||||
{
|
||||
var $default = array('driver' => 'mysql',
|
||||
'connect' => 'mysql_connect',
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'project_name',
|
||||
'prefix' => '');
|
||||
|
||||
var $test = array('driver' => 'mysql',
|
||||
'connect' => 'mysql_connect',
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'project_name-test',
|
||||
'prefix' => '');
|
||||
}
|
||||
?>
|
||||
72
mozilla/webtools/bouncer/config/inflections.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: inflections.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* Custom Inflected Words.
|
||||
*
|
||||
* This file is used to hold words that are not matched in the normail Inflector::pluralize() and
|
||||
* Inflector::singularize()
|
||||
*
|
||||
* PHP versions 4 and %
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.config
|
||||
* @since CakePHP v 1.0.0.2312
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
* This is a key => value array of regex used to match words.
|
||||
* If key matches then the value is returned.
|
||||
*
|
||||
* $pluralRules = array('/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice');
|
||||
*/
|
||||
$pluralRules = array();
|
||||
/**
|
||||
* This is a key only array of plural words that should not be inflected.
|
||||
* Notice the last comma
|
||||
*
|
||||
* $uninflectedPlural = array('.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox');
|
||||
*/
|
||||
$uninflectedPlural = array();
|
||||
/**
|
||||
* This is a key => value array of plural irregular words.
|
||||
* If key matches then the value is returned.
|
||||
*
|
||||
* $irregularPlural = array('atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers')
|
||||
*/
|
||||
$irregularPlural = array();
|
||||
/**
|
||||
* This is a key => value array of regex used to match words.
|
||||
* If key matches then the value is returned.
|
||||
*
|
||||
* $singularRules = array('/(s)tatuses$/i' => '\1\2tatus', '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i')
|
||||
*/
|
||||
$singularRules = array();
|
||||
/**
|
||||
* This is a key only array of singular words that should not be inflected.
|
||||
* You should not have to change this value below if you do change it use same format
|
||||
* as the $uninflectedPlural above.
|
||||
*/
|
||||
$uninflectedSingular = $uninflectedPlural;
|
||||
/**
|
||||
* This is a key => value array of singular irregular words.
|
||||
* Most of the time this will be a reverse of the above $irregularPlural array
|
||||
* You should not have to change this value below if you do change it use same format
|
||||
*
|
||||
* $irregularSingular = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother')
|
||||
*/
|
||||
$irregularSingular = array_flip($irregularPlural);
|
||||
?>
|
||||
46
mozilla/webtools/bouncer/config/routes.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: routes.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
* In this file, you set up routes to your controllers and their actions.
|
||||
* Routes are very important mechanism that allows you to freely connect
|
||||
* different urls to chosen controllers and their actions (functions).
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.config
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
* Here, we are connecting '/' (base path) to controller called 'Pages',
|
||||
* its action called 'display', and we pass a param to select the view file
|
||||
* to use (in this case, /app/views/pages/home.thtml)...
|
||||
*/
|
||||
$Route->connect('/', array('controller' => 'pages', 'action' => 'display', 'dashboard'));
|
||||
/**
|
||||
* ...and connect the rest of 'Pages' controller's urls.
|
||||
*/
|
||||
$Route->connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
||||
/**
|
||||
* Then we connect url '/test' to our test controller. This is helpfull in
|
||||
* developement.
|
||||
*/
|
||||
$Route->connect('/tests', array('controller' => 'tests', 'action' => 'index'));
|
||||
?>
|
||||
30
mozilla/webtools/bouncer/config/sql/db_acl.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
CREATE TABLE `acos` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`model` varchar(255) NOT NULL default '',
|
||||
`object_id` int(11) default NULL,
|
||||
`alias` varchar(255) NOT NULL default '',
|
||||
`lft` int(11) default NULL,
|
||||
`rght` int(11) default NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `aros` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`model` varchar(255) NOT NULL default '',
|
||||
`user_id` int(11) default NULL,
|
||||
`alias` varchar(255) NOT NULL default '',
|
||||
`lft` int(11) default NULL,
|
||||
`rght` int(11) default NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `aros_acos` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`aro_id` int(11) default NULL,
|
||||
`aco_id` int(11) default NULL,
|
||||
`_create` int(1) NOT NULL default '0',
|
||||
`_read` int(1) NOT NULL default '0',
|
||||
`_update` int(1) NOT NULL default '0',
|
||||
`_delete` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
11
mozilla/webtools/bouncer/config/sql/sessions.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
-- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
-- @since CakePHP v 0.10.8.1997
|
||||
-- @version $Revision: 1.1.1.1 $
|
||||
|
||||
CREATE TABLE cake_sessions (
|
||||
id varchar(255) NOT NULL default '',
|
||||
data text,
|
||||
expires int(11) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class FilesController extends AppController {
|
||||
var $name = 'Files';
|
||||
var $scaffold;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class LocalesController extends AppController {
|
||||
var $name = 'Locales';
|
||||
var $scaffold;
|
||||
}
|
||||
?>
|
||||
77
mozilla/webtools/bouncer/controllers/mirrors_controller.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
uses('sanitize');
|
||||
|
||||
class MirrorsController extends AppController
|
||||
{
|
||||
var $name = 'Mirrors';
|
||||
var $helpers = array('Html', 'Pagination');
|
||||
var $show;
|
||||
var $sortBy;
|
||||
var $direction;
|
||||
var $page;
|
||||
var $order;
|
||||
var $sanitize;
|
||||
var $scaffold;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->sanitize = &new Sanitize;
|
||||
$this->show = empty($_GET['show'])? '10': $this->sanitize->sql($_GET['show']);
|
||||
$this->sortBy = empty($_GET['sort'])? 'Mirror.mirror_id': $this->sanitize->sql($_GET['sort']);
|
||||
$this->direction = empty($_GET['direction'])? 'desc': $this->sanitize->sql($_GET['direction']);
|
||||
$this->page = empty($_GET['page'])? '1': $this->sanitize->sql($_GET['page']);
|
||||
$this->order = $this->sortBy.' '.strtoupper($this->direction);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$data = $this->Mirror->findAll($criteria=null, $fields=null, $this->order, $this->show, $this->page);
|
||||
|
||||
$paging['style'] = 'html'; //set the style of the links: html or ajax
|
||||
|
||||
foreach ($this->Mirror->_tableInfo->value as $column) {
|
||||
|
||||
// If the sortBy is the same as the current link, we want to switch it.
|
||||
// By default, we don't -- so that when a user changes columns, the order doesn't also reverse.
|
||||
if ($this->sortBy == $column['name']) {
|
||||
switch ($this->direction) {
|
||||
case 'desc':
|
||||
$link_direction = 'asc';
|
||||
break;
|
||||
case 'asc':
|
||||
default:
|
||||
$link_direction = 'desc';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$link_direction =& $this->direction;
|
||||
}
|
||||
$paging['headers'][$column['name']] = $this->sanitize->html('/mirrors/?show='.$this->show.'&sort='.$column['name'].'&direction='.$link_direction.'&page='.$this->page);
|
||||
}
|
||||
|
||||
$paging['link'] = $this->sanitize->html('./?show='.$this->show.'&sort='.$this->sortBy.'&direction='.$this->direction.'&page=');
|
||||
$paging['count'] = $this->Mirror->findCount($criteria=null,'1000');
|
||||
$paging['page'] = $this->page;
|
||||
$paging['limit'] = $this->show;
|
||||
$paging['show'] = array('10','25','50','100');
|
||||
|
||||
$this->set('paging',$paging);
|
||||
$this->set('data',$data);
|
||||
}
|
||||
|
||||
function view($id) {
|
||||
$this->Mirror->setId($id);
|
||||
$this->set('data', $this->Mirror->read());
|
||||
}
|
||||
|
||||
function destroy($id) {
|
||||
if (empty($this->params['data'])) {
|
||||
$this->set('data', $this->Mirror->read());
|
||||
$this->render();
|
||||
} elseif ($this->Mirror->del($id)) {
|
||||
$this->flash('Mirror '.$id.' has been deleted.', '/mirrors');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class PlatformsController extends AppController {
|
||||
var $name = 'Platforms';
|
||||
var $scaffold;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class RegionsController extends AppController {
|
||||
var $name = 'Regions';
|
||||
var $scaffold;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class TemplatesController extends AppController {
|
||||
var $name = 'Templates';
|
||||
var $scaffold;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class UsersController extends AppController {
|
||||
var $name = 'Users';
|
||||
var $scaffold;
|
||||
}
|
||||
?>
|
||||
26
mozilla/webtools/bouncer/index.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: index.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
* @since CakePHP v 0.10.0.1076
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
|
||||
?>
|
||||
6
mozilla/webtools/bouncer/models/file.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class File extends AppModel {
|
||||
var $name = 'File';
|
||||
var $primaryKey = 'file_id';
|
||||
}
|
||||
?>
|
||||
7
mozilla/webtools/bouncer/models/locale.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class Locale extends AppModel {
|
||||
var $name = 'Locale';
|
||||
var $primaryKey = 'lang_id';
|
||||
var $useTable = 'langs';
|
||||
}
|
||||
?>
|
||||
15
mozilla/webtools/bouncer/models/mirror.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
class Mirror extends AppModel
|
||||
{
|
||||
var $name = 'Mirror';
|
||||
var $primaryKey = 'mirror_id';
|
||||
var $hasAndBelongsToMany = array('regions' =>
|
||||
array( 'className' => 'Region',
|
||||
'joinTable' => 'mirror_region_map',
|
||||
'foreignKey' => 'mirror_id',
|
||||
'associationForeignKey' => 'region_id',
|
||||
'order' => 'region_name desc',
|
||||
'uniq' => true )
|
||||
);
|
||||
}
|
||||
?>
|
||||
7
mozilla/webtools/bouncer/models/platform.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class Platform extends AppModel {
|
||||
var $name = 'Platform';
|
||||
var $primaryKey = 'os_id';
|
||||
var $useTable = 'oss';
|
||||
}
|
||||
?>
|
||||
7
mozilla/webtools/bouncer/models/region.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class Region extends AppModel {
|
||||
var $name = 'Region';
|
||||
var $primaryKey = 'region_id';
|
||||
var $displayField = 'region_name';
|
||||
}
|
||||
?>
|
||||
7
mozilla/webtools/bouncer/models/template.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class Template extends AppModel {
|
||||
var $name = 'Template';
|
||||
var $primaryKey = 'template_id';
|
||||
var $useTable = 'templates';
|
||||
}
|
||||
?>
|
||||
7
mozilla/webtools/bouncer/models/user.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class User extends AppModel {
|
||||
var $name = 'User';
|
||||
var $primaryKey = 'user_id';
|
||||
var $useTable = 'users';
|
||||
}
|
||||
?>
|
||||
8
mozilla/webtools/bouncer/views/dashboard.thtml
Normal file
@@ -0,0 +1,8 @@
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Bar</p>
|
||||
211
mozilla/webtools/bouncer/views/helpers/pagination.php
Normal file
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
class PaginationHelper {
|
||||
|
||||
var $helpers = array('Html','Ajax');
|
||||
var $_pageDetails = array();
|
||||
var $link = '';
|
||||
var $show = array();
|
||||
var $page;
|
||||
var $style;
|
||||
|
||||
/**
|
||||
* Sets the default pagination options.
|
||||
*
|
||||
* @param array $paging an array detailing the page options
|
||||
*/
|
||||
function setPaging($paging)
|
||||
{
|
||||
if(!empty($paging))
|
||||
{
|
||||
|
||||
$this->link = $paging['link'];
|
||||
$this->show = $paging['show'];
|
||||
$this->page = $paging['page'];
|
||||
$this->style = $paging['style'];
|
||||
|
||||
$pageCount = ceil($paging['count'] / $paging['limit'] );
|
||||
|
||||
$this->_pageDetails = array(
|
||||
'page'=>$paging['page'],
|
||||
'recordCount'=>$paging['count'],
|
||||
'pageCount' =>$pageCount,
|
||||
'nextPage'=> ($paging['page'] < $pageCount) ? $paging['page']+1 : '',
|
||||
'previousPage'=> ($paging['page']>1) ? $paging['page']-1 : '',
|
||||
'limit'=>$paging['limit']
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Displays limits for the query
|
||||
*
|
||||
* @param string $text - text to display before limits
|
||||
* @param string $separator - display a separate between limits
|
||||
*
|
||||
**/
|
||||
function show($text=null, $separator=null)
|
||||
{
|
||||
if (empty($this->_pageDetails)) { return false; }
|
||||
if ( !empty($this->_pageDetails['recordCount']) )
|
||||
{
|
||||
$t = '';
|
||||
if(is_array($this->show))
|
||||
{
|
||||
$t = $text.$separator;
|
||||
foreach($this->show as $value)
|
||||
{
|
||||
$link = preg_replace('/show=(.*?)&/','show='.$value.'&',$this->link);
|
||||
if($this->_pageDetails['limit'] == $value)
|
||||
{
|
||||
$t .= '<em>'.$value.'</em>'.$separator;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->style == 'ajax')
|
||||
{
|
||||
$t .= $this->Ajax->linkToRemote($value, array("fallback"=>$this->action."#","url" => $link.$this->_pageDetails['page'],"update" => "ajax_update","method"=>"get")).$separator;
|
||||
}
|
||||
else
|
||||
{
|
||||
$t .= $this->Html->link($value,$link.$this->_pageDetails['page']).$separator;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
/**
|
||||
* Displays current result information
|
||||
*
|
||||
* @param string $text - text to preceeding the number of results
|
||||
*
|
||||
**/
|
||||
function result($text)
|
||||
{
|
||||
if (empty($this->_pageDetails)) { return false; }
|
||||
if ( !empty($this->_pageDetails['recordCount']) )
|
||||
{
|
||||
if($this->_pageDetails['recordCount'] > $this->_pageDetails['limit'])
|
||||
{
|
||||
$start_row = $this->_pageDetails['page'] > 1 ? (($this->_pageDetails['page']-1)*$this->_pageDetails['limit'])+1:'1';
|
||||
$end_row = ($this->_pageDetails['recordCount'] < ($start_row + $this->_pageDetails['limit']-1)) ? $this->_pageDetails['recordCount'] : ($start_row + $this->_pageDetails['limit']-1);
|
||||
$t = $text.$start_row.'-'.$end_row.' of '.$this->_pageDetails['recordCount'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = $text.$this->_pageDetails['recordCount'];
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Returns a "Google style" list of page numbers
|
||||
*
|
||||
* @param string $separator - defaults to null
|
||||
* @param string $prefix - defaults to null. If set, displays prefix before page links.
|
||||
* @param int $pageSetLength - defaults to 10. Maximum number of pages to show.
|
||||
* @param string $prevLabel - defaults to null. If set, displays previous link.
|
||||
* @param string $nextLabel - defaults to null. If set, displays next link.
|
||||
*
|
||||
**/
|
||||
function pageNumbers($separator=null, $prefix=null, $pageSetLength=10, $prevLabel=null, $nextLabel=null)
|
||||
{
|
||||
|
||||
if (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }
|
||||
|
||||
$t = array();
|
||||
|
||||
$modulo = $this->_pageDetails['page'] % $pageSetLength;
|
||||
if ($modulo)
|
||||
{ // any number > 0
|
||||
$prevSetLastPage = $this->_pageDetails['page'] - $modulo;
|
||||
} else { // 0, last page of set
|
||||
$prevSetLastPage = $this->_pageDetails['page'] - $pageSetLength;
|
||||
}
|
||||
//$nextSetFirstPage = $prevSetLastPage + $pageSetLength + 1;
|
||||
|
||||
if ($prevLabel) $t[] = $this->prevPage($prevLabel);
|
||||
|
||||
// loops through each page number
|
||||
$pageSet = $prevSetLastPage + $pageSetLength;
|
||||
if ($pageSet > $this->_pageDetails['pageCount']) $pageSet = $this->_pageDetails['pageCount'];
|
||||
for ($pageIndex = $prevSetLastPage+1; $pageIndex <= $pageSet; $pageIndex++)
|
||||
{
|
||||
if ($pageIndex == $this->_pageDetails['page'])
|
||||
{
|
||||
$t[] = '<em>'.$pageIndex.'</em>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->style == 'ajax')
|
||||
{
|
||||
$t[] = $this->Ajax->linkToRemote($pageIndex, array("fallback"=>$this->action."#","url" =>$this->link.$pageIndex,"update" => "ajax_update","method"=>"get"));
|
||||
} else {
|
||||
$t[] = $this->Html->link($pageIndex,$this->link.$pageIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($nextLabel) $t[] = $this->nextPage($nextLabel);
|
||||
|
||||
$t = implode($separator, $t);
|
||||
|
||||
return $prefix.$t;
|
||||
}
|
||||
/**
|
||||
* Displays a link to the previous page, where the page doesn't exist then
|
||||
* display the $text
|
||||
*
|
||||
* @param string $text - text display: defaults to next
|
||||
*
|
||||
**/
|
||||
function prevPage($text='prev')
|
||||
{
|
||||
if (empty($this->_pageDetails)) { return false; }
|
||||
if ( !empty($this->_pageDetails['previousPage']) )
|
||||
{
|
||||
if($this->style == 'ajax')
|
||||
{
|
||||
$t = $this->Ajax->linkToRemote($text, array("fallback"=>$this->action."#","url" => $this->link.$this->_pageDetails['previousPage'],"update" => "ajax_update","method"=>"get"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = $this->Html->link($text,$this->link.$this->_pageDetails['previousPage']);
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Displays a link to the next page, where the page doesn't exist then
|
||||
* display the $text
|
||||
*
|
||||
* @param string $text - text to display: defaults to next
|
||||
*
|
||||
**/
|
||||
function nextPage($text='next')
|
||||
{
|
||||
if (empty($this->_pageDetails)) { return false; }
|
||||
if (!empty($this->_pageDetails['nextPage']))
|
||||
{
|
||||
if($this->style == 'ajax')
|
||||
{
|
||||
$t = $this->Ajax->linkToRemote($text, array("fallback"=>$this->action."#","url" => $this->link.$this->_pageDetails['nextPage'],"update" => "ajax_update","method"=>"get"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = $this->Html->link($text,$this->link.$this->_pageDetails['nextPage']);
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
92
mozilla/webtools/bouncer/views/layouts/default.thtml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: default.thtml,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
|
||||
/**
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2005, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2005, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.cake.libs.view.templates.pages
|
||||
* @since CakePHP v 0.10.0.1076
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo $title_for_layout?> :: Bouncer v2.0</title>
|
||||
|
||||
<link rel="icon" href="<?=$this->webroot?>img/bouncer.icon.png" type="image/png" />
|
||||
<?php echo $html->charset('UTF-8')?>
|
||||
<?php echo $html->css('bouncer.screen')?>
|
||||
<?php echo $html->css('bouncer.print')?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="skip-to-nav"><a href="#nav">Skip to Navigation</a></div>
|
||||
<div id="wrapper">
|
||||
<div id="header">
|
||||
<a href="<?=$this->webroot?>">
|
||||
<?php echo $html->image('bouncer.logo.png', array('alt'=>'Bouncer', 'border'=>"0"))?>
|
||||
</a>
|
||||
</div>
|
||||
<hr class="hidden"/>
|
||||
<div id="content">
|
||||
<?php if (isset($this->controller->Session)) $this->controller->Session->flash(); ?>
|
||||
<?php echo $content_for_layout?>
|
||||
</div>
|
||||
<?php echo $cakeDebug;?>
|
||||
<hr class="hidden"/>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><?=$html->link('Dashboard','/')?></li>
|
||||
<li><?=$html->link('Mirrors','/mirrors')?></li>
|
||||
<li><?=$html->link('Regions','/regions')?></li>
|
||||
<li><?=$html->link('Files','/files')?></li>
|
||||
<li><?=$html->link('Platforms','/platforms')?></li>
|
||||
<li><?=$html->link('Locales','/locales')?></li>
|
||||
<li><?=$html->link('Templates','/templates')?></li>
|
||||
<li><?=$html->link('Users','/users')?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<hr class="hidden"/>
|
||||
<div id="footer">
|
||||
<p class="copyright">
|
||||
© 2006 <a href="http://osuosl.org/">OSU Open Source Lab</a>
|
||||
</p>
|
||||
<p class="buttons">
|
||||
<!--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO-->
|
||||
<a href="http://www.cakephp.org/" target="_new">
|
||||
<?php echo $html->image('cake.power.png', array('alt'=>'CakePHP : Rapid Development Framework',
|
||||
'height' => "15",
|
||||
'width' => "80"))?>
|
||||
</a>
|
||||
<a href="http://validator.w3.org/check?uri=referer">
|
||||
<?php echo $html->image('w3c_xhtml10.png', array('alt' => 'Valid XHTML 1.0 Transitional',
|
||||
'height' => "15",
|
||||
'width' => "80"))?>
|
||||
</a>
|
||||
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||
<?php echo $html->image('w3c_css.png', array('alt' => 'Valid CSS!',
|
||||
'height' => "15",
|
||||
'width' => "80"))?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
8
mozilla/webtools/bouncer/views/mirrors/destroy.thtml
Normal file
@@ -0,0 +1,8 @@
|
||||
<h1><?php echo $data['Mirror']['mirror_name']; ?></h1>
|
||||
<p><?php echo $data['Mirror']['mirror_baseurl']; ?></p>
|
||||
<p><?php echo $data['Mirror']['mirror_rating']; ?></p>
|
||||
<form action="./mirrors/destroy/<?=$data['Mirror']['mirror_id']?>" method="post">
|
||||
<p>Are you sure you want to delete this mirror?</p>
|
||||
<div><a href="javascript:history.back();">Nevermind</a><input type="submit" value="Yea, I'm sure"/></div>
|
||||
<input type="hidden" name="mirror_id" value="<?=$data['Mirror']['mirror_id']?>"/>
|
||||
</form>
|
||||
46
mozilla/webtools/bouncer/views/mirrors/index.thtml
Normal file
@@ -0,0 +1,46 @@
|
||||
<h1>Mirrors</h1>
|
||||
|
||||
<?php if($pagination->setPaging($paging)):?>
|
||||
<div class="pagination">
|
||||
<?php echo $pagination->result('Results: '); ?>
|
||||
<?php echo $pagination->prevPage('Prev'); ?>
|
||||
<?php echo $pagination->pageNumbers(); ?>
|
||||
<?php echo $pagination->nextPage('Next'); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<table class="inav">
|
||||
<tr>
|
||||
<th><?php echo $html->link('ID',$paging['headers']['mirror_id']); ?></th>
|
||||
<th><?php echo $html->link('Name',$paging['headers']['mirror_name']); ?></th>
|
||||
<th><?php echo $html->link('URL',$paging['headers']['mirror_baseurl']); ?></th>
|
||||
<th><?php echo $html->link('Rating',$paging['headers']['mirror_rating']); ?></th>
|
||||
<th><?php echo $html->link('Active',$paging['headers']['mirror_active']); ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<?php foreach ($data as $mirror): ?>
|
||||
<tr>
|
||||
<td><?php echo $mirror['Mirror']['mirror_id']; ?></td>
|
||||
<td><?php echo $mirror['Mirror']['mirror_name']; ?></td>
|
||||
<td>
|
||||
<?php echo $html->link( $mirror['Mirror']['mirror_baseurl'], "/mirrors/view/{$mirror['Mirror']['mirror_id']}" ); ?>
|
||||
</td>
|
||||
<td><?php echo $mirror['Mirror']['mirror_rating']; ?></td>
|
||||
<td><?php echo ($mirror['Mirror']['mirror_active'])?'On':'Off'; ?></td>
|
||||
<td>
|
||||
<?=$html->link('Edit',"/mirrors/edit/{$mirror['Mirror']['mirror_id']}",'class="action"')?>
|
||||
<?=$html->link('Delete',"/mirrors/destroy/{$mirror['Mirror']['mirror_id']}",'class="action"','Are you sure you want to delete?')?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php if($pagination->setPaging($paging)):?>
|
||||
<ul id="page-numbers">
|
||||
<li><?php echo $pagination->show('Show '); ?></li>
|
||||
<li><?php echo $pagination->result('Results: '); ?></li>
|
||||
<li><?php echo $pagination->prevPage('Prev'); ?></li>
|
||||
<li><?php echo $pagination->pageNumbers(); ?></li>
|
||||
<li><?php echo $pagination->nextPage('Next'); ?></li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
3
mozilla/webtools/bouncer/views/mirrors/view.thtml
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1><?php echo $data['Mirror']['mirror_name']; ?></h1>
|
||||
<p><?php echo $data['Mirror']['mirror_baseurl']; ?></p>
|
||||
<p><?php echo $data['Mirror']['mirror_rating']; ?></p>
|
||||
8
mozilla/webtools/bouncer/views/pages/dashboard.thtml
Normal file
@@ -0,0 +1,8 @@
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Foo</p>
|
||||
<p>Bar</p>
|
||||
6
mozilla/webtools/bouncer/webroot/.htaccess
Normal file
@@ -0,0 +1,6 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
|
||||
</IfModule>
|
||||
101
mozilla/webtools/bouncer/webroot/css.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: css.php,v 1.1.1.1 2006-06-09 18:14:09 mike.morgan%oregonstate.edu Exp $ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
* Long description for file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.webroot
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision: 1.1.1.1 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-06-09 18:14:09 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
* Enter description here...
|
||||
*/
|
||||
require(CONFIGS . 'paths.php');
|
||||
require(CAKE . 'basics.php');
|
||||
require(LIBS . 'folder.php');
|
||||
require(LIBS . 'file.php');
|
||||
require(LIBS . 'legacy.php');
|
||||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
* @param unknown_type $path
|
||||
* @param unknown_type $name
|
||||
* @return unknown
|
||||
*/
|
||||
function make_clean_css($path, $name) {
|
||||
require(VENDORS . 'csspp' . DS . 'csspp.php');
|
||||
$data =file_get_contents($path);
|
||||
$csspp =new csspp();
|
||||
$output=$csspp->compress($data);
|
||||
$ratio =100 - (round(strlen($output) / strlen($data), 3) * 100);
|
||||
$output=" /* file: $name, ratio: $ratio% */ " . $output;
|
||||
return $output;
|
||||
}
|
||||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
* @param unknown_type $path
|
||||
* @param unknown_type $content
|
||||
* @return unknown
|
||||
*/
|
||||
function write_css_cache($path, $content) {
|
||||
if (!is_dir(dirname($path))) {
|
||||
mkdir(dirname($path));
|
||||
}
|
||||
$cache=new File($path);
|
||||
return $cache->write($content);
|
||||
}
|
||||
|
||||
if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) {
|
||||
die('Wrong file name.');
|
||||
}
|
||||
|
||||
$filename = 'css/' . $regs[1];
|
||||
$filepath = CSS . $regs[1];
|
||||
$cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]);
|
||||
|
||||
if (!file_exists($filepath)) {
|
||||
die('Wrong file name.');
|
||||
}
|
||||
|
||||
if (file_exists($cachepath)) {
|
||||
$templateModified=filemtime($filepath);
|
||||
$cacheModified =filemtime($cachepath);
|
||||
|
||||
if ($templateModified > $cacheModified) {
|
||||
$output=make_clean_css($filepath, $filename);
|
||||
write_css_cache($cachepath, $output);
|
||||
} else {
|
||||
$output = file_get_contents($cachepath);
|
||||
}
|
||||
} else {
|
||||
$output=make_clean_css($filepath, $filename);
|
||||
write_css_cache($cachepath, $output);
|
||||
}
|
||||
|
||||
header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT');
|
||||
header("Content-Type: text/css");
|
||||
header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT");
|
||||
header("Cache-Control: cache"); // HTTP/1.1
|
||||
header("Pragma: cache"); // HTTP/1.0
|
||||
print $output;
|
||||
?>
|
||||
147
mozilla/webtools/bouncer/webroot/css/bouncer.screen.css
Normal file
@@ -0,0 +1,147 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#skip-to-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#header {
|
||||
background-color: #333;
|
||||
border-bottom: 2px solid #ccc;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 0 1em;
|
||||
font-family: verdana, arial, sans-serif;
|
||||
}
|
||||
|
||||
#content h1,h2,h3,h4,h5 {
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #337;
|
||||
font-family: arial, verdana, sans-serif;
|
||||
margin: .2em 0;
|
||||
padding: .2em 0;
|
||||
}
|
||||
|
||||
#content h1 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#content h2 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
#content h3 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#content h4 {
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
#content h5 {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#nav {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 2em;
|
||||
}
|
||||
|
||||
#nav ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#nav ul li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#nav ul li a {
|
||||
background-color: #666;
|
||||
border: 2px inset #000;
|
||||
color: #eee;
|
||||
display: block;
|
||||
font-family: verdana, arial, sans-serif;
|
||||
font-size: small;
|
||||
font-weight: bold;
|
||||
margin: 4px;
|
||||
padding: 2px 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#nav ul li a:hover {
|
||||
border: 2px outset #000;
|
||||
color: #666;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#footer {
|
||||
background-color: #333;
|
||||
border-top: 2px solid #ccc;
|
||||
border-bottom: 2px solid #ccc;
|
||||
color: #eee;
|
||||
padding: .6em .4em .4em .4em;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
color: #eee;
|
||||
float: right;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: x-small;
|
||||
font-family: verdana, arial, sans-serif;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.buttons img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inav {
|
||||
background: #eee;
|
||||
border: 1px solid #ccc;
|
||||
padding: .2em;
|
||||
}
|
||||
|
||||
.inav th {
|
||||
background-color: #999;
|
||||
color: blue;
|
||||
font-size: small;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.inav th a {
|
||||
color: blue;
|
||||
display: block;
|
||||
background-color: #999;
|
||||
padding: 0 .5em;
|
||||
}
|
||||
|
||||
.inav th a:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
268
mozilla/webtools/bouncer/webroot/css/cake.basic.css
Normal file
@@ -0,0 +1,268 @@
|
||||
*{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
body{
|
||||
font-family:verdana,helvetica,arial,sans-serif;
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
color:#fff;
|
||||
background:#003d4c;
|
||||
}
|
||||
|
||||
/*
|
||||
* General Style Info
|
||||
*/
|
||||
|
||||
a{
|
||||
color:#003d4c;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover{
|
||||
color:#003d4c;
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
a img{
|
||||
border:none;
|
||||
}
|
||||
|
||||
h1, h2,h3{
|
||||
font-family:'Gill Sans';
|
||||
font-size:28px;
|
||||
font-weight:normal;
|
||||
}
|
||||
h1{
|
||||
padding:0.5em 0;
|
||||
color:#003d4c;
|
||||
}
|
||||
em {
|
||||
font-size: 12px;
|
||||
}
|
||||
h2{
|
||||
padding-top:0.15em;
|
||||
margin:0.3em 0;
|
||||
color:#e32;
|
||||
}
|
||||
|
||||
h3{
|
||||
font-size:18px;
|
||||
padding-top:0.5em;
|
||||
color:#003d4c;
|
||||
}
|
||||
|
||||
h4{
|
||||
color:#ff9966;
|
||||
font-size:20px;
|
||||
padding-top:0.5em;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
padding: 10px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#content ol, #content ul{
|
||||
margin:0 1em;
|
||||
padding:0 2em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Layout
|
||||
*/
|
||||
|
||||
#container{
|
||||
text-align:left;
|
||||
margin-left:0px;
|
||||
}
|
||||
|
||||
#header{
|
||||
height:200px;
|
||||
background:#003d4c;
|
||||
}
|
||||
|
||||
#header h1{
|
||||
color:#fff;
|
||||
font-family: 'Gill Sans';
|
||||
font-size: 45px;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
#header h1.logo {
|
||||
float:left;
|
||||
}
|
||||
|
||||
#header h1.logo a{
|
||||
display:block;
|
||||
width:226px;
|
||||
height:176px;
|
||||
background: transparent url('images/logo.gif') no-repeat top;
|
||||
}
|
||||
|
||||
#header h1.logo a:hover{
|
||||
background:url('images/logo.gif') no-repeat bottom;
|
||||
}
|
||||
|
||||
#content{
|
||||
width: auto;
|
||||
min-width: 860px;
|
||||
min-height: 720px;
|
||||
padding:15px 20px 50px 20px;
|
||||
margin: 0px 10px 0px 40px;
|
||||
color:#333;
|
||||
background:#fff ;
|
||||
border-right: 6px solid #222;
|
||||
}
|
||||
|
||||
/*
|
||||
* Navigation
|
||||
*/
|
||||
#navigation{
|
||||
float:left;
|
||||
height: 146px;
|
||||
width:710px;
|
||||
background:#003d4c url(images/nav_bg.gif) no-repeat;
|
||||
padding-left: 20px;
|
||||
}
|
||||
#navigation ul{
|
||||
|
||||
}
|
||||
|
||||
#navigation ul li{
|
||||
list-style-type:none;
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#navigation ul li a{
|
||||
font-weight:bold;
|
||||
display:block;
|
||||
float:left;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
#navigation ul li a span{
|
||||
display:block;
|
||||
margin-right:12px;
|
||||
padding:10px 6px 9px 9px;
|
||||
}
|
||||
|
||||
#navigation ul li.active a span{
|
||||
padding:10px 6px 9px 9px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#navigation ul li a:hover, #navigation ul li.active a{
|
||||
background:url(images/nav_item_bg.gif) no-repeat bottom right;
|
||||
}
|
||||
|
||||
#navigation ul li a:hover span, #navigation ul li.active a span{
|
||||
background:url(images/nav_item_bg.gif) no-repeat bottom left;
|
||||
}
|
||||
|
||||
#footer {
|
||||
color: #fff;
|
||||
background-color: #003d4c;
|
||||
padding: 4px 10px;
|
||||
text-align: right;
|
||||
}
|
||||
#footer a{
|
||||
color: #fff;
|
||||
}
|
||||
.left {
|
||||
float:left;
|
||||
}
|
||||
.right {
|
||||
float:right;
|
||||
}
|
||||
.clear {
|
||||
clear:both;
|
||||
height: 0px;
|
||||
line-height: 0px;
|
||||
}
|
||||
|
||||
|
||||
/* tables */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 0px;
|
||||
color:#333;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
clear:both;
|
||||
padding: 0;
|
||||
margin: 0 0 2em 0;
|
||||
white-space: normal;
|
||||
}
|
||||
th {
|
||||
background-color: #ccc;
|
||||
border-top: 1px solid #fff;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #003d4c;
|
||||
border-bottom: 1px solid #003d4c;
|
||||
text-align: center;
|
||||
padding:2px;
|
||||
}
|
||||
table tr td {
|
||||
border-right: 1px solid #ccc;
|
||||
padding:4px 4px;
|
||||
vertical-align:top;
|
||||
text-align: center;
|
||||
}
|
||||
table tr.altRow td {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
/* scaffold show */
|
||||
|
||||
|
||||
div.related {
|
||||
clear:both;
|
||||
display:block;
|
||||
}
|
||||
dl {
|
||||
line-height:2em;
|
||||
margin:1em;
|
||||
float:left;
|
||||
width: 400px;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold;
|
||||
vertical-align:top;
|
||||
}
|
||||
dd {
|
||||
margin-left:10em;
|
||||
margin-top:-2em;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
/* scaffold buttons */
|
||||
|
||||
|
||||
.notice {
|
||||
color: #DB8101;
|
||||
background-color: #ddd;
|
||||
display: block;
|
||||
padding: 1em;
|
||||
}
|
||||
.tip {
|
||||
color: #DB8101;
|
||||
background-color: #ddd;
|
||||
display: block;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* action links */
|
||||
ul.actions {
|
||||
float:left;
|
||||
margin-left: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
li {
|
||||
list-style-image: url("images/arrow.gif");
|
||||
}
|
||||
279
mozilla/webtools/bouncer/webroot/css/cake.forms.css
Normal file
@@ -0,0 +1,279 @@
|
||||
/* form.css */
|
||||
|
||||
form {
|
||||
margin: 0 4px;
|
||||
font-size: 120%;
|
||||
border-width: 0px 0px 0px 0px;
|
||||
border-style: solid;
|
||||
border-color: #DB8101;
|
||||
}
|
||||
|
||||
form fieldset {
|
||||
font-size: 100%;
|
||||
border-color: #000000;
|
||||
border-width: 1px 0px 0px 0px;
|
||||
border-style: solid none none none;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
form fieldset legend {
|
||||
font-size: 150%;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
label u {
|
||||
font-style: normal;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font-size: 100%;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
form div {
|
||||
clear: left;
|
||||
display: block;
|
||||
margin: 5px 0px 0px 0px;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
form fieldset div.notes {
|
||||
float: right;
|
||||
width: 158px;
|
||||
height: auto;
|
||||
margin: 0px 0px 10px 10px;
|
||||
padding: 5px;
|
||||
border: 1px solid #666;
|
||||
background-color: #ffffe1;
|
||||
color: #666;
|
||||
font-size: 88%;
|
||||
}
|
||||
|
||||
form fieldset div.notes h4 {
|
||||
background-image: url(/images/icon_info.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
padding: 3px 0px 3px 27px;
|
||||
border-width: 0px 0px 1px 0px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
color: #666;
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
form fieldset div.notes p {
|
||||
margin: 0em 0em 1.2em 0em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
form fieldset div.notes p.last {
|
||||
margin: 0em;
|
||||
}
|
||||
|
||||
form div fieldset {
|
||||
clear: none;
|
||||
border-width: 0px 1px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
margin: 0px 0px 0px 142px;
|
||||
padding: 0px 5px 5px 5px;
|
||||
}
|
||||
|
||||
form div fieldset legend {
|
||||
font-size: 100%;
|
||||
padding: 0px 3px 0px 9px;
|
||||
}
|
||||
|
||||
form div.required fieldset legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form div label {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 200px;
|
||||
background-color: #f4f4f4;
|
||||
font-size: 16px;
|
||||
padding: 3px 5px;
|
||||
margin: 0px 0px 5px 0px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
form div.optional label, label.optional {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
form div.required label, label.required {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form div label.labelCheckbox, form div label.labelRadio {
|
||||
float: none;
|
||||
display: block;
|
||||
margin: 0px 0px 5px 142px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
form div fieldset label.labelCheckbox, form div fieldset label.labelRadio {
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
p.error {
|
||||
color: #DB8101;
|
||||
background-color: #DBA941;
|
||||
font-size: 14px;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
form div input, form div select, form div textarea {
|
||||
padding: 1px 3px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
form div input.inputFile {
|
||||
width: 211px;
|
||||
}
|
||||
|
||||
form div select.selectOne, form div select.selectMultiple {
|
||||
width: 211px;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
form div input.inputCheckbox, form div input.inputRadio, input.inputCheckbox, input.inputRadio {
|
||||
display: inline;
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
form div.submit {
|
||||
padding: 0px 0px 0px 140px;
|
||||
clear:both;
|
||||
display:block;
|
||||
}
|
||||
|
||||
div.submit input {
|
||||
padding: 2px 12px;
|
||||
color: #DB8101;
|
||||
background-color:#ccc;
|
||||
text-decoration: none;
|
||||
border: 1px solid #666;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align:center;
|
||||
text-decoration: none;
|
||||
width: auto;
|
||||
}
|
||||
div.submit input:hover {
|
||||
padding: 2px 12px;
|
||||
color: #fff;
|
||||
background-color:#DB8101;
|
||||
text-decoration: none;
|
||||
border: 1px solid #666;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align:center;
|
||||
text-decoration: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
form div.submit div input.inputSubmit, form div.submit div input.inputButton {
|
||||
float: right;
|
||||
margin: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
form div small {
|
||||
display: block;
|
||||
margin: 0px 0px 5px 142px;
|
||||
padding: 1px 3px;
|
||||
font-size: 88%;
|
||||
}
|
||||
|
||||
/* form.import.css */
|
||||
|
||||
form fieldset legend {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
form input, form select, form textarea {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
div.optional label:before {
|
||||
content: '';
|
||||
}
|
||||
|
||||
div.required label:before {
|
||||
content: '';
|
||||
}
|
||||
|
||||
form div label.labelCheckbox, form div label.labelRadio, label.labelCheckbox, label.labelRadio {
|
||||
display: block;
|
||||
width: 190px;
|
||||
padding: 4px 0px 0px 18px;
|
||||
text-indent: -18px;
|
||||
line-height: 120%;
|
||||
}
|
||||
|
||||
form div label.labelCheckbox input.inputCheckbox, form div label.labelRadio input.inputRadio, label.labelCheckbox input.inputCheckbox, label.labelRadio input.inputRadio {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
form div fieldset input.inputText, form div fieldset input.inputPassword, form div fieldset input.inputFile, form div fieldset textarea.inputTextarea {
|
||||
width: 160px;
|
||||
margin: 0px 0px 0px 18px;
|
||||
}
|
||||
|
||||
form div label.compact {
|
||||
display: inline;
|
||||
width: auto;
|
||||
padding: 4px 10px 0px 0px;
|
||||
text-indent: 0px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
form div.wide label {
|
||||
float: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
form div label.wide {
|
||||
width: 348px;
|
||||
}
|
||||
|
||||
form div.wide input.inputText, form div.wide input.inputPassword, form div.wide input.inputFile, form div.wide select, form div.wide textarea {
|
||||
width: 344px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
form div.notes p, form div small {
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
form div.wide small {
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
div.date select {
|
||||
width:auto;
|
||||
}
|
||||
|
||||
select.autoWidth {
|
||||
width:auto;
|
||||
}
|
||||
|
||||
option {
|
||||
padding-left:1em;
|
||||
}
|
||||
BIN
mozilla/webtools/bouncer/webroot/css/images/arrow.gif
Normal file
|
After Width: | Height: | Size: 62 B |
BIN
mozilla/webtools/bouncer/webroot/css/images/container_bg.gif
Executable file
|
After Width: | Height: | Size: 109 B |
BIN
mozilla/webtools/bouncer/webroot/css/images/logo.gif
Executable file
|
After Width: | Height: | Size: 18 KiB |
BIN
mozilla/webtools/bouncer/webroot/css/images/nav_bg.gif
Executable file
|
After Width: | Height: | Size: 874 B |
BIN
mozilla/webtools/bouncer/webroot/css/images/nav_item_bg.gif
Executable file
|
After Width: | Height: | Size: 531 B |
BIN
mozilla/webtools/bouncer/webroot/favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
mozilla/webtools/bouncer/webroot/img/bouncer.icon.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
mozilla/webtools/bouncer/webroot/img/bouncer.logo.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
mozilla/webtools/bouncer/webroot/img/cake.power.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
mozilla/webtools/bouncer/webroot/img/favicon.ico
Normal file
|
After Width: | Height: | Size: 318 B |