9 years agoAdd some of my utility scripts
Chris Han []
Add some of my utility scripts

9 years agoExtract POT file fresh using script
Chris Han []
Extract POT file fresh using script

9 years agoA file editor must have changed the modes on these files
Chris Han []
A file editor must have changed the modes on these files

9 years agoThe LC_MESSAGES dir isn't necessary
Chris Han []
The LC_MESSAGES dir isn't necessary

9 years agoThis in't a po file, it's a pot
Chris Han []
This in't a po file, it's a pot

9 years agoForgot to extract the RSS/OPML/TXT button captions
Chris Han []
Forgot to extract the RSS/OPML/TXT button captions

9 years agoFix escaping of moved file links in commit view
Chris Han []
Fix escaping of moved file links in commit view

9 years agoWindows php doesn't like the date format shortcuts for some reason
Chris Han []
Windows php doesn't like the date format shortcuts for some reason

9 years agoRemove unnecessary old resource classes, move resource class out of resource subpackage since it's the only resource file now
Chris Han []
Remove unnecessary old resource classes, move resource class out of resource subpackage since it's the only resource file now

9 years agoAdd gibberish locale
Chris Han []
Add gibberish locale

9 years agoAdd translator comments
Chris Han []
Add translator comments

9 years agoAdd extracted english po
Chris Han []
Add extracted english po

9 years agoSwitch to gettext for i18n
Chris Han []
Switch to gettext for i18n

9 years agoAdd copy of smarty-gettext modified to use gitphp resource provider
Chris Han []
Add copy of smarty-gettext modified to use gitphp resource provider

9 years agoAdd php-gettext and smarty-gettext
Chris Han []
Add php-gettext and smarty-gettext

9 years agoFix reading projects from file to support multi-word owners
Chris Han []
Fix reading projects from file to support multi-word owners

The previous version only took the first word of the owner specified in
the project list file, since it was tokenizing by spaces

9 years agoPrevent crashes with empty projects
Chris Han []
Prevent crashes with empty projects

This disables or hides pretty much all links - shortlog, log, commit,
commitdiff, tree, snapshot, etc - for an empty project with no commits.
None of those actions make any sense if the project is empty. There are
still outstanding crashes if the user crafts a url manually to directly
access a page for a project, but since that won't happen nearly as often
it's not quite as high a priority.

This also extracts the nav links at the top of each page into a shared
template, so we only need to check if a commit exists in one place.

9 years agoHave git ignore config files
Chris Han []
Have git ignore config files

9 years agoEnsure the resource manager exists when displaying an error message
Chris Han []
Ensure the resource manager exists when displaying an error message

10 years agoFix loading image urls on some browsers
Chris Han []
Fix loading image urls on some browsers

