PHP Classes

File: tools/fix-symlinks.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   tools/fix-symlinks.php   Download  
File: tools/fix-symlinks.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: CMS Airship
Content management system with security features
Author: By
Last change: Improve the Bridge landing page.

- Direct new users to create a new Author before
anything else.
- General UI / UX improvements.
Date: 7 years ago
Size: 555 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

require_once \
dirname(__DIR__).'/src/bootstrap.php';

/* This tool just cleans up symlinks.
 *
 * This should be run if you are upgrading from version 1.x to 2.x.
 */

# View/common
foreach (\glob(ROOT . '/Cabin/*') as $cabinName) {
    if (!\
is_dir($cabinName)) {
        continue;
    }
    if (!\
is_dir($cabinName . '/View')) {
        continue;
    }
    if (\
file_exists($cabinName . '/View/common')) {
        \
unlink($cabinName . '/View/common');
    }
    \
symlink(ROOT . '/common', $cabinName . '/View/common');
}