diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2012-09-21 10:32:47 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2012-09-21 10:32:47 +0200 |
| commit | 9f4d00eb634cbf75db2143a62ce8733e901b14a8 (patch) | |
| tree | 0c5c9f404893abf98a31c34fbd85eb73cbaed328 | |
| parent | 6249e4a7d43e130e23d6bb2a9190e395c5f01954 (diff) | |
| parent | 6c0d5be1b6ec69257b09b97ddfe0405eabe92459 (diff) | |
| download | phorkie-9f4d00eb634cbf75db2143a62ce8733e901b14a8.tar.gz phorkie-9f4d00eb634cbf75db2143a62ce8733e901b14a8.zip | |
Merge branch 'milestone' of github.com:jnovack/phorkie into milestone
Conflicts:
README.rst
| -rw-r--r-- | README.rst | 66 | ||||
| -rw-r--r-- | src/phorkie/File.php | 3 | ||||
| -rw-r--r-- | src/phorkie/Repository/Post.php | 3 | ||||
| -rw-r--r-- | src/phorkie/Tool/Info.php | 19 |
4 files changed, 67 insertions, 24 deletions
@@ -11,24 +11,29 @@ Project page: http://sourceforge.net/p/phorkie/ ======== Features ======== - - every paste is a git repository +- every paste is a git repository + - repositories can be cloned - clone url can be displayed - - openid authentication - - paste editing +- paste editing + - add new files - delete existing files - replace file with upload - - multiple files in one paste - - syntax highlighting with GeSHi - - rST and Markdown rendering - - image upload + display - - external tool support +- OpenID authentication +- multiple files in one paste +- syntax highlighting with GeSHi +- rST and Markdown rendering +- image upload + display +- external tool support + - xmllint - php syntax check - - history in the sidebar +- history in the sidebar + - old files can be downloaded easily - - search across pastes: description, file names and file content +- search across pastes: description, file names and file content + - options: quoting, logical and, or, not, partial words @@ -37,7 +42,7 @@ Installation ============ 1. Unzip the phorkie release file:: - $ tar xjvf phorkie-0.2.0.tar.bz2 + $ tar xjvf phorkie-0.3.0.tar.bz2 2. Create the git directories:: @@ -61,10 +66,17 @@ Installation Dependencies ============ -phorkie stands on the shoulders of giants. Git will need to be a -minimum version of v1.7.5. +phorkie stands on the shoulders of giants. + +It requires the following programs to be installed +on your machine: + +- Git v1.7.5 or later +- PHP v5.3.0 or later +- PEAR v1.9.2 or later :: + $ pear install versioncontrol_git-alpha $ pear install services_libravatar-alpha $ pear install http_request2 @@ -82,10 +94,11 @@ minimum version of v1.7.5. $ pear channel-discover pear.michelf.ca $ pear install michelf/Markdown - + Note that this version of GeSHi is a bit outdated, but it's the fastest -way to install it. If you install it manually be sure to update the -path in ``data/config.default.php``. +way to install it. +If you install it manually be sure to update the +path from ``data/config.default.php``. ====== Search @@ -133,7 +146,7 @@ Make git repositories clonable To make git repositories clonable, you need to install ``git-daemon`` (``git-daemon-run`` package on Debian/Ubuntu). -Now make the repositories available by symlinking the paste repository +Make the repositories available by symlinking the paste repository directory (``$GLOBALS['phorkie']['cfg']['repos']`` setting) into ``/var/cache/git``, e.g.:: @@ -143,19 +156,26 @@ Edit your ``config.php`` and set the ``$GLOBALS['phorkie']['cfg']['git']['public setting to ``git://$yourhostname/git/paste/``. The rest will be appended automatically. + You're on your own to setup writable repositories. + Protect your site with OpenID ============================= You have the option of enabling OpenID authentication to help secure your -pastes on phorkie. Set the ``$GLOBALS['phorkie']['auth']`` values in the +pastes on phorkie. +Set the ``$GLOBALS['phorkie']['auth']`` values in the ``data/config.php`` file as desired. -There are two different types of security you can apply. First, you can -restrict to one of three ``securityLevels``; completely open (0), protection -of write-enabled functions such as add, edit, etc. (1), and full site -protection. Additionally, you can restrict your site to ``listedUsersOnly``. -You will need to add the individual OpenIDs identity urls to the +There are two different types of security you can apply. +First, you can restrict to one of three ``securityLevels``: + +- completely open (``0``) +- protection of write-enabled functions such as add, edit, etc. (``1``) +- full site protection (``2``) + +Additionally, you can restrict your site to ``listedUsersOnly``. +You will need to add the individual OpenID urls to the ``$GLOBALS['phorkie']['auth']['users']`` variable. diff --git a/src/phorkie/File.php b/src/phorkie/File.php index f378f60..7f5b5b4 100644 --- a/src/phorkie/File.php +++ b/src/phorkie/File.php @@ -118,6 +118,9 @@ class File throw new Exception('Unknown type'); } + /** + * @return string Mime type of file + */ public function getMimeType() { $ext = $this->getExt(); diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index 9119e06..b181b5a 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -130,7 +130,8 @@ class Repository_Post ->setOption('message', $commitmsg) ->setOption('author', $sessionData['name'].' <'.$sessionData['email'].'>') ->execute(); - //FIXME: git needs ref BEFORE add. ideally VersionControl_Git needs to be updated + //FIXME: git needs ref BEFORE add + //quick hack until http://pear.php.net/bugs/bug.php?id=19605 is fixed $vc->getCommand('notes --ref=identity add') ->setOption('force') ->setOption('message', "$notes") diff --git a/src/phorkie/Tool/Info.php b/src/phorkie/Tool/Info.php index c1c3c69..2e95a9f 100644 --- a/src/phorkie/Tool/Info.php +++ b/src/phorkie/Tool/Info.php @@ -10,16 +10,35 @@ class Tool_Info $this->class = $class; } + /** + * Format the tool path + * + * @param File $file + * + * @return string + */ public function getLink(File $file) { return $file->getLink('tool', $this->stripPrefix($this->class)); } + /** + * Clean namespace from class + * + * @return string + */ public function getTitle() { return $this->stripPrefix($this->class); } + /** + * Removes custom namespace prefix + * + * @param string $class Class of object + * + * @return string + */ protected function stripPrefix($class) { $prefix = '\\phorkie\\Tool_'; |
