ajax.php
changeset 28 dd2edcdc6c03
parent 22 d0314575e2f0
child 29 e5484a9e0818
equal deleted inserted replaced
27:dd659f6ba891 28:dd2edcdc6c03
    71       break;
    71       break;
    72     case "flushlogs":
    72     case "flushlogs":
    73       echo PageUtils::flushlogs($paths->cpage['urlname_nons'], $paths->namespace);
    73       echo PageUtils::flushlogs($paths->cpage['urlname_nons'], $paths->namespace);
    74       break;
    74       break;
    75     case "deletepage":
    75     case "deletepage":
    76       echo PageUtils::deletepage($paths->cpage['urlname_nons'], $paths->namespace);
    76       $reason = ( isset($_POST['reason']) ) ? $_POST['reason'] : false;
       
    77       if ( empty($reason) )
       
    78         die('Please enter a reason for deleting this page.');
       
    79       echo PageUtils::deletepage($paths->cpage['urlname_nons'], $paths->namespace, $reason);
    77       break;
    80       break;
    78     case "delvote":
    81     case "delvote":
    79       echo PageUtils::delvote($paths->cpage['urlname_nons'], $paths->namespace);
    82       echo PageUtils::delvote($paths->cpage['urlname_nons'], $paths->namespace);
    80       break;
    83       break;
    81     case "resetdelvotes":
    84     case "resetdelvotes":