/[docman]/docman.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /docman.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by dpavlin, Fri Aug 4 10:07:04 2000 UTC revision 1.8 by dpavlin, Fri Aug 4 10:20:22 2000 UTC
# Line 1070  function Unlock($target) { Line 1070  function Unlock($target) {
1070    
1071  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
1072    
1073    function redir_to_url($url) {
1074            $url=urlencode(StripSlashes("$url"));
1075            $url=str_replace("%2F","/",$url);
1076            $url=str_replace("+","%20",$url);
1077            Header("Location: $url");
1078    }
1079    
1080    //////////////////////////////////////////////////////////////////
1081    
1082    function safe_rename($from,$to) {
1083            if (file_exists($from) && is_writable(dirname($to))) {
1084                    rename($from,$to);
1085            }
1086    }
1087    
1088    //////////////////////////////////////////////////////////////////
1089    
1090  // MAIN PROGRAM  // MAIN PROGRAM
1091  // ============  // ============
1092  // query parameters: capital letters  // query parameters: capital letters
# Line 1267  function Unlock($target) { Line 1284  function Unlock($target) {
1284                  if ( $CONFIRM != "on" ) break ;                  if ( $CONFIRM != "on" ) break ;
1285    
1286                  Logit("$fsDir/$FN","renamed $FN to $NEWNAME");                  Logit("$fsDir/$FN","renamed $FN to $NEWNAME");
1287                  rename("$fsDir/$FN","$fsDir/$NEWNAME");                  safe_rename("$fsDir/$FN","$fsDir/$NEWNAME");
1288                  rename("$fsDir/.log/$FN","$fsDir/.log/$NEWNAME");                  safe_rename("$fsDir/.log/$FN","$fsDir/.log/$NEWNAME");
1289                  rename("$fsDir/.note/$FN","$fsDir/.note/$NEWNAME");                  safe_rename("$fsDir/.note/$FN","$fsDir/.note/$NEWNAME");
1290                  rename("$fsDir/.lock/$FN","$fsDir/.lock/$NEWNAME");                  safe_rename("$fsDir/.lock/$FN","$fsDir/.lock/$NEWNAME");
1291    
1292                  break ;                  break ;
1293    
# Line 1325  function Unlock($target) { Line 1342  function Unlock($target) {
1342          case "Co" :          case "Co" :
1343                  // checkout                  // checkout
1344                  Lock("$gblFsRoot/$relDir/$F");                  Lock("$gblFsRoot/$relDir/$F");
1345                  $url="$relDir/$F"; $url=str_replace(" ","%20",$url);                  redir_to_url("$relDir/$F");
                 Header("Location: $url");  
1346                  exit;                  exit;
1347          case "Ci" :          case "Ci" :
1348                  // upload && update to $relDir                  // upload && update to $relDir
# Line 1341  function Unlock($target) { Line 1357  function Unlock($target) {
1357          case "V" :          case "V" :
1358                  // view                  // view
1359                  Log("viewed");                  Log("viewed");
1360                  $url="$relDir/$F"; $url=str_replace(" ","%20",$url);                  redir_to_url("$relDir/$F");
                 Header("Location: $url");  
1361                  exit;                  exit;
1362          }          }
1363    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.26