CleanUp-Talk

Summary: Talk page for CleanUp.
Maintainer: Petko
Users: +6 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Is it possible to specify separate $CleanUpKeepDays for a group or an individual page? simon August 01, 2012, at 04:47 AM

No. Note that $CleanUpKeepDays only concerns "deleted" pages and uploads, not old versions of existing pages which are kept until the pages exist, for at least $DiffKeepDays days. --Petko August 01, 2012, at 06:06 AM

Thanks, I should have been clearer. I use $UploadPrefixFmt = '/$Group/$Name'; # per-page attachments. I was thinking that for uploads against a group or a page I'd like to have different setting. simon August 01, 2012, at 06:59 PM

It is not impossible, but very impractical. In config.php only include the script. For every wikigroup, create a file local/MyGroup1.php with only its own $CleanUpDirs['uploads/MyGroup1'] and $CleanUpKeepDays and then call [[MyGroup1.AnyPage?action=cleanup]]. Instead of this, I'd suggest setting in config.php the longest $CleanUpKeepDays for all pages. --Petko August 01, 2012, at 07:36 PM


Is

$CleanUpDirs["uploads"] = 1; # cleanup deleted uploads

that same as

$CleanUpDirs[$UploadDir] = 1; # cleanup deleted uploads

and if not shouldn't it be? simon September 11, 2012, at 09:12 PM

Only if $UploadDir is defined before this line, and it generally is not (the default $UploadDir is set in upload.php much later). --Petko September 12, 2012, at 01:31 AM

Talk page for the CleanUp recipe (users).

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_COOKIE] => imstime=1777612928; PHPSESSID=f48ladlukos0okk6ncisibrgk1
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=Cookbook%2fCleanUp%2dTalk
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Cookbook%2fCleanUp%2dTalk
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/CleanUp-Talk
            [REDIRECT_SCRIPT_URL] => /wiki/Cookbook/CleanUp-Talk
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afQ4lOP4zmuaTmd7K7gRugAAAQA
            [REDIRECT_URL] => /wiki/Cookbook/CleanUp-Talk
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 11170
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Cookbook/CleanUp-Talk
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/CleanUp-Talk
            [SCRIPT_URL] => /wiki/Cookbook/CleanUp-Talk
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afQ4lOP4zmuaTmd7K7gRugAAAQA
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777612948.3243
            [REQUEST_TIME] => 1777612948
            [argv] => Array
                (
                    [0] => n=Cookbook%2fCleanUp%2dTalk
                )

            [argc] => 1
        )

)