Skip to content

Commit

Permalink
Fixing typos to GitHub results & adding memcache for it
Browse files Browse the repository at this point in the history
  • Loading branch information
pdweinstein committed Apr 2, 2018
1 parent 1514ef9 commit a7c997b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,20 @@
<li><a href=\"http://pdw.weinstein.org/about/index.html\" alt\"Personal Blog\">Blog</a></li>
<li><a href=\"https://www.github.com/pdweinstein\" alt\"GitHub\">GitHub</a><ul><li>Latest Commit:
");
$githubEvents = $elsewhere->getGitHubEvents();
$GHrecent = $githubEvents[0];
$template->outputHTML( "<a href=\"" .$GHrecent->payload->commits[0]->url. "\">" .substr( $GHrecent->payload->commits[0]->sha, 0, 6 ). "</a> to repository <a href=\"https://www.gitpub.com/" .$GHrecent->repo->name. "\">" .$GHrecent->repo->name. "</a>" );

if ( $location != 'local' ) {
if ( !$githubEvents = $memcache->get( 'hub_pdw' )) {

$githubEvents = $elsewhere->getGitHubEvents();

memcache->set( 'hub_pdw', $githubEvents );

}

}

$GHrecent = $githubEvents[0];
$template->outputHTML( "<a href=\"https://www.github.com/" .$GHrecent->repo->name. "/commit/" .$GHrecent->payload->commits[0]->sha. "\">" .substr( $GHrecent->payload->commits[0]->sha, 0, 6 ). "</a> to repository <a href=\"https://www.github.com/" .$GHrecent->repo->name. "\">" .$GHrecent->repo->name. "</a>" );

$template->outputHTML("
</li></ul>
Expand Down

0 comments on commit a7c997b

Please sign in to comment.