Skip to content

Commit

Permalink
typo: adress > address fix #429
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-peugnet committed Sep 30, 2024
1 parent b0903fe commit 3de8c27
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ __W__ don't need any database manager as it use a "flat file" system.
Install the latest release
--------------------------

Simply download the [latest realease](https://github.com/vincent-peugnet/wcms/releases/latest) from github, and unzip it in your hosted folder. You can put W at the root of your domain, or in subfolders. Then access the adress in your browser and follow the differents steps.
Simply download the [latest realease](https://github.com/vincent-peugnet/wcms/releases/latest) from github, and unzip it in your hosted folder. You can put W at the root of your domain, or in subfolders. Then access the address in your browser and follow the differents steps.

W will ask you for the path you've installed it, if you installed it at the root, leave this field blank, otherwise, indiquate the subfolders like `path/to/wcms`.

Expand Down
4 changes: 2 additions & 2 deletions app/class/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ public static function getdomain()
}

/**
* Generate full url adress where W is installed
* @return string url adress finished by a slash "/"
* Generate full url address where W is installed
* @return string url address finished by a slash "/"
*/
public static function url($endslash = true): string
{
Expand Down
4 changes: 2 additions & 2 deletions app/class/Controllermedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function desktop()
} catch (Folderexception $e) {
Model::sendflashmessage($e->getMessage(), Model::FLASH_WARNING);
$this->mediaopt->setpath(Model::MEDIA_DIR);
$this->redirect($this->generate("media", [], $this->mediaopt->getpathadress()));
$this->redirect($this->generate("media", [], $this->mediaopt->getpathaddress()));
}

$medialist = $this->mediamanager->medialistopt($mediaopt);
Expand Down Expand Up @@ -235,7 +235,7 @@ public function fontface()
Model::FLASH_ERROR
);
}
$this->redirect($this->generate("media", [], $this->mediaopt->getpathadress()));
$this->redirect($this->generate("media", [], $this->mediaopt->getpathaddress()));
} else {
http_response_code(403);
$this->showtemplate('forbidden');
Expand Down
8 changes: 4 additions & 4 deletions app/class/Mediaopt.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public function __construct(array $datas = [])
}

