require_once("gwvpmini_search.php");
require_once("gwvpmini_gitbackend.php");
require_once("gwvpmini_view.php");
+require_once("gwvpmini_activity.php");
require_once("gwvpmini_register.php");
require_once("gwvpmini_user.php");
if(gwvpmini_isLoggedIn()) if(gwvpmini_isUserAdmin()) {
--- /dev/null
+<?php
+
+$reg = gwvpmini_getConfigVal("activityloglength");\r
+\r
+$activity_log_length = false;\r
+if($reg == null) {\r
+ gwvpmini_setConfigVal("activityloglength", "100");\r
+} else if($reg == 1) {\r
+ $activityloglength = true;\r
+} else {\r
+ $activityloglength = false;\r
+}\r
+\r
+global $use_gravatar;\r
+
+
+// this will add a repo activity (a commit for eg)
+// and auto populate the field in the activity
+// log
+function gwvpmini_AddActivityForRepo($desc, $userbyid)
+{
+
+}
+
+// gets the activity log as it would be viewed by
+// the user id of "$forid"
+function gwvpmini_GetActivityLogFor($forid)
+{
+
+}
+
+?>
\ No newline at end of file
// read|visible|write = can clone from repo|can see repo exists and see description but not clone from it|can push to repo\r
// TODO: is this sufficient? i have to think about it
+
+ // type for now will only be "git"
+ // date is obvious
+ // desc is a desction of the activity
+ // link is of the form "repo,reponame,repoid:user,username,useremail,userid" so it
+ // can be attached simply
+ // viewby is a simple list of uid's that should be able to see it... "r" for all registered
+ // "a" for everyone
$activitysql = '
CREATE TABLE "activity" (
"activity_type" TEXT,
"activity_date" TEXT,
"activity_desc" TEXT,
+ "activity_link" TEXT,
"activity_viewby" TEXT
)';\r
\r
error_log("cant set pipe1 non-blocking");
}
+
+ $fp = fopen("/tmp/gitup.".rand(0,4000000), "w");
// i was going to use stream_select, but i feel this works better like this
while($continue) {
// do client
if(!feof($fh)) {
$from_client_data = fread($fh,8192);
- if($from_client_data !== false) fwrite($pipes[0], $from_client_data);
+ if($from_client_data !== false) {
+ fwrite($pipes[0], $from_client_data);
+ fwrite($fp, $from_client_data);
+ }
fflush($pipes[0]);
//fwrite($fl, $from_client_data);
$client_len = strlen($from_client_data);