
/sprout/Controllers/Admin/FileAdminController.php Highlighted file source
Line 33: use Sprout\Helpers\FileConstants;
Line 79: 'Type' => [new ColModifierLookupArray(FileConstants::$type_names), 'type'],
Line 93: $this->refine_bar->addWidget(new RefineWidgetSelect('type', 'Type', FileConstants::$type_names));
Line 119: if (!empty($file['type']) and $file['type'] == FileConstants::TYPE_IMAGE) $list['embed_author'] = 'Embed author credit in image';
Line 309: $data['type'] = FileConstants::TYPE_OTHER;
Line 311: foreach (FileConstants::$type_exts as $type => $exts) {
Line 332: if ($data['type'] == FileConstants::TYPE_IMAGE) {
Line 400: if ($type == FileConstants::TYPE_IMAGE) {
Line 622: foreach (FileConstants::$type_exts as $type => $exts) {
Line 629: if ($file_type == 0) $file_type = FileConstants::TYPE_OTHER;
Line 703: if ($view->data['type'] == FileConstants::TYPE_IMAGE) {
Line 724: } else if ($view->data['type'] == FileConstants::TYPE_DOCUMENT) {
Line 789: $valid->addFieldError('replace', 'File must be of type: ' . FileConstants::$type_names[$file['type']]);
Line 812: if ($file['type'] == FileConstants::TYPE_DOCUMENT) {
Line 820: } else if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 845: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 906: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 929: } elseif ($file['type'] == FileConstants::TYPE_DOCUMENT) {
Line 938: if ($file['type'] == FileConstants::TYPE_IMAGE and $needs_regenerate_sizes) {
Line 951: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 983: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 1172: } else if ($file['type'] == FileConstants::TYPE_NONE) {
Line 1240: } else if ($file['type'] == FileConstants::TYPE_NONE) {
Line 1456: if ($_GET['f_type'] == FileConstants::TYPE_IMAGE or strpos(File::mimetype($row['filename']), 'image/') === 0) {

/sprout/Controllers/Admin/PageAdminController.php Highlighted file source
Line 33: use Sprout\Helpers\Constants;
Line 40: use Sprout\Helpers\FileConstants;
Line 218: 'admin_perm_type' => Constants::PERM_INHERIT,
Line 362: $update_fields['admin_perm_type'] = Constants::PERM_SPECIFIC;
Line 364: $update_fields['admin_perm_type'] = Constants::PERM_INHERIT;
Line 369: $update_fields['user_perm_type'] = Constants::PERM_SPECIFIC;
Line 371: $update_fields['user_perm_type'] = Constants::PERM_INHERIT;
Line 693: $update_fields['type'] = FileConstants::TYPE_IMAGE;
Line 1040: if ($data['admin_perm_type'] == Constants::PERM_SPECIFIC) {
Line 1049: if ($data['user_perm_type'] == Constants::PERM_SPECIFIC) {
Line 1562: $update_fields['admin_perm_type'] = Constants::PERM_SPECIFIC;
Line 1564: $update_fields['admin_perm_type'] = Constants::PERM_INHERIT;
Line 1569: $update_fields['user_perm_type'] = Constants::PERM_SPECIFIC;
Line 1571: $update_fields['user_perm_type'] = Constants::PERM_INHERIT;

/sprout/Controllers/Tinymce4Controller.php Highlighted file source
Line 25: use Sprout\Helpers\FileConstants;
Line 104: $res = Pdb::q($q, [FileConstants::TYPE_IMAGE], 'pdo');
Line 140: $res = Pdb::q($q, [$category_id, FileConstants::TYPE_IMAGE], 'pdo');
Line 174: $res = Pdb::q($q, [FileConstants::TYPE_IMAGE, $safe_key, $safe_key], 'pdo');
Line 394: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO], 'pdo');
Line 431: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO, $category_id], 'pdo');
Line 465: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO, $safe_key, $safe_key], 'pdo');
Line 501: $view->f_type = FileConstants::TYPE_IMAGE;
Line 505: $view->f_type = FileConstants::TYPE_VIDEO;
Line 509: $view->f_type = FileConstants::TYPE_DOCUMENT;
Line 548: $categories = Pdb::q($q, [FileConstants::TYPE_IMAGE], 'arr');

/sprout/Helpers/Auth.php Highlighted file source
Line 30: * @param int $algorithm Password algorithm, {@see Constants}
Line 38: case Constants::PASSWORD_SHA:
Line 42: case Constants::PASSWORD_SHA_SALT:
Line 46: case Constants::PASSWORD_SHA_SALT_5000:
Line 53: case Constants::PASSWORD_BCRYPT12:
Line 67: * @param int $algorithmPassword algorithm, {@see Constants}. If not specified, the default is used.
Line 77: case Constants::PASSWORD_PLAIN:
Line 78: case Constants::PASSWORD_SHA:
Line 82: case Constants::PASSWORD_SHA_SALT:
Line 87: case Constants::PASSWORD_SHA_SALT_5000:
Line 95: case Constants::PASSWORD_BCRYPT12:
Line 120: * @param int $algorithm Password algorithm, {@see Constants}
Line 126: case Constants::PASSWORD_SHA:
Line 127: case Constants::PASSWORD_SHA_SALT:
Line 128: case Constants::PASSWORD_PLAIN:
Line 129: case Constants::PASSWORD_SHA_SALT_5000:
Line 132: case Constants::PASSWORD_BCRYPT12:
Line 144: * @return int Password algorithm, {@see Constants}
Line 148: if (self::checkAlgorithm(Constants::PASSWORD_BCRYPT12)) {
Line 149: return Constants::PASSWORD_BCRYPT12;
Line 151: return Constants::PASSWORD_SHA_SALT_5000;

/sprout/Helpers/Fb.php Highlighted file source
Line 512: if ($type == FileConstants::TYPE_IMAGE) {
Line 602: * 'filter': (int) One of the filters, e.g. {@see FileConstants}::TYPE_IMAGE
Line 638: if ($options['filter'] == FileConstants::TYPE_IMAGE or strpos(File::mimetype($value), 'image/') === 0) {
Line 1711: * 'filter': (int) One of the filters, e.g. {@see FileConstants}::TYPE_IMAGE

/sprout/Helpers/File.php Highlighted file source
Line 93: * @return int One of the FileConstants::TYPE_* values, see {@see FileConstants}.
Line 94: * If the type couldn't be determined, FileConstants::TYPE_OTHER is returned.
Line 99: foreach (FileConstants::$type_exts as $type => $exts) {
Line 102: return FileConstants::TYPE_OTHER;
Line 630: $params['type_image'] = GalleryConstants::SOURCE_FILES_IMAGE;
Line 669: return (isset(Constants::$mimetypes[$ext]) ? Constants::$mimetypes[$ext] : 'application/octet-stream');
Line 718: * Constants. Use this with care.
Line 1034: * @param int $file_type The new file type - e.g. DOCUMENT or IMAGE; see FileConstants
Line 1045: case FileConstants::TYPE_DOCUMENT:
Line 1054: case FileConstants::TYPE_IMAGE:

/sprout/tests/adminPermsTest.php Highlighted file source
Line 15: use Sprout\Helpers\Constants;
Line 30: ['id' => 1, 'parent_id' => 0, 'admin_perm_type' => Constants::PERM_INHERIT], // top-level, all
Line 31: ['id' => 2, 'parent_id' => 1, 'admin_perm_type' => Constants::PERM_INHERIT], // inherit, all
Line 32: ['id' => 3, 'parent_id' => 1, 'admin_perm_type' => Constants::PERM_SPECIFIC], // no perms
Line 33: ['id' => 4, 'parent_id' => 1, 'admin_perm_type' => Constants::PERM_SPECIFIC], // group 1
Line 34: ['id' => 5, 'parent_id' => 1, 'admin_perm_type' => Constants::PERM_SPECIFIC], // group 2
Line 36: ['id' => 6, 'parent_id' => 0, 'admin_perm_type' => Constants::PERM_SPECIFIC], // top-level, none
Line 37: ['id' => 7, 'parent_id' => 6, 'admin_perm_type' => Constants::PERM_INHERIT], // inherit, none
Line 38: ['id' => 8, 'parent_id' => 6, 'admin_perm_type' => Constants::PERM_SPECIFIC], // specific, group 1
Line 40: ['id' => 9, 'parent_id' => 0, 'admin_perm_type' => Constants::PERM_SPECIFIC], // top-level, group 1
Line 41: ['id' => 10,'parent_id' => 9, 'admin_perm_type' => Constants::PERM_INHERIT], // inherit, group 1
Line 42: ['id' => 11,'parent_id' => 9, 'admin_perm_type' => Constants::PERM_SPECIFIC], // specific, group 2

/sprout/tests/admin_authTest.php Highlighted file source
Line 15: use Sprout\Helpers\Constants;
Line 24: [Constants::PASSWORD_SHA_SALT],
Line 25: [Constants::PASSWORD_SHA_SALT_5000],
Line 26: [Constants::PASSWORD_BCRYPT12],
Line 69: $this->assertTrue(AdminAuth::checkAlgorithm(Constants::PASSWORD_SHA_SALT));
Line 70: $this->assertTrue(AdminAuth::checkAlgorithm(Constants::PASSWORD_SHA_SALT_5000));

/sprout/views/admin/file_add_dragdrop_form.php Highlighted file source
Line 19: use Sprout\Helpers\FileConstants;
Line 72: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT): ?>
Line 88: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT and !empty($document_types)): ?>
Line 97: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 107: <?php if ($data['type'] == FileConstants::TYPE_IMAGE and !empty($shrink_original)): ?>
Line 128: <div class="field-label"><?php echo Enc::html(FileConstants::$type_names[$data['type']]); ?></div>
Line 146: <?php if ($data['type'] == FileConstants::TYPE_SOUND): ?>
Line 152: <?php if ($data['type'] == FileConstants::TYPE_VIDEO): ?>

/sprout/views/admin/file_contents_thumbs.php Highlighted file source
Line 19: use Sprout\Helpers\FileConstants;
Line 39: if ($row['type'] == FileConstants::TYPE_IMAGE) {
Line 43: if($row['type'] == FileConstants::TYPE_DOCUMENT) {
Line 45: } elseif($row['type'] == FileConstants::TYPE_SOUND) {
Line 47: } elseif($row['type'] == FileConstants::TYPE_VIDEO) {
Line 49: } elseif($row['type'] == FileConstants::TYPE_OTHER) {
Line 54: echo '<div class="image-link__placeholder"><div class="image-link__placeholder__content"><div class="image-link__placeholder__icon icon-before ' . $placeholderIcon . '"></div>', FileConstants::$type_names[$row['type']], '</div></div>';

/sprout/views/admin/file_edit.php Highlighted file source
Line 21: use Sprout\Helpers\FileConstants;
Line 30: if ($data['type'] == FileConstants::TYPE_IMAGE) {
Line 40: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 65: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT): ?>
Line 90: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?><th>Image dimensions</th><?php endif; ?>
Line 95: <td><?= Enc::html(FileConstants::$type_names[$data['type']]); ?></td>
Line 96: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?><td><?= Enc::html($img_dimensions); ?></td><?php endif; ?>
Line 104: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 138: <?php elseif ($data['type'] == FileConstants::TYPE_DOCUMENT and $data['plaintext']): ?>
Line 144: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 219: <p>Replacement file must be of the type <b><?php echo FileConstants::$type_names[$data['type']]; ?></b>.</p>

/sprout/views/admin/page_edit.php Highlighted file source
Line 17: use Sprout\Helpers\Constants;
Line 20: use Sprout\Helpers\FileConstants;
Line 97: echo Form::fileSelector('banner', [], ['filter' => FileConstants::TYPE_IMAGE]);
Line 103: echo Form::fileSelector('gallery_thumb', [], ['filter' => FileConstants::TYPE_IMAGE]);
Line 245: echo Enc::html(Constants::$rev_statuses[$rev['status']]);

/sprout/Widgets/FileListWidget.php Highlighted file source
Line 16: use Sprout\Helpers\FileConstants;
Line 30: protected $default_settings = ['order' => FileConstants::ORDER_NAME];
Line 84: $out .= Form::dropdown('order', [], FileConstants::$order_names);
Line 114: 'Order' => FileConstants::$order_names[$this->settings['order']],
Line 125: case FileConstants::ORDER_NAME:
Line 128: case FileConstants::ORDER_MANUAL:
Line 131: case FileConstants::ORDER_OLDEST:
Line 134: case FileConstants::ORDER_NEWEST:
A total of 212 lines in 45 files were found