From f61b4b94f3a89e6282470975592868d6022632cb Mon Sep 17 00:00:00 2001
From: jacob <jacob>
Date: Wed, 15 Feb 2012 16:36:52 +0000
Subject: [PATCH] Quick patches:  - wording changes for creating an account and
 recovering passwords  - updated rollover script to copy the conference logo

---
 common.inc.php        |  2 +-
 super/conferences.php | 17 ++++++++++++++++-
 user_login.php        |  3 +--
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/common.inc.php b/common.inc.php
index db7cc223..19b730dc 100644
--- a/common.inc.php
+++ b/common.inc.php
@@ -158,7 +158,7 @@ if(isset($_SESSION['roles']) && $_SESSION['username']) {
 	 <?=i18n("Password")?>:</td><td><input type="password" size="18" name="password" />
 	 </td></tr>
 	 <tr><td style="text-align: center;" colspan="2">
-	 <a href="register.php"><?=i18n("Register")?></a>
+	 <a href="register.php"><?=i18n("Create Account")?></a>
 	 &nbsp; &nbsp; &nbsp;
 	 <input type="submit" value=<?=i18n("Login")?> />
 	 </td></tr>
diff --git a/super/conferences.php b/super/conferences.php
index 7a469bc7..1fdcbfda 100644
--- a/super/conferences.php
+++ b/super/conferences.php
@@ -399,6 +399,7 @@ function wizard_close(){
 		<script type=\"text/javascript\">
 		wizard.dialog('close');
 		wizard.remove();
+		$('#conferences').load('conferences.php?action=loadTable');
 		</script>
 	";
 }
@@ -519,7 +520,7 @@ function build_select_conference_step(){
 	echo '<div style="margin:1em">';
 	echo "<table><tr><td colspan=\"2\">";
 	echo "<select id=\"mastercopy\">";
-	$query = mysql_query("SELECT * FROM conferences ORDER BY id DESC");
+	$query = mysql_query("SELECT * FROM conferences WHERE status != 'deleted' ORDER BY id DESC");
 	while($row = mysql_fetch_assoc($query)){
 		$id = $row['id'];
 		if($id == $selectedID) $selected = " SELECTED ";
@@ -726,6 +727,7 @@ function copy_conference($params){
 		rollDates => increment the dates by a year
 		name => the new name
 	}*/
+	global $config;
 
 	// start a list of all tables that have been updated
 	$completedTables = array();
@@ -952,6 +954,19 @@ function copy_conference($params){
 	$completedTables[] = 'user_roles';
 	if($errorMessage != 'ok'){ wizard_draw_step('error', 'SQL error before line #' . __LINE__ . ': <br/>' . $errorMessage); rollback($newConfId, $completedTables); return false; }
 
+	// copy the logo files over as well
+	$imgPath = $_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . "/data";
+
+	$listing = scandir($imgPath);
+	$digits = strlen($oldConfId);
+	foreach($listing as $fname){
+		if(preg_match("/^$oldConfId-logo/", $fname)){
+			$newName = $newConfId . substr($fname, $digits);
+			shell_exec("cp $imgPath/$fname $imgPath/$newName");
+		}
+	}
+
+
 	// WHEW! If we've made it this far, the conference has successfully been copied
 
 	// end the previous conference if applicable
diff --git a/user_login.php b/user_login.php
index 6018a28a..7335efa3 100644
--- a/user_login.php
+++ b/user_login.php
@@ -233,8 +233,7 @@ if(isset($_SESSION['accounts_id'])) {
 	 </form>
 
 	<br />
-	<div style="font-size: 0.75em;">
-	<?=i18n("If you have lost or forgotten your password, or have misplaced the email with your initial password, please <a href=\"$recover_link\">click here to recover it</a>")?>.</div><br />
+	<?=i18n("<a href=\"$recover_link\">Forgot your password?</a>")?><br />
 	<br />
 <?
 	switch($reg_open) {