PHP 8.2.30
Preview: ConfValidation.php Size: 994 B
//proc/thread-self/root/usr/local/lsws/admin/html.6.2.2/classes/ws/ConfValidation.php

<?php

class ConfValidation extends CValidation
{
	protected function validatePostTbl($tbl, &$d)
	{
		$isValid = parent::validatePostTbl($tbl, $d);
		
		if ($tbl->_id == 'VH_SECHL') {
			$res = $this->chkPostTbl_VH_SECHL($d);
			$this->setValid($isValid, $res);
		}
		return $isValid;
	}
	
	protected function chkPostTbl_VH_SECHL(&$d)
	{
		$isValid = 1;
		if ( $d['enableHotlinkCtrl']->GetVal() == '0' ) {
			if ( isset($d['suffixes']) && !$d['suffixes']->HasVal() ) {
				$d['suffixes']->SetErr(null);
			}
			if ( isset($d['allowDirectAccess']) && !$d['allowDirectAccess']->HasVal() ) {
				$d['allowDirectAccess']->SetErr(null);
			}
			if ( isset($d['onlySelf']) && !$d['onlySelf']->HasVal() ) {
				$d['onlySelf']->SetErr(null);
			}
			$isValid = 2;
		} else {
			if ( $d['onlySelf']->GetVal() == '0'
			&&  !$d['allowedHosts']->HasVal() ) {
				$d['allowedHosts']->SetErr('Must be specified if "Only Self Reference" is set to No');
				$isValid = -1;
			}
		}
		return $isValid;
	}

	
}

Directory Contents

Dirs: 0 × Files: 12

Name Size Perms Modified Actions
9.10 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
32.13 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
994 B lrw-r--r-- 2024-07-11 02:32:02
Edit Download
2.17 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
239.11 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
13.60 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
115.71 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
2.35 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
2.27 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
5.21 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
16.76 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download
8.55 KB lrw-r--r-- 2024-07-11 02:32:02
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).