Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
annda committed Oct 21, 2024
1 parent 96df3e7 commit ed713dc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 0 additions & 2 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
class action_plugin_imgpaste extends DokuWiki_Action_Plugin
{

protected $tempdir = '';
protected $tempfile = '';

Expand Down Expand Up @@ -162,5 +161,4 @@ protected function fail($status, $text = '')
http_status($status, $text);
exit;
}

}
1 change: 1 addition & 0 deletions conf/default.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Default settings for the imgpaste plugin
*
Expand Down
3 changes: 1 addition & 2 deletions conf/metadata.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php

/**
* Options for the imgpaste plugin
*
* @author Andreas Gohr <[email protected]>
*/


$meta['filename'] = array('string');

9 changes: 6 additions & 3 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class helper_plugin_imgpaste extends Plugin
* @param string $id The ID to link to
* @return string The relative ID
*/
public static function createRelativeID($ref, $id) {
public static function createRelativeID($ref, $id)
{
// Split the reference and target IDs into namespaces
$sourceNs = explode(':', $ref);
array_pop($sourceNs); // Remove the page part, keep only the namespace
Expand All @@ -34,9 +35,11 @@ public static function createRelativeID($ref, $id) {

// Find the common prefix length
$commonPrefixLength = 0;
while ($commonPrefixLength < count($sourceNs) &&
while (
$commonPrefixLength < count($sourceNs) &&
$commonPrefixLength < count($targetNs) &&
$sourceNs[$commonPrefixLength] === $targetNs[$commonPrefixLength]) {
$sourceNs[$commonPrefixLength] === $targetNs[$commonPrefixLength]
) {
$commonPrefixLength++;
}

Expand Down

0 comments on commit ed713dc

Please sign in to comment.