/**
* Generate link adress for table header
* Generate link address for table header
*
* @param string $sortby
* @return string link adress
* @return string link address
*/
public function getsortbyadress(string $sortby): string
public function getsortbyaddress(string $sortby): string
{
if (!in_array($sortby, Modelmedia::MEDIA_SORTBY)) {
$sortby = 'id';
Expand All @@ -58,7 +58,7 @@ public function getsortbyadress(string $sortby): string
* @param string $path Media path to display. Default is the current path.
* @return string URL-encoded path, filter and sort parameters, startiting with a `?`
*/
public function getpathadress(string $path = null): string
public function getpathaddress(string $path = null): string
{
$path = is_null($path) ? $this->path : "/$path";
$query = ['path' => $path, 'sortby' => $this->sortby, 'order' => $this->order];
Expand Down
2 changes: 1 addition & 1 deletion app/class/Modelmedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public static function treecount(
}
$class = $selected ? ' class="selected"' : '';
echo "<tr$class>";
$href = $mediaopt->getpathadress($path);
$href = $mediaopt->getpathaddress($path);
$foldername = str_repeat('&nbsp;&nbsp;', $deepness) . $folder;
echo "<td><a href=\"$href\">$foldername</a></td>";
echo '<td>' . $dirlist['dirfilecount'] . '</td>';
Expand Down
2 changes: 1 addition & 1 deletion app/view/templates/editleftbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class="toggle"

<fieldset id="external">
<label for="externalcss">External CSS</label>
<input type="text" name="externalcss[]" id="externalcss" placeholder="add external adress" form="update">
<input type="text" name="externalcss[]" id="externalcss" placeholder="add external address" form="update">
<?php
foreach ($page->externalcss() as $css) {
?>
Expand Down
16 changes: 8 additions & 8 deletions app/view/templates/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
<h2>
/<?= $mediaopt->dir() ?>
<span class="right">
<a href="<?= $mediaopt->getpathadress() ?>&display=list" <?= $workspace->mediadisplay() === Wcms\Workspace::LIST ? 'class="selected"' : '' ?> >
<a href="<?= $mediaopt->getpathaddress() ?>&display=list" <?= $workspace->mediadisplay() === Wcms\Workspace::LIST ? 'class="selected"' : '' ?> >
<i class="fa fa-th-list"></i>
</a>
<a href="<?= $mediaopt->getpathadress() ?>&display=gallery" <?= $workspace->mediadisplay() === Wcms\Workspace::GALLERY ? 'class="selected"' : '' ?> >
<a href="<?= $mediaopt->getpathaddress() ?>&display=gallery" <?= $workspace->mediadisplay() === Wcms\Workspace::GALLERY ? 'class="selected"' : '' ?> >
<i class="fa fa-th-large"></i>
</a>
</span>
Expand Down Expand Up @@ -132,23 +132,23 @@
<tr>
<th id="checkall">x</th>
<th>
<a href="<?= $mediaopt->getsortbyadress('filename') ?>">filename</a>
<a href="<?= $mediaopt->getsortbyaddress('filename') ?>">filename</a>
<?= $this->insert('macro_tablesort', ['opt' => $mediaopt, 'th' => 'filename']) ?>
</th>
<th>
<a href="<?= $mediaopt->getsortbyadress('extension') ?>">ext</a>
<a href="<?= $mediaopt->getsortbyaddress('extension') ?>">ext</a>
<?= $this->insert('macro_tablesort', ['opt' => $mediaopt, 'th' => 'extension']) ?>
</th>
<th>
<a href="<?= $mediaopt->getsortbyadress('type') ?>">type</a>
<a href="<?= $mediaopt->getsortbyaddress('type') ?>">type</a>
<?= $this->insert('macro_tablesort', ['opt' => $mediaopt, 'th' => 'type']) ?>
</th>
<th>
<a href="<?= $mediaopt->getsortbyadress('size') ?>">size</a>
<a href="<?= $mediaopt->getsortbyaddress('size') ?>">size</a>
<?= $this->insert('macro_tablesort', ['opt' => $mediaopt, 'th' => 'size']) ?>
</th>
<th>
<a href="<?= $mediaopt->getsortbyadress('date') ?>">date</a>
<a href="<?= $mediaopt->getsortbyaddress('date') ?>">date</a>
<?= $this->insert('macro_tablesort', ['opt' => $mediaopt, 'th' => 'date']) ?>
</th>
<th>user</th>
Expand All @@ -171,7 +171,7 @@
<i class="fa fa-pencil"></i>
</summary>
<form action="<?= $this->url('mediarename') ?>" method="post">
<input type="hidden" name="route" value="<?= $mediaopt->getpathadress() ?>">
<input type="hidden" name="route" value="<?= $mediaopt->getpathaddress() ?>">
<input type="hidden" name="dir" value="<?= $media->dir() ?>">
<input type="hidden" name="oldfilename" value="<?= $media->filename() ?>">
<input type="text" name="newfilename" value="<?= $media->filename() ?>" id="newid-<?= $media->filename() ?>" maxlength="<?= Wcms\Model::MAX_ID_LENGTH ?>" minlength="1" required>
Expand Down
12 changes: 6 additions & 6 deletions app/view/templates/mediamenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</h3>
<p>max upload file size : <?= $maxuploadsize ?></p>
<form id=addmedia action="<?= $this->url('mediaupload') ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="route" value="<?= $mediaopt->getpathadress() ?>">
<input type="hidden" name="route" value="<?= $mediaopt->getpathaddress() ?>">
<input type='file' id="file" name='file[]' multiple required>

<div>
Expand All @@ -25,14 +25,14 @@
<label for="url"><i class="fa fa-cloud-upload"></i> Upload from URL</label>
</h3>
<form id="addurlmedia" action="<?= $this->url('mediaurlupload') ?>" method="post">
<input type="hidden" name="route" value="<?= $mediaopt->getpathadress() ?>">
<input type="hidden" name="route" value="<?= $mediaopt->getpathaddress() ?>">
<input type="text" name="url" id="url" placeholder="paste url here">
<input type="hidden" name="dir" value="<?= $mediaopt->dir() ?>">
<input type="submit" value="upload">
</form>
<h2>New folder</h2>
<form id="folderadd" action="<?= $this->url('mediafolderadd') ?>" method="post">
<input type="hidden" name="route" value="<?= $mediaopt->getpathadress() ?>">
<input type="hidden" name="route" value="<?= $mediaopt->getpathaddress() ?>">
<label for="foldername"><i class="fa fa-folder"></i> New folder</label>
<input type="text" name="foldername" id="foldername" placeholder="folder name" required>
<input type="hidden" name="dir" value="<?= $mediaopt->dir() ?>">
Expand All @@ -43,7 +43,7 @@
<?php if($user->issupereditor()) { ?>
<h2>Delete folder</h2>
<form action="<?= $this->url('mediafolderdelete') ?>" id="deletefolder" method="post">
<input type="hidden" name="route" value="<?= $mediaopt->getpathadress('media') ?>">
<input type="hidden" name="route" value="<?= $mediaopt->getpathaddress('media') ?>">
<input type="hidden" name="dir" value="<?= $mediaopt->dir() ?>/">
<input type="checkbox" name="deletefolder" id="confirmdeletefolder" value="1">
<label for="confirmdeletefolder">Delete current folder and all it's content</label>
Expand All @@ -54,7 +54,7 @@

<h2>Magic folders</h2>
<h3><i class="fa fa-font"></i> fonts</h3>
<a href="<?= $this->url('mediafontface', [], $mediaopt->getpathadress()) ?>">
<a href="<?= $this->url('mediafontface', [], $mediaopt->getpathaddress()) ?>">
<i class="fa fa-refresh"></i>regenerate @fontface CSS file
</a>
</div>
Expand All @@ -69,7 +69,7 @@

<h2>Move</h2>
<form action="<?= $this->url('mediaedit') ?>" method="post" id="mediaedit">
<input type="hidden" name="route" value="<?= $mediaopt->getpathadress() ?>">
<input type="hidden" name="route" value="<?= $mediaopt->getpathaddress() ?>">
<input type="hidden" name="path" value="<?= $mediaopt->dir() ?>">
<label for="moveto">Move selected medias to a new directory</label>
<br>
Expand Down

0 comments on commit 3de8c27

Please sign in to comment.