• About
  • Requests
  • Free Add-ons
  • Paid Add-ons (NEW)
  • Customer Reviews
  • My account
  • Docs
  • DEMO
  • About
  • Requests
  • Free Add-ons
  • Paid Add-ons (NEW)
  • Customer Reviews
  • My account
  • Docs
  • DEMO
home/Knowledge Base/Free Addons/Core Compare Tool

Core Compare Tool

208 views 5 September 9, 2020 October 16, 2020

Add-on Name: Core Compare Tool
Version: 0.1.5
Updated: 09/09/2020
Supports CE Phoenix: >= 1.0.7.5
Supports OS Commerce:  >= 2.3.4.0

Description of Add-on

This admin tool will allow you to download a copy of the core version you are using and compare it to your installed version. It will then outline:

  • Added Files
  • Changed Files
  • Deleted Files

You can also remove cores as you upgrade.

Screenshot(s)

Change Log

  • 0.1.5 (09/09/2020)
    • Code cleanup
    • Added settings page
    • Added exclude directories option to ignore certain folders
  • 0.1.4 (09/02/2020)
    • Changed exec() to use scandir() for directories
    • Fixed error as there was a single <? short tag in code
    • Fixed some syntax issues that created errors in earlier versions of PHP 7
  • 0.1.3 (08/27/2020)
    • Fixed some layout issues in Google Chrome for table formatting
  • 0.1.2 (08/22/2020)
    • Added replace feature for missing or altered files to revert them to core version
  • 0.1.1 (08/20/2020)
    • removed this tool from Zipur Toolbox and made it a stand alone tool
  • 0.1.0 (08/06/2020)
    • Initial Release

Download(s)

Install Instructions:

  • Download the zip file below
  • Unzip the file
  • Copy the contents of the zip into the root of your catalog

Download “Core Compare Tool” ZipurCoreCompareTool_0_1_5.zip – Downloaded 56 times – 13 KB

Tags:PhoenixOS CommerceApp

Do you like this item?

5 Yes  No
Related Articles
  • Canada Post (REST) Module
  • Database Tool
  • OSCommerce to CE Phoenix Migration Utility
  • Language Tool (Search/Edit)
  • Favorite Countries
  • Zipur Toolbox