Some browsers don't properly determine the base url, when you use a
relative path in an href/src (eg "images/tooltip-loader.gif") - they
will treat slashes in a GET variable as a part of the actual path. So
when you have a URL like
(http://server/gitphp/index.php?p=php/gitphp.git), despite the slash in
the GET variable being escaped in the url, trying to load the images
path above resolves as
http://server/gitphp/index.php?p=php/images/tooltip-loader.gif, which
isn't right. This uses a regex in the javascript to extract only the
actual dirname of the instance, to give the loading img tags a full url.

10 years agoNot sure how a redundant end head tag ended up in here
Chris Han []
Not sure how a redundant end head tag ended up in here

10 years agoBump version to 0.2.0
Chris Han []
Bump version to 0.2.0

I think the rewrite is enough justification to bump the minor version.
Since behaviorally it's mostly the same I don't think the major version
should be bumped.

10 years agoUpdate README with slightly different config file method
Chris Han []
Update README with slightly different config file method

10 years agoAdd shadows to tooltips
Chris Han []
Add shadows to tooltips

10 years agoUpgrade GeSHi to 1.0.8.8
Chris Han []
Upgrade GeSHi to 1.0.8.8

10 years agoAdd ajax tag tooltips
Chris Han []
Add ajax tag tooltips

10 years agoSplit out ref badges into their own template
Chris Han []
Split out ref badges into their own template

10 years agoTurn off debugging for RSS and OPML/txt, it's screwing things up
Chris Han []
Turn off debugging for RSS and OPML/txt, it's screwing things up

10 years agoGit name-rev to find the tag on a commit is a whole lot faster than walking the tree ourselves
Chris Han []
Git name-rev to find the tag on a commit is a whole lot faster than walking the tree ourselves

10 years agoSplit out revision list on shortlog page and project summary into shared template fragment
Chris Han []
Split out revision list on shortlog page and project summary into shared template fragment

10 years agoSplit out head list on heads page and project summary into shared template fragment
Chris Han []
Split out head list on heads page and project summary into shared template fragment

10 years agoAdd support for tags pointing to other tag objects
Chris Han []
Add support for tags pointing to other tag objects

Tags now store the object they point to and the commit separately. (For
tags pointing right to commits, the object and the commit are the same)
This keeps the object link working correctly by pointing to the direct
object (as opposed to dereferencing all the way down to the commit), so
you can use the object link to trace tagged tags all the way down to the
base commit.

Also, the project and the tag list page now use the same tag listing
template fragment to make things easier.

10 years agoFix tree link for heads
Chris Han []
Fix tree link for heads

The tree link by heads was passing the old style h=refs/heads/[head]
piece of the url, from the old version. It actually wasn't worth it to
implement the translation of the ref path to the tree object in the tree
controller, because we were already passing the hash of the head's HEAD
commit as the hashbase parameter (hb=) - in that case the tree
controller is already automatically looking up the tree for that
hashbase commit.

10 years agoMake sure message controller actually works when telling the user no projectroot is set
Chris Han []
Make sure message controller actually works when telling the user no projectroot is set

10 years agoI18N new javascript strings
Chris Han []
I18N new javascript strings

10 years agoUsing a different editor screwed up the file modes
Chris Han []
Using a different editor screwed up the file modes

10 years agoAdd locale option documentation in default config, change minimum search length error message to take length as a parameter, add defaults in US locale for easier copy and translate
Chris Han []
Add locale option documentation in default config, change minimum search length error message to take length as a parameter, add defaults in US locale for easier copy and translate

10 years agoI18N commit tooltip template
Chris Han []
I18N commit tooltip template

10 years agoI18N error messages
Chris Han []
I18N error messages

10 years agoFix paths on blobdiff from commit page
Chris Han []
Fix paths on blobdiff from commit page

10 years agoTokenize commitdiff strings
Chris Han []
Tokenize commitdiff strings

10 years agoTokenize various other header links
Chris Han []
Tokenize various other header links

10 years agoAdd auto-gibberize code to debug locale, tokenize rest of commit page
Chris Han []
Add auto-gibberize code to debug locale, tokenize rest of commit page

10 years agoAdd i18n framework and start tokenizing some strings
Chris Han []
Add i18n framework and start tokenizing some strings

10 years agoMissed setting the path on blobdiff and history view
Chris Han []
Missed setting the path on blobdiff and history view

10 years agoTurn off logging output for plaintext commitdiff
Chris Han []
Turn off logging output for plaintext commitdiff

10 years agoTurn off logging output for plaintext blob
Chris Han []
Turn off logging output for plaintext blob

10 years agoFix trees with multiple names getting mixed up
Chris Han []
Fix trees with multiple names getting mixed up

This addresses three issues:
1. Git stores trees as a hash of their content, which has nothing to do
with their name. Therefore, two different directories with the exact
same content but different names could end up pointing to the exact same
tree hash. This caused problems on the tree view, when it attempted to
look up the tree name by its hash - this is actually something you just
can't do reliably in git because of this system.
2. Previously, the tree view used the object cache when enumerating
items in the tree. However, because of the problem above, you could
have two copies of the same tree under two different names. Because the
object cache stores by reference, fetching and populating the tree with
data during its second appearance in the tree actually affected and
overwrote what was populated during its first appearance in the tree.
This happened during the model load, before the template was rendered,
so instead of showing the first instance and then the second instance,
it looked like the second instance appeared twice.
3. Previously the FilesystemObject class used a system where you would
assign the name to an object. This was a leftover from before it was
split out of the Tree object. Doing it this way meant there were
inconsistencies all over the place as far as what was being set for the
name - sometimes it was just the base file name, sometimes it was the
full file path, and every now and then it would have to be converted
back and forth.

Now, these are fixed:
1. Now, the f= parameter is taken as the source of truth and used to set
up the path for the tree/blob.
2. Now, the tree enumeration doesn't use the cache in order to prevent
this situation.
3. Now, for consistency, the ability to set a name for a filesystem
object is removed. You can only set the full path now using SetPath,
SetName is removed. The name can still be fetched but it is
automatically derived as the base file name of the path.

10 years agoFix subdirectory snapshots of old commits
Chris Han []
Fix subdirectory snapshots of old commits

The snapshot url was passing the tree as the hash parameter to the
snapshot command - the commit should be the parameter

10 years agoFix getting snapshots of old commits
Chris Han []
Fix getting snapshots of old commits

I used the wrong variable in the commit controller, so it never actually
read the hash parameter for the commit properly

10 years agoRe-enable exception catch for messages
Chris Han []
Re-enable exception catch for messages

Setting the debug flag will rethrow the exception so you can see the
full stack trace

10 years agoFix extraneous data corrupting snapshots, and caching of subtree snapshots
Chris Han []
Fix extraneous data corrupting snapshots, and caching of subtree snapshots

10 years agoRemove unnecessary DOM walking
Chris Han []
Remove unnecessary DOM walking

10 years agoAdjust blame loading message a bit, add slight fading effect
Chris Han []
Adjust blame loading message a bit, add slight fading effect

10 years agoRemove some redundant local variables
Chris Han []
Remove some redundant local variables

10 years agoFix ajax blame with non-geshi blobs
Chris Han []
Fix ajax blame with non-geshi blobs

The non-geshi blob output has a row for each line, which is even harder
to inject blame data into. It just made more sense to change the
non-geshi blob output to the same table structure as geshi, so one
javascript blame solution worked for both.

Plus, it had the advantage of fixing the bug that made geshi introduce
this format in the first place - if you highlight code with your mouse,
the line numbers are no longer selected along with it in non-geshi view.

10 years agoMake sure to reinitialize tooltips after injecting blame data into DOM
Chris Han []
Make sure to reinitialize tooltips after injecting blame data into DOM

10 years agoStart working on ajax blame load
Chris Han []
Start working on ajax blame load

10 years agoNo need to include the extra css style block if it's empty
Chris Han []
No need to include the extra css style block if it's empty

10 years agoAdd a config to turn off javascript
Chris Han []
Add a config to turn off javascript

10 years agoAdd commit tooltips to more places
Chris Han []
Add commit tooltips to more places

10 years agoAdd a little more info to the commit tip
Chris Han []
Add a little more info to the commit tip

10 years agoUse a more fitting tooltip theme by default
Chris Han []
Use a more fitting tooltip theme by default

10 years agoUnescape projects read in javascript, so it doesn't get double escaped
Chris Han []
Unescape projects read in javascript, so it doesn't get double escaped

10 years agoTurn off logging when sending back tooltips, it's screwing up the tip content
Chris Han []
Turn off logging when sending back tooltips, it's screwing up the tip content

10 years agoStart working on commit message tooltips
Chris Han []
Start working on commit message tooltips

Only enabled on the blame page so far

10 years agoFix a couple warnings in commitdiff
Chris Han []
Fix a couple warnings in commitdiff

10 years agoGet rid of some php warnings
Chris Han []
Get rid of some php warnings

10 years agoNew way of specifying projects and categories
Chris Han []
New way of specifying projects and categories

This changes the way projects are specified with categories in an array.
There is a new config file in the config directory, projects.conf.php,
where the projects are listed using the git_projects array. In order to
make the transition easier for upgrading users without breaking
everything when they upgrade, this will allow a fallback to the legacy
method. If the file projects.conf.php exists, it will read that using
the new array format. If it doesn't exist, it will continue to use the
legacy array format that was specified in the main gitphp.conf.php.

This change was necessary because the previous format was limited to
only a single piece of metadata for a project - one category as a
string. Now, with this format, an arbitrary amount of metadata can be
specified for any project - so future enhancements can take advantage of
this and it will be very easy to add extra metadata.

This uses PHP's standard syntax for specifying multidimensional arrays.
It is admittedly more complicated than the old method because you have
to get all the syntax with commas and array() declarations correct,
which may be difficult for non-PHP programmers. I considered doing an
actual config file parser; however since this file is loaded every
single time you load any page, I wanted it to be as lightweight as
possible, and nothing is more lightweight than PHP's native syntax.

10 years agoFix blame line alignment issue in Firefox
Chris Han []
Fix blame line alignment issue in Firefox

10 years agoDon't use generic classes for blame hover
Chris Han []
Don't use generic classes for blame hover

10 years agoAdd geshi support to blame page
Chris Han []
Add geshi support to blame page

This uses a really nasty hack to take apart the HTML table that geshi
returns, in order to inject a table cell with the blame data.
Unfortunatly because geshi only returns a complete block of HTML,
there's no good way to do this.

10 years agoUse substr instead of str_replace when making category out of directory
Chris Han []
Use substr instead of str_replace when making category out of directory

Using str_replace can be a problem if your projectroot is the same as
one of the subdirectories of the project. For example:

If you projectroot is /git/, and your project is
/git/projects/php/git/gitphp.git, str_replace will remove both
appearances of '/git/' even though you only intended to remove the first
one

10 years agoFix blame when it returns filenames because of rename detection
Chris Han []
Fix blame when it returns filenames because of rename detection

10 years agoRight-align file sizes in tree view
Chris Han []
Right-align file sizes in tree view

10 years agoWhen scanning a directory for projects, set the category based on the subdirectory that it's in
Calen Pennington []
When scanning a directory for projects, set the category based on the subdirectory that it's in
(cherry picked from commit 395389c0469beda860d02cba19aefa9c4b26b069)

Signed-off-by: Chris Han <xiphux@gmail.com>

10 years agoMake git-daemon-export-ok exclusion a config value
Chris Han []
Make git-daemon-export-ok exclusion a config value

Just enabling this would be an automatic change, and many people
would suddenly see all their projects disappear and not know what
happened. I like the idea of respecting git-daemon-export-ok but I
can't reasonably expect everyone to go through all their repositories
and add this when they upgrade, so the exclusion is set by a config
option that's off by default.

Also, Gitweb doesn't do this at all so the odds of people having this
magic file set are even lower.

10 years agoOnly check git-daemon-export-ok if we're walking the directory structure
Calen Pennington []
Only check git-daemon-export-ok if we're walking the directory structure
(cherry picked from commit fff605dbe0f8facd9746175f82edf12def64a06e)

Signed-off-by: Chris Han <xiphux@gmail.com>

10 years agoOnly allow access to a project if it has git-daemon-export-ok set
Calen Pennington []
Only allow access to a project if it has git-daemon-export-ok set
(cherry picked from commit d992ac9922874b230a60671ac7ac23f135cd2ff1)

Signed-off-by: Chris Han <xiphux@gmail.com>

10 years agoFix bug where file path was displaying duplicated in blob and blame view
Chris Han []
Fix bug where file path was displaying duplicated in blob and blame view

10 years agoFix gzip snapshots to use the right variable
Chris Han []
Fix gzip snapshots to use the right variable

Thanks to Daniel G. Siegel for pointing this out

10 years agoImplementing feedback (renaming path to f and removing snapshot from files)
Tejas Dinkar []
Implementing feedback (renaming path to f and removing snapshot from files)

10 years agoAdded the ability to get snapshot from any level at tree level
Tejas Dinkar []
Added the ability to get snapshot from any level at tree level

10 years agoAdding support for getting a tarball of a particular part of repo
Tejas Dinkar []
Adding support for getting a tarball of a particular part of repo

10 years agoFix auto cache expiration
Chris Han []
Fix auto cache expiration

I made a typo in ControllerBase that was preventing auto cache expiration
from working

10 years agourlencoded the project's name, for projects like "C#"
Marijn Koesen []
urlencoded the project's name, for projects like "C#"

10 years agoMake project path sanitation slightly less restrictive to allow symlinked projects
Chris Han []
Make project path sanitation slightly less restrictive to allow symlinked projects

Based on a fix by Esa-Matti Suuronen

10 years agoAvoid premature exception when the config is completely empty
Chris Han []
Avoid premature exception when the config is completely empty

10 years agoMake tree view blob sizes fallback gracefully on older versions
Chris Han []
Make tree view blob sizes fallback gracefully on older versions

The tree view used -l indiscriminately to get blob sizes, without
taking into account that the -l option only appeared in git 1.5.3,
in which case the tree would fail to display anything (because the
command returned only the help message because of the invalid -l
parameter). Now it falls back properly depending on the version,
only displaying blob sizes if running on git 1.5.3 or greater.

10 years agoTry to simplify the config for users
Chris Han []
Try to simplify the config for users

Now the example config file only has the bare minimum config option (projectroot). It
also has the git projects array (since that is frequently used), and the cache option
commented out (since really everyone should be using caching, but it requires setup of
the cache directory so I can't enable it by default).

All other non-essential config options have been moved to a defaults file that doesn't
actually get loaded or used at all, but is just for documentation purposes. Users can
copy any config values from the defaults file into their config file and set as necessary.

Will need to evaluate to see if any other really frequently used config options should be
copied from the defaults file to the example file so users are more likely to see them.

10 years agoAdd magic database fallbacks
Chris Han []
Add magic database fallbacks

10 years agoAdd fallback for diff executable
Chris Han []
Add fallback for diff executable

10 years agoFix bug in git binary fallback
Chris Han []
Fix bug in git binary fallback

10 years agoRemove constants file since there was pretty much nothing left in it
Chris Han []
Remove constants file since there was pretty much nothing left in it

10 years agoTest for projectroot before attempting to instantiate project list
Chris Han []
Test for projectroot before attempting to instantiate project list

10 years agoDisplay action in header
Chris Han []
Display action in header

10 years agoDon't allow jumping to head for a blob that doesn't exist in head
Chris Han []
Don't allow jumping to head for a blob that doesn't exist in head

10 years agoUse path instead of file variable in blob template
Chris Han []
Use path instead of file variable in blob template

10 years agoTurn script url into a smarty function, fix a few strict warnings
Chris Han []
Turn script url into a smarty function, fix a few strict warnings

10 years agoFix bug in project index
Chris Han []
Fix bug in project index

comments