mirror of
https://github.com/typemill/typemill.git
synced 2025-07-31 19:30:40 +02:00
Version 1.3.1: Improve Meta-Tabs
This commit is contained in:
@@ -53,8 +53,15 @@ class Folder
|
||||
{
|
||||
if (is_dir($folderPath . DIRECTORY_SEPARATOR . $item))
|
||||
{
|
||||
$subFolder = $item;
|
||||
$folderContent[$subFolder] = self::scanFolder($folderPath . DIRECTORY_SEPARATOR . $subFolder, $draft);
|
||||
|
||||
$subFolder = $item;
|
||||
$folderPublished = file_exists($folderPath . DIRECTORY_SEPARATOR . $item . DIRECTORY_SEPARATOR . 'index.md');
|
||||
|
||||
# scan that folder only if it is a draft or if the folder is published (contains index.md)
|
||||
if($draft OR $folderPublished)
|
||||
{
|
||||
$folderContent[$subFolder] = self::scanFolder($folderPath . DIRECTORY_SEPARATOR . $subFolder, $draft);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -329,11 +329,11 @@ class Validation
|
||||
* @return obj $v the validation object passed to a result method.
|
||||
*/
|
||||
|
||||
public function objectField($fieldName, $fieldValue, $objectName, $fieldDefinitions)
|
||||
public function objectField($fieldName, $fieldValue, $objectName, $fieldDefinitions, $skiprequired = NULL)
|
||||
{
|
||||
$v = new Validator(array($fieldName => $fieldValue));
|
||||
|
||||
if(isset($fieldDefinitions['required']))
|
||||
|
||||
if(isset($fieldDefinitions['required']) && !$skiprequired)
|
||||
{
|
||||
$v->rule('required', $fieldName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user