7 thoughts on “Core Compare Tool”
  • vmn says:
    Reply

    I usually have some “garbage” files like *.php.orig, when testing things. I made the changes below to only compare php, css and js files.

    //VMN Added endsWith
    function endsWith($string, $endString)
    {
    $len = strlen($endString);
    if ($len == 0) {
    return true;
    }
    return (substr($string, -$len) === $endString);
    }
    //VMN Added endsWith

    /** Create a nested array from a directory root
    *
    * @param $path
    * @param array $ignorefolders
    * @param int $type
    * @param false $convertadmin
    */
    function zipGetDirArray( $path, $ignorefolders = [], $type = 0, $convertadmin = false ) {

    global $installedfiles, $cleancorefiles, $version, $customadminpath;
    $files = scandir( $path );
    foreach ( $files as $file ) {
    if ( $file == ‘.’ || $file == ‘..’ ) {
    //do nothing
    } else if ( is_dir( $path . ‘/’ . $file ) ) {
    if ( ( in_array( basename( $file ), $ignorefolders ) ) ) {
    //do nothing for ignored folders
    } else {
    zipGetDirArray( $path . ‘/’ . $file, $ignorefolders, $type, $convertadmin );
    }
    } else {
    if ( ( in_array( basename( $file ), $ignorefolders ) ) ) {
    //do nothing for ignored files
    } else {
    //VMN only check php, css and js files
    if ( endsWith( $file, ‘.php’ ) || endsWith( $file, ‘.css’ ) || endsWith( $file, ‘.js’ ) ) {
    if ( empty( $type ) ) {
    $keypath = $path . ‘/’ . $file;
    $keypath = str_replace( DIR_FS_CATALOG, ”, $keypath );

    if ( $convertadmin ) {
    $keypath = preg_replace( ‘/^\/’ . $customadminpath . ‘/’, ‘/admin’, $keypath, 1 );
    }

    $installedfiles[ $keypath ] = hash_file( ‘md5’, $path . ‘/’ . $file );
    } else if ( $type == 1 ) {
    $keypath = $path . ‘/’ . $file;

    $ospath = ( zipCheckIfPhoenix() ) ? ‘CE-Phoenix-‘ : ‘oscommerce-‘;
    $ospath2 = ( zipCheckIfPhoenix() ) ? ” : ‘/catalog’;
    $keypath = str_replace( DIR_FS_ADMIN . ‘clean_core/’ . $ospath . trim( $version ) . $ospath2, ”, $keypath );
    $keypath = preg_replace( ‘/^\/admin/’, ‘/’ . $customadminpath . ”, $keypath, 1 );
    $cleancorefiles[ $keypath ] = hash_file( ‘md5’, $path . ‘/’ . $file );
    } else if ( $type == 2 ) {

    //ignore any non-php files for catching patch versions
    if ( strpos( $file, ‘.php’ ) !== false ) {
    $keypath = $path . ‘/’ . $file;
    $cleancorefiles[] = $keypath;
    }

    }
    }
    //VMN only check php, css and js files
    }
    }
    }
    }

    December 3, 2020 at 3:42 am
    • @zipurman says:
      Reply

      I’ll leave the comment here. I may add some extra functionality to ignore files of specified types. Me personally, I want to see all differences, including test files.

      December 4, 2020 at 12:30 pm
  • vmn says:
    Reply

    This solves the problem, at least in my OpenSuse. Run the command below in the unzipped update package root directory before applying the updates.

    dos2unix –keepdate $(find . -type f -name “*.php”)

    December 3, 2020 at 2:51 am
  • vmn says:
    Reply

    Does not seem to give correct results, if Phoenix update zip has been used. The update zip files seem to come from a Windows environment. Thus, the files do not match against the full package.

    December 2, 2020 at 11:47 am
    • @zipurman says:
      Reply

      I have noticed that recently. It never used to do that. I also use *nix, so I am seeing the same result. It hashes the files to make the compare. I will see about changing line endings in files in the clean_core to solve the issue.

      December 2, 2020 at 11:57 am
  • vmn says:
    Reply

    Hi and thanks for this addon.
    I could not set exclude folders without the following fix:
    in the function zipurRow:
    //VMNif ( $rowdata[0][‘text’] !== ” ) {
    if (isset($rowdata[1][‘text’]) && $rowdata[1][‘text’] !== ” ) {

    $rightdata .= $rowdata[1][‘text’];
    }
    //VMNif ( $rowdata[1][‘text’] !== ” ) {
    if (isset( $rowdata[1][‘field’]) && $rowdata[1][‘field’] !== ” ) {
    $rightdata .= $rowdata[1][‘field’];
    }

    December 2, 2020 at 7:33 am
    • @zipurman says:
      Reply

      What version of the tool are you using? I dont have a function zipurRow in this tool?

      December 4, 2020 at 12:37 pm
Leave A Comment Cancel reply




Recent reviews
  • Zipur Reporting Tool
    Rated 5 out of 5
    by René
  • Zipur Product Manager
    Rated 5 out of 5
    by Omar
  • Zipur Reporting Tool
    Rated 5 out of 5
    by Director, cornwallhoney.com
Need an add-on? Request it!

If your idea turns into a Paid Add-on … I’ll give you a copy for free.

Don’t forget to like the Free Add-ons so I know which ones are worth maintaining.

Like  Nope
Docs
  • Phoenix Docs 11
Latest Free Add-ons
  • OSCommerce to CE Phoenix Migration Utility
  • Canada Post (REST) Module
  • Admin Menu – Add Text
  • ShareThis – Add to product pages
  • Simple Header Message
  • Favorite Countries
  • Language Tool (Search/Edit)
  • Core Compare Tool
  • Database Tool
  • Zipur Toolbox
Follow me on YouTube

  • Privacy Policy

© Copyright 2020 Intricate Networks Inc.