From ef58d4135f3d43770f94af12dadeee7e47ef3921 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 27 Jul 2013 19:17:56 -0500 Subject: [PATCH] Fixing issue with indefero repo and removing registration key --- indefero/src/IDF/Form/Register.php | 9 +-------- indefero/src/IDF/Scm/Git.php | 17 +++++++++++++++-- .../src/IDF/templates/idf/register/index.html | 7 ------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/indefero/src/IDF/Form/Register.php b/indefero/src/IDF/Form/Register.php index 085cd7e..47bfafd 100644 --- a/indefero/src/IDF/Form/Register.php +++ b/indefero/src/IDF/Form/Register.php @@ -55,12 +55,6 @@ class IDF_Form_Register extends Pluf_Form 'help_text' => __('We will never send you any unsolicited emails. We hate spam too!'), )); - $this->fields['regkey'] = new Pluf_Form_Field_Varchar( - array('required' => true, - 'label' => __('Registration Key'), - 'initial' => '', - 'help_text' => __('Please enter the key given to you by adamsna[at]datanethost.net'), - )); $this->fields['terms'] = new Pluf_Form_Field_Boolean( array('required' => true, @@ -71,8 +65,7 @@ class IDF_Form_Register extends Pluf_Form public function clean_regkey() { - if ($this->cleaned_data['regkey'] != "2rv9o4nb5") - throw new Pluf_Form_Invalid("The regkey was incorrect - please contact Nathan for the key!"); + } /** diff --git a/indefero/src/IDF/Scm/Git.php b/indefero/src/IDF/Scm/Git.php index e357988..6117d1b 100644 --- a/indefero/src/IDF/Scm/Git.php +++ b/indefero/src/IDF/Scm/Git.php @@ -74,9 +74,11 @@ class IDF_Scm_Git extends IDF_Scm foreach ($out as $line) { $line = trim($line); + if ($line != '') { $action = $line[0]; - + #echo "line = " . $line . "\n"; + #echo "action = " . $action; if ($action == 'A') { $filename = trim(substr($line, 1)); $return->additions[] = $filename; @@ -87,8 +89,19 @@ class IDF_Scm_Git extends IDF_Scm $filename = trim(substr($line, 1)); $return->patches[] = $filename; } else if ($action == 'R') { + // This patch is needed because it seems + // that under a merge git may show a status + // of RC and not say the location of the original file $matches = preg_split("/\t/", $line); - $return->renames[$matches[1]] = $matches[2]; + if (count($matches) != 3) + { + $return->additions[] = $matches[1]; + } + else + { + $return->renames[$matches[1]] = $matches[2]; + } + } else if ($action == 'C') { $matches = preg_split("/\t/", $line); $return->copies[$matches[1]] = $matches[2]; diff --git a/indefero/src/IDF/templates/idf/register/index.html b/indefero/src/IDF/templates/idf/register/index.html index 0d63a4f..a5f9f64 100644 --- a/indefero/src/IDF/templates/idf/register/index.html +++ b/indefero/src/IDF/templates/idf/register/index.html @@ -19,13 +19,6 @@ -{$form.f.regkey.labelTag}: -{if $form.f.regkey.errors}{$form.f.regkey.fieldErrors}{/if} -{$form.f.regkey|unsafe}
-{$form.f.regkey.help_text} - - - {$form.f.email.labelTag}: {if $form.f.email.errors}{$form.f.email.fieldErrors}{/if} {$form.f.email|unsafe}