Merge branch 'master' of http://git.gitphp.org/gitphp
--- a/include/Util.class.php
+++ b/include/Util.class.php
@@ -68,10 +68,10 @@
public static function MakeSlug($str)
{
$from = array(
- '/'
+ '/&'
);
$to = array(
- '-'
+ '--'
);
return str_replace($from, $to, $str);
}
--- a/include/git/archive/Archive_Bzip2.class.php
+++ b/include/git/archive/Archive_Bzip2.class.php
@@ -70,7 +70,7 @@
$args = array();
$args[] = '--format=tar';
- $args[] = '--prefix=' . $archive->GetPrefix();
+ $args[] = "--prefix='" . $archive->GetPrefix() . "'";
$args[] = $archive->GetObject()->GetHash();
$this->handle = $this->exe->Open($archive->GetProject()->GetPath(), GIT_ARCHIVE, $args);
--- a/include/git/archive/Archive_Gzip.class.php
+++ b/include/git/archive/Archive_Gzip.class.php
@@ -77,7 +77,7 @@
$args = array();
$args[] = '--format=tar';
- $args[] = '--prefix=' . $archive->GetPrefix();
+ $args[] = "--prefix='" . $archive->GetPrefix() . "'";
$args[] = $archive->GetObject()->GetHash();
$this->handle = $this->exe->Open($archive->GetProject()->GetPath(), GIT_ARCHIVE, $args);
--- a/include/git/archive/Archive_Tar.class.php
+++ b/include/git/archive/Archive_Tar.class.php
@@ -50,7 +50,7 @@
$args = array();
$args[] = '--format=tar';
- $args[] = '--prefix=' . $archive->GetPrefix();
+ $args[] = "--prefix='" . $archive->GetPrefix() . "'";
$args[] = $archive->GetObject()->GetHash();
$this->handle = $this->exe->Open($archive->GetProject()->GetPath(), GIT_ARCHIVE, $args);
--- a/include/git/archive/Archive_Zip.class.php
+++ b/include/git/archive/Archive_Zip.class.php
@@ -72,7 +72,7 @@
$args[] = '--format=zip';
if ($this->compressLevel)
$args[] = '-' . $this->compressLevel;
- $args[] = '--prefix=' . $archive->GetPrefix();
+ $args[] = "--prefix='" . $archive->GetPrefix() . "'";
$args[] = $archive->GetObject()->GetHash();
$this->handle = $this->exe->Open($archive->GetProject()->GetPath(), GIT_ARCHIVE, $args);
--- a/include/git/projectlist/ProjectListFile.class.php
+++ b/include/git/projectlist/ProjectListFile.class.php
@@ -130,9 +130,11 @@
if (preg_match('/^([^\s]+)(\s.+)?$/', $line, $regs)) {
$data = array();
$data['project'] = $regs[1];
- $owner = trim($regs[2]);
- if (!empty($owner)) {
- $data['owner'] = $owner;
+ if (isset($regs[2])){
+ $owner = trim($regs[2]);
+ if (!empty($owner)) {
+ $data['owner'] = $owner;
+ }
}
$this->fileContents[] = $data;
}
--- a/include/git/taglist/TagList.class.php
+++ b/include/git/taglist/TagList.class.php
@@ -122,6 +122,21 @@
$this->dataLoaded = true;
list($this->refs, $this->commits) = $this->strategy->Load($this);
+
+ if (!$this->commits) {
+ // dereference commits if the strategy doesn't do it for us
+ // TODO: is there a way to do this without introducing strategy specific logic in the core class?
+ $this->commits = array();
+ $objManager = $this->GetProject()->GetObjectManager();
+ foreach ($this->refs as $tag => $tagHash) {
+ $tagObj = $objManager->GetTag($tag, $tagHash);
+ $commitHash = $tagObj->GetCommitHash();
+ if (!empty($commitHash)) {
+ $this->commits[$tag] = $commitHash;
+ }
+ }
+ }
+
foreach ($this->commits as $ref => $hash) $this->invertedRefs[$hash][] = $ref;
}
--- a/include/git/taglist/TagListLoad_Raw.class.php
+++ b/include/git/taglist/TagListLoad_Raw.class.php
@@ -18,16 +18,7 @@
public function Load($tagList)
{
$tags = $this->GetRefs($tagList, 'tags');
- $commits = array();
- $objManager = $tagList->GetProject()->GetObjectManager();
- foreach ($tags as $tag => $tagHash) {
- $tagObj = $objManager->GetTag($tag, $tagHash);
- $commitHash = $tagObj->GetCommitHash();
- if (!empty($commitHash)) {
- $commits[$tag] = $commitHash;
- }
- }
- return array($tags, $commits);
+ return array($tags, null);
}
/**
--- a/locale/de_DE/gitphp.po
+++ b/locale/de_DE/gitphp.po
@@ -131,7 +131,7 @@
# %2: the mode
#: templates/commit.tpl
msgid "new %1 with mode %2"
-msgstr ""
+msgstr "Neu %1 mit Modus %2"
# Used to indicate a new object was added
# %1: the type of object
@@ -153,7 +153,7 @@
# %4: the new file mode
#: templates/commit.tpl
msgid "changed from %1 to %2 mode: %3 -> %4"
-msgstr ""
+msgstr "geändert von %1 zu %2 Modus: %3 -> %4"
# Used to indicate a file type changed, with only new file mode
# (when old file type wasn't a normal file)
@@ -163,27 +163,27 @@
# %4: the new file mode
#: templates/commit.tpl
msgid "changed from %1 to %2 mode: %3"
-msgstr ""
+msgstr "geändert von %1 zu %2 Modus %3"
# Used to indicate a file type changed
# %1: the original file type
# %2: the new file type
#: templates/commit.tpl
msgid "changed from %1 to %2"
-msgstr ""
+msgstr "geändert von %1 zu %2"
# Used to indicate a file mode changed
# %1: the original file mode
# %2: the new file mode
#: templates/commit.tpl
msgid "changed mode: %1 -> %2"
-msgstr ""
+msgstr "geänderter Modus: %1 -> %2"
# Used to indicate a file mode changed
# %1: the new file mode
#: templates/commit.tpl
msgid "changed mode: %1"
-msgstr ""
+msgstr "geänderter Modus: %1"
# Used to indicate a file mode changed
#: templates/commit.tpl
@@ -202,7 +202,7 @@
# %3: the new file mode
#: templates/commit.tpl
msgid "moved from %1 with %2%% similarity, mode: %3"
-msgstr ""
+msgstr "verschoben von %1 mit %2%% der selbe Modus: %3"
# Used to indicate a file was moved
# This string should be HTML safe
@@ -210,7 +210,7 @@
# %2: the similarity as a percent number
#: templates/commit.tpl
msgid "moved from %1 with %2%% similarity"
-msgstr ""
+msgstr "verschoben von %1 mit %2%% das selbe"
# Used as title for and link to the compact log view with one line abbreviated commits
#: templates/headlist.tpl templates/nav.tpl templates/taglist.tpl
@@ -278,7 +278,7 @@
# Used as link to and title for page showing all heads in a project
#: templates/title.tpl include/controller/Controller_Heads.class.php:76
msgid "heads"
-msgstr ""
+msgstr "Heads"
# Used when diffing a file, to indicate that it's been deleted
#: templates/commitdiff.tpl
@@ -309,12 +309,12 @@
# Used to label the url that users can use to clone the project
#: templates/project.tpl
msgid "clone url"
-msgstr "Klone URL (clone)"
+msgstr "Clone URL"
# Used to label the url that users can use to push commits to the project
#: templates/project.tpl
msgid "push url"
-msgstr "Patch URL (push)"
+msgstr "Push URL"
# Used as the header for the project name column
#: templates/projectlist.tpl
@@ -466,7 +466,7 @@
#: include/git/Project.class.php:220
#, php-format
msgid "%1$s is attempting directory traversal"
-msgstr ""
+msgstr "%1$s versucht eine Pfad Manipulation "
# Error message when a path specified is outside of the project root
# %1$s: The specified path
@@ -626,7 +626,7 @@
# language to the user's choice
#: templates/header.tpl
msgid "set"
-msgstr ""
+msgstr "einstellen"
# Caption for the Atom button for a project
# Atom is a standard web feed format
@@ -682,7 +682,7 @@
#: include/git/FileDiff.class.php:810
#, php-format
msgid "Binary files %1 and %2 differ"
-msgstr ""
+msgstr "Binäre Dateien %1 und %2 unterscheiden sich"
# Used to label the url of the website of the project
#: templates/project.tpl