update php pheaders to phpdoc style

master
Jean-Christian Paul Denis 2021-09-02 14:48:50 +02:00
parent 90703e4978
commit 97d6c213c7
6 changed files with 72 additions and 71 deletions

View File

@ -1,9 +1,12 @@
entryPhotoExifWidget 1.0.2 - 2021-08-19 1.0.3
* Update license - [x] update php headers to phpdoc style
entryPhotoExifWidget 1.0.1 - 2021-08-17 1.0.2 - 2021-08-19
* Move to Franck style - Update license
entryPhotoExifWidget 1.0 - 2016-11-04 1.0.1 - 2021-08-17
* First release - Move to Franck style
* Find images of an entry and paste their exif on a widget
1.0 - 2016-11-04
- First release
- Find images of an entry and paste their exif on a widget

View File

@ -1,18 +1,18 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief entryPhotoExifWidget, a plugin for Dotclear 2
# This file is part of entryPhotoExifWidget, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contibutors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_CONTEXT_ADMIN')) { if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;
} }
require_once dirname(__FILE__) . '/_widgets.php'; require_once dirname(__FILE__) . '/_widgets.php';

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief entryPhotoExifWidget, a plugin for Dotclear 2
# This file is part of entryPhotoExifWidget, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contibutors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief entryPhotoExifWidget, a plugin for Dotclear 2
# This file is part of entryPhotoExifWidget, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contibutors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief entryPhotoExifWidget, a plugin for Dotclear 2
# This file is part of entryPhotoExifWidget, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contibutors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;
@ -350,7 +350,7 @@ class entryPhotoExifWidget
'title' => $alt 'title' => $alt
); );
} }
return $res; return $res;
} }
@ -372,7 +372,7 @@ class entryPhotoExifWidget
'ExposureBiasValue' => array(__('Exposure Bias:'), ''), 'ExposureBiasValue' => array(__('Exposure Bias:'), ''),
'MeteringMode' => array(__('Metering mode:'), '') 'MeteringMode' => array(__('Metering mode:'), '')
); );
$exp_prog = array( $exp_prog = array(
0 => __('Not defined'), 0 => __('Not defined'),
1 => __('Manual'), 1 => __('Manual'),
@ -384,7 +384,7 @@ class entryPhotoExifWidget
7 => __('Portait mode'), 7 => __('Portait mode'),
8 => __('Landscape mode') 8 => __('Landscape mode')
); );
$met_mod = array( $met_mod = array(
0 => __('Unknow'), 0 => __('Unknow'),
1 => __('Average'), 1 => __('Average'),
@ -395,7 +395,7 @@ class entryPhotoExifWidget
6 => __('Partial'), 6 => __('Partial'),
7 => __('Other') 7 => __('Other')
); );
if (!$src || !file_exists($src)) return $metas; if (!$src || !file_exists($src)) return $metas;
$m = imageMeta::readMeta($src); $m = imageMeta::readMeta($src);
@ -428,7 +428,7 @@ class entryPhotoExifWidget
{ {
$metas['Location'][1] .= html::escapeHTML($m['Country']); $metas['Location'][1] .= html::escapeHTML($m['Country']);
} }
# DateTimeOriginal # DateTimeOriginal
if (!empty($m['DateTimeOriginal'])) if (!empty($m['DateTimeOriginal']))
{ {
@ -436,71 +436,71 @@ class entryPhotoExifWidget
$dt_tz = $core->blog->settings->system->blog_timezone; $dt_tz = $core->blog->settings->system->blog_timezone;
$metas['DateTimeOriginal'][1] = dt::dt2str($dt_ft, $m['DateTimeOriginal'], $dt_tz); $metas['DateTimeOriginal'][1] = dt::dt2str($dt_ft, $m['DateTimeOriginal'], $dt_tz);
} }
# Make # Make
if (isset($m['Make'])) if (isset($m['Make']))
{ {
$metas['Make'][1] = html::escapeHTML($m['Make']); $metas['Make'][1] = html::escapeHTML($m['Make']);
} }
# Model # Model
if (isset($m['Model'])) if (isset($m['Model']))
{ {
$metas['Model'][1] = html::escapeHTML($m['Model']); $metas['Model'][1] = html::escapeHTML($m['Model']);
} }
# Lens # Lens
if (isset($m['Lens'])) if (isset($m['Lens']))
{ {
$metas['Lens'][1] = html::escapeHTML($m['Lens']); $metas['Lens'][1] = html::escapeHTML($m['Lens']);
} }
# ExposureProgram # ExposureProgram
if (isset($m['ExposureProgram'])) if (isset($m['ExposureProgram']))
{ {
$metas['ExposureProgram'][1] = isset($exp_prog[$m['ExposureProgram']]) ? $metas['ExposureProgram'][1] = isset($exp_prog[$m['ExposureProgram']]) ?
$exp_prog[$m['ExposureProgram']] : $m['ExposureProgram']; $exp_prog[$m['ExposureProgram']] : $m['ExposureProgram'];
} }
# Exposure # Exposure
if (!empty($m['Exposure'])) if (!empty($m['Exposure']))
{ {
$metas['Exposure'][1] = $m['Exposure'] . 's'; $metas['Exposure'][1] = $m['Exposure'] . 's';
} }
# FNumber # FNumber
if (!empty($m['FNumber'])) if (!empty($m['FNumber']))
{ {
$ap = sscanf($m['FNumber'], '%d/%d'); $ap = sscanf($m['FNumber'], '%d/%d');
$metas['FNumber'][1] = $ap ? 'f/' . ( $ap[0] / $ap[1]) : $m['FNumber']; $metas['FNumber'][1] = $ap ? 'f/' . ( $ap[0] / $ap[1]) : $m['FNumber'];
} }
# ISOSpeedRatings # ISOSpeedRatings
if (!empty($m['ISOSpeedRatings'])) if (!empty($m['ISOSpeedRatings']))
{ {
$metas['ISOSpeedRatings'][1] = $m['ISOSpeedRatings']; $metas['ISOSpeedRatings'][1] = $m['ISOSpeedRatings'];
} }
# FocalLength # FocalLength
if (!empty($m['FocalLength'])) if (!empty($m['FocalLength']))
{ {
$fl = sscanf($m['FocalLength'], '%d/%d'); $fl = sscanf($m['FocalLength'], '%d/%d');
$metas['FocalLength'][1] = $fl ? $fl[0]/$fl[1] . 'mm' : $m['FocalLength']; $metas['FocalLength'][1] = $fl ? $fl[0]/$fl[1] . 'mm' : $m['FocalLength'];
} }
# ExposureBiasValue # ExposureBiasValue
if (isset($m['ExposureBiasValue'])) if (isset($m['ExposureBiasValue']))
{ {
$metas['ExposureBiasValue'][1] = $m['ExposureBiasValue']; $metas['ExposureBiasValue'][1] = $m['ExposureBiasValue'];
} }
# MeteringMode # MeteringMode
if (isset($m['MeteringMode'])) if (isset($m['MeteringMode']))
{ {
$metas['MeteringMode'][1] = isset($met_mod[$m['MeteringMode']]) ? $metas['MeteringMode'][1] = isset($met_mod[$m['MeteringMode']]) ?
$exp_prog[$m['MeteringMode']] : $m['MeteringMode']; $exp_prog[$m['MeteringMode']] : $m['MeteringMode'];
} }
return $metas; return $metas;
} }
} }

View File

@ -150,6 +150,4 @@ $GLOBALS['__l10n']['Multi spot'] = 'Multi spot';
$GLOBALS['__l10n']['Pattern'] = 'Multizone'; $GLOBALS['__l10n']['Pattern'] = 'Multizone';
#_widgets.php:400 #_widgets.php:400
$GLOBALS['__l10n']['Partial'] = 'Partielle'; $GLOBALS['__l10n']['Partial'] = 'Partielle';
?>