update php pheaders to phpdoc style

This commit is contained in:
Jean-Christian 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
* Update license
1.0.3
- [x] update php headers to phpdoc style
entryPhotoExifWidget 1.0.1 - 2021-08-17
* Move to Franck style
1.0.2 - 2021-08-19
- Update license
entryPhotoExifWidget 1.0 - 2016-11-04
* First release
* Find images of an entry and paste their exif on a widget
1.0.1 - 2021-08-17
- Move to Franck style
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
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of entryPhotoExifWidget, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
/**
* @brief entryPhotoExifWidget, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and contibutors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return null;
return null;
}
require_once dirname(__FILE__) . '/_widgets.php';

View file

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

View file

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

View file

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

View file